openai-docs-skill

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

OpenAI Docs MCP Skill

OpenAI Docs MCP Skill

Overview

概述

Use the OpenAI developer documentation MCP server from the shell to search and fetch authoritative docs. Always do this for OpenAI platform work instead of relying on memory or non-official sources.
通过shell使用OpenAI开发者文档MCP服务器来搜索和获取权威文档。在进行OpenAI平台相关工作时,请务必使用此工具,而非依赖记忆或非官方来源。

Core rules

核心规则

  • Always use this skill for OpenAI API/SDK/Apps/Codex questions or when precise, current docs are required.
  • Query the MCP server via the CLI wrapper in
    scripts/openai-docs-mcp.sh
    (do not rely on Codex MCP tools).
  • Use
    search
    or
    list
    to find the best doc page, then
    fetch
    the page (or anchor) for exact text.
  • Surface the doc URL you used in your response so sources are clear.
  • 当你有OpenAI API/SDK/Apps/Codex相关问题,或需要精准、最新的文档时,务必使用此工具。
  • 通过
    scripts/openai-docs-mcp.sh
    中的CLI封装程序查询MCP服务器(不要依赖Codex MCP工具)。
  • 使用
    search
    list
    找到最佳文档页面,然后使用
    fetch
    获取该页面(或锚点)的准确文本。
  • 在你的回复中附上所使用的文档URL,以便明确来源。

Quick start

快速开始

bash
scripts/openai-docs-mcp.sh search "Responses API" 5
scripts/openai-docs-mcp.sh fetch https://platform.openai.com/docs/guides/migrate-to-responses
bash
scripts/openai-docs-mcp.sh search "Responses API" 5
scripts/openai-docs-mcp.sh fetch https://platform.openai.com/docs/guides/migrate-to-responses

Workflow

工作流程

  1. Discover:
    search
    with a focused query. If unsure, use
    list
    to browse.
  2. Read:
    fetch
    the most relevant URL (optionally add an anchor).
  3. Apply: summarize and/or quote relevant sections; include the URL.
  1. 发现:使用聚焦的查询词执行
    search
    。若不确定,使用
    list
    浏览。
  2. 读取:获取最相关的URL(可选择性添加锚点)并执行
    fetch
  3. 应用:总结和/或引用相关章节;附上URL。

Script reference

脚本参考

The CLI wrapper is at
scripts/openai-docs-mcp.sh
and uses
curl
+
jq
against
https://developers.openai.com/mcp
.
Subcommands:
  • init
    : initialize and inspect server capabilities.
  • tools
    : list available tools on the MCP server.
  • search <query> [limit] [cursor]
    : return JSON hits from the docs index.
  • list [limit] [cursor]
    : browse docs index.
  • fetch <url> [anchor]
    : return markdown for a doc page or section.
  • endpoints
    : list OpenAPI endpoints.
  • openapi <endpoint-url> [lang1,lang2] [code-only]
    : fetch OpenAPI schema or code samples.
Environment:
  • MCP_URL
    : override the default MCP endpoint.
CLI封装程序位于
scripts/openai-docs-mcp.sh
,通过
curl
+
jq
调用
https://developers.openai.com/mcp
子命令:
  • init
    :初始化并检查服务器功能。
  • tools
    :列出MCP服务器上可用的工具。
  • search <query> [limit] [cursor]
    :从文档索引返回JSON搜索结果。
  • list [limit] [cursor]
    :浏览文档索引。
  • fetch <url> [anchor]
    :返回文档页面或章节的markdown内容。
  • endpoints
    :列出OpenAPI端点。
  • openapi <endpoint-url> [lang1,lang2] [code-only]
    :获取OpenAPI模式或代码示例。
环境变量:
  • MCP_URL
    :覆盖默认的MCP端点。