O
OpenAI MCP Server
Connects AI assistants to the OpenAI API through MCP, enabling chat completions and embedding generation to integrate OpenAI models directly into your AI-powered workflows.
stdioLocalApiKeynpm
What This Server Exposes
Tools
chat_completioncreate_embedding
Resources
- •model responses
- •embedding vectors
Setup Instructions
- 1Generate an OpenAI API key at platform.openai.com/account/api-keys
- 2Add the OpenAI server config to your Claude Desktop configuration
- 3Set the OPENAI_API_KEY environment variable
- 4Restart Claude Desktop
Configuration
Claude Desktop Configuration
claude_desktop_config.json
{
"mcpServers": {
"openai": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-openai"
],
"env": {
"OPENAI_API_KEY": "your-openai-api-key"
}
}
}
}Environment Variables
| Name | Required | Secret | Description |
|---|---|---|---|
| OPENAI_API_KEY | ✓ | 🔒 | OpenAI API key from platform.openai.com/account/api-keys |
OPENAI_API_KEY
OpenAI API key from platform.openai.com/account/api-keys
Required🔒 Secret
Server Manifest
No official server.json manifest found. Generate one with our MCP server.json Generator →
Compatibility
Claude DesktopClaude Code
⚠
Safety Notes
Your OpenAI API key is billed per token usage. Set spending limits in the OpenAI dashboard to prevent unexpected charges. Never expose your key in public repositories or client-side code.
This listing is for informational purposes only. CodexSpot is not affiliated with OpenAI MCP Server.