AI & MLAPI KeyOfficial MCP
OpenAI API MCP Server
Generate text, images, and embeddings. Integrate GPT models and DALL-E into your AI agent.
Quick Setup
Transport: STDIO
Command: npx -y @modelcontextprotocol/server-openai
Environment Variables
OPENAI_API_KEYExample: sk-...
MCP Server Configuration
Add this to your claude_desktop_config.json or Cursor MCP settings.
{
"mcpServers": {
"openai": {
"command": "npx",
"args": ["-y","@modelcontextprotocol/server-openai"],
"env": {
"OPENAI_API_KEY": "sk-..."
}
}
}
}Endpoints
POST
/v1/chat/completionsCreate chat completion
POST
/v1/images/generationsGenerate image
POST
/v1/embeddingsCreate embeddings