用途:在 shell 中查询 OpenAI 开发者文档 MCP 服务器,搜索并获取权威文档,适用于 OpenAI API/SDK/Apps/Codex 相关问题或需要精确、最新文档的场景。
主要能力:脚本 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 schema 或代码示例)。环境变量 MCP_URL 可覆盖默认 MCP 端点。
使用方式:先用 search 或 list 找到最佳文档页,再 fetch 获取精确文本或章节锚点。示例:scripts/openai-docs-mcp.sh search "Responses API" 5;scripts/openai-docs-mcp.sh fetch https://platform.openai.com/docs/guides/migrate-to-responses。应通过该 CLI 包装脚本查询,不要依赖 Codex MCP 工具;回答中需给出所用文档 URL。
限制:资料未提供鉴权、配额、可用性等更多细节;需按脚本要求配置 curl、jq 环境。