Skip to content
MCP-Bridge
AI & ML

OpenAI API Claude Desktop Config

Add the OpenAI API MCP server to Claude Desktop with this ready-to-use configuration.

Setup Instructions

  1. Open Claude Desktop
  2. Go to Settings → Developer → Edit Config → claude_desktop_config.json
  3. Paste the JSON below into the file
  4. Set your credentials in the env section
  5. Restart Claude Desktop

Configuration JSON

Copy the entire block into your claude_desktop_config.json

{
  "mcpServers": {
    "openai-com": {
      "command": "npx",
      "args": [
        "-y",
        "@mcp/openai-com"
      ],
      "env": {
        "OPENAI_API_API_KEY": "your_openai_api_api_key"
      }
    }
  }
}

Environment Variables

OPENAI_API_API_KEY

Replace your_openai_api_api_key with your actual openai api api key

Endpoints

POST/answers

Answers the specified question using the provided documents and examples. The endpoint first [searches](/docs/api-reference/searches) over provided documents or files to find relevant context. The relevant context is combined with the provided examples and question to create the prompt for [completion](/docs/api-reference/completions).

POST/audio/transcriptions

Transcribes audio into the input language.

POST/audio/translations

Translates audio into into English.

POST/chat/completions

Creates a completion for the chat message

POST/classifications

Classifies the specified `query` using provided examples. The endpoint first [searches](/docs/api-reference/searches) over the labeled examples to select the ones most relevant for the particular query. Then, the relevant examples are combined with the query to construct a prompt to produce the final label via the [completions](/docs/api-reference/completions) endpoint. Labeled examples can be provided via an uploaded `file`, or explicitly listed in the request using the `examples` parameter for quick tests and small scale use cases.

POST/completions

Creates a completion for the provided prompt and parameters

POST/edits

Creates a new edit for the provided input, instruction, and parameters.

POST/embeddings

Creates an embedding vector representing the input text.

GET/engines

Lists the currently available (non-finetuned) models, and provides basic information about each one such as the owner and availability.

GET/engines/{engine_id}

Retrieves a model instance, providing basic information about it such as the owner and availability.