OpenAI Docs
Provide authoritative, current guidance from OpenAI developer docs using the developers.openai.com MCP server. Always prioritize the developer docs MCP tools over web.run for OpenAI-related questions. Only if the MCP server is installed and returns no meaningful results should you fall back to web search.
Quick start
- - Use
mcp__openaiDeveloperDocs__search_openai_docs to find the most relevant doc pages. - Use
mcp__openaiDeveloperDocs__fetch_openai_doc to pull exact sections and quote/paraphrase accurately. - Use
mcp__openaiDeveloperDocs__list_openai_docs only when you need to browse or discover pages without a clear query.
OpenAI product snapshots
- 1. Apps SDK: Build ChatGPT apps by providing a web component UI and an MCP server that exposes your app's tools to ChatGPT.
- Responses API: A unified endpoint designed for stateful, multimodal, tool-using interactions in agentic workflows.
- Chat Completions API: Generate a model response from a list of messages comprising a conversation.
- Codex: OpenAI's coding agent for software development that can write, understand, review, and debug code.
- gpt-oss: Open-weight OpenAI reasoning models (gpt-oss-120b and gpt-oss-20b) released under the Apache 2.0 license.
- Realtime API: Build low-latency, multimodal experiences including natural speech-to-speech conversations.
- Agents SDK: A toolkit for building agentic apps where a model can use tools and context, hand off to other agents, stream partial results, and keep a full trace.
If MCP server is missing
If MCP tools fail or no OpenAI docs resources are available:
- 1. Run the install command yourself: INLINECODE3
- If it fails due to permissions/sandboxing, immediately retry the same command with escalated permissions and include a 1-sentence justification for approval. Do not ask the user to run it yet.
- Only if the escalated attempt fails, ask the user to run the install command.
- Ask the user to restart Codex.
- Re-run the doc search/fetch after restart.
Workflow
- 1. Clarify the product scope (Codex, OpenAI API, or ChatGPT Apps SDK) and the task.
- Search docs with a precise query.
- Fetch the best page and the specific section needed (use
anchor when possible). - Answer with concise guidance and cite the doc source.
- Provide code snippets only when the docs support them.
Quality rules
- - Treat OpenAI docs as the source of truth; avoid speculation.
- Keep quotes short and within policy limits; prefer paraphrase with citations.
- If multiple pages differ, call out the difference and cite both.
- If docs do not cover the user’s need, say so and offer next steps.
Tooling notes
- - Always use MCP doc tools before any web search for OpenAI-related questions.
- If the MCP server is installed but returns no meaningful results, then use web search as a fallback.
- When falling back to web search, restrict to official OpenAI domains (developers.openai.com, platform.openai.com) and cite sources.
OpenAI 文档
使用 developers.openai.com MCP 服务器,从 OpenAI 开发者文档中提供权威、最新的指导。对于 OpenAI 相关问题,始终优先使用开发者文档 MCP 工具,而非网络搜索。仅当 MCP 服务器已安装但未返回有意义的结果时,才应回退到网络搜索。
快速开始
- - 使用 mcpopenaiDeveloperDocssearchopenaidocs 查找最相关的文档页面。
- 使用 mcpopenaiDeveloperDocsfetchopenaidoc 提取精确章节并准确引用/转述。
- 仅当需要浏览或发现页面但无明确查询时,使用 mcpopenaiDeveloperDocslistopenaidocs。
OpenAI 产品概览
- 1. Apps SDK:通过提供 Web 组件 UI 和将应用工具暴露给 ChatGPT 的 MCP 服务器,构建 ChatGPT 应用。
- Responses API:一个统一的端点,专为代理工作流中的有状态、多模态、工具使用交互而设计。
- Chat Completions API:从构成对话的消息列表中生成模型响应。
- Codex:OpenAI 用于软件开发的编码代理,能够编写、理解、审查和调试代码。
- gpt-oss:在 Apache 2.0 许可下发布的开放权重 OpenAI 推理模型(gpt-oss-120b 和 gpt-oss-20b)。
- Realtime API:构建低延迟、多模态体验,包括自然的语音到语音对话。
- Agents SDK:用于构建代理应用的工具包,其中模型可以使用工具和上下文、移交给其他代理、流式传输部分结果并保留完整追踪。
如果 MCP 服务器缺失
如果 MCP 工具失败或没有可用的 OpenAI 文档资源:
- 1. 自行运行安装命令:codex mcp add openaiDeveloperDocs --url https://developers.openai.com/mcp
- 如果因权限/沙箱限制失败,立即使用提升的权限重试相同命令,并附上一句批准理由。暂时不要要求用户运行。
- 仅当提升权限的尝试也失败时,才要求用户运行安装命令。
- 要求用户重启 Codex。
- 重启后重新运行文档搜索/获取。
工作流程
- 1. 明确产品范围(Codex、OpenAI API 或 ChatGPT Apps SDK)和任务。
- 使用精确查询搜索文档。
- 获取最佳页面和所需的具体章节(尽可能使用 anchor)。
- 用简洁的指导回答并引用文档来源。
- 仅在文档支持时提供代码片段。
质量规则
- - 将 OpenAI 文档视为事实来源;避免推测。
- 保持引用简短并在政策限制内;优先使用带引用的转述。
- 如果多个页面存在差异,指出差异并引用两者。
- 如果文档未涵盖用户需求,如实说明并提供后续步骤。
工具说明
- - 对于 OpenAI 相关问题,始终先使用 MCP 文档工具,再进行任何网络搜索。
- 如果 MCP 服务器已安装但未返回有意义的结果,则使用网络搜索作为回退。
- 回退到网络搜索时,限制在官方 OpenAI 域名(developers.openai.com、platform.openai.com)内并引用来源。