[Home](/index.md) › [MCP servers](/mcp.md) › OpenAI Codex docs MCP

# OpenAI Codex docs MCP

MCP server

- 5 callable tools
- Read only
- 5 capabilities

[Installation guide](https://developers.openai.com/mcp)

## Overview

Hosted by OpenAI, this server gives AI agents access to OpenAI developer documentation from platform.openai.com, developers.openai.com and learn.chatgpt.com, plus OpenAPI specs for OpenAI API endpoints.

### Capabilities

- Search OpenAI documentation pages
- Browse the list of crawled OpenAI doc pages
- Fetch full markdown of a specific OpenAI doc page
- List OpenAI API endpoint URLs
- Retrieve the OpenAPI spec for an API endpoint

## Works with

The products your agent can work with through this server.

- [OpenAI Codex](/tools/openai-codex.md): Agentic coding in ChatGPT

## Tools

The callable functions your agent uses to work with this server.

### `search_openai_docs`

Search across `platform.openai.com`, `developers.openai.com`, and `learn.chatgpt.com` docs.

### `list_openai_docs`

List or browse pages from `platform.openai.com`, `developers.openai.com`, and `learn.chatgpt.com` that this server crawls (useful when you don’t know the right query yet or you’re paging through results).

### `fetch_openai_doc`

Fetch the markdown for a specific doc page from `developers.openai.com`, `platform.openai.com`, or `learn.chatgpt.com` so you can quote or summarize exact, up-to-date guidance (schemas, examples, limits, and edge cases).

### `list_api_endpoints`

List all OpenAI API endpoint URLs available in the OpenAPI spec.

### `get_openapi_spec`

Return the OpenAPI spec for a specific API endpoint URL.

## Installation

Follow the installation guide for supported clients, authentication and required permissions.

### Add OpenAI Codex docs MCP to Claude Code

Run this in your terminal:

```sh
claude mcp add --transport http openai-codex-docs https://developers.openai.com/mcp
```

If the server asks you to sign in, run `/mcp` in Claude Code and follow the browser prompt.

### Add OpenAI Codex docs MCP to Cursor

Add it with the Add to Cursor button below, or add it to `.cursor/mcp.json` in your project (`~/.cursor/mcp.json` for every project):

[Add to Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=openai-codex-docs&config=eyJ1cmwiOiJodHRwczovL2RldmVsb3BlcnMub3BlbmFpLmNvbS9tY3AifQ%3D%3D)

```json
{
  "mcpServers": {
    "openai-codex-docs": {
      "url": "https://developers.openai.com/mcp"
    }
  }
}
```

### Add OpenAI Codex docs MCP to VS Code

Add it to `.vscode/mcp.json` in your workspace. VS Code uses `servers` rather than `mcpServers`. Or run MCP: Add Server from the Command Palette and choose HTTP.

```json
{
  "servers": {
    "openai-codex-docs": {
      "type": "http",
      "url": "https://developers.openai.com/mcp"
    }
  }
}
```

### Add OpenAI Codex docs MCP to Codex

Run this in your terminal:

```sh
codex mcp add openai-codex-docs --url https://developers.openai.com/mcp
```

Or add it to `~/.codex/config.toml`:

```toml
[mcp_servers.openai-codex-docs]
url = "https://developers.openai.com/mcp"
```

If the server uses OAuth, sign in with `codex mcp login openai-codex-docs`.

### Add OpenAI Codex docs MCP to Claude

Add it as a custom connector with this URL:

```
https://developers.openai.com/mcp
```

1. Open Customize, then Connectors.
2. Click + Add, then Add custom connector.
3. Name it, paste the URL and click Continue.
4. Choose how to sign in, then click Add.

On Team and Enterprise plans, an Owner adds it in Organization settings first, then members connect it.

### Add OpenAI Codex docs MCP to other clients

For any other client that connects to remote MCP servers over HTTP, use this URL:

```
https://developers.openai.com/mcp
```

[Read the installation guide](https://developers.openai.com/mcp)
