OpenAI API MCP Server
Generate text, images, and embeddings. Integrate GPT models and DALL-E into your AI agent.
Quick Answer
- 1. The OpenAI API MCP server lets Claude, Cursor, and VS Code interact with the OpenAI API API through natural language.
- 2. Setup: Add the config to
claude_desktop_config.json, set your API Key variables, and restart. - 3. 3 operations available including Create chat completion, Generate image, Create embeddings.
- 4. Quality score: 78/99 — good source quality and documentation coverage.
Overview
Category: AI & ML
Auth: API Key
Endpoints: 3
Transport: STDIO
Command: npx -y @modelcontextprotocol/server-openai
Spec: v1.0.0
Setup time: ~2 min (auth required)
Environment Variables
OPENAI_API_KEYExample: sk-...
One-Click Install
Copy the snippet for your MCP client and paste it in — zero editing required.
Claude Desktop
Add to claude_desktop_config.json
{
"mcpServers": {
"openai": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-openai"
],
"env": {
"OPENAI_API_KEY": "sk-..."
}
}
}
}Cursor
Settings → MCP Servers → Add
{
"mcpServers": {
"openai": {
"url": "https://mcpbridge.org/config/openai.json"
}
}
}Saves as .cursor/mcp.json in the download. Move it to your project root.
VS Code
Use with MCP extension
{
"mcpServers": {
"openai": {
"url": "https://mcpbridge.org/config/openai.json"
}
}
}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-..."
}
}
}
}What You Can Build
With the OpenAI API MCP server, your AI assistant can:
- Access 3 API operations through natural language
- Read, create, and modify ai & ml resources without writing HTTP requests
- Chain multiple operations in a single conversation for complex workflows
- Combine with other MCP servers for cross-tool automation
Endpoints
/v1/chat/completionsCreate chat completion
/v1/images/generationsGenerate image
/v1/embeddingsCreate embeddings
Authentication
This API requires API Key authentication.
Set the required environment variables in your MCP client before using this server. Refer to the OpenAI API API documentation to obtain credentials.
Required environment variables:
OPENAI_API_KEY
Spec Version
Version: 1.0.0
Spec version published with the OpenAPI document. Config auto-updates when the spec changes.
Page last updated: June 13, 2026
Quality Score
- +Official source (+30)
- +Has documentation (+12)
- +GitHub repo (+12)
- +Auth type defined (+8)
- +OpenAPI spec available (+8)
- +3 endpoints (+8)
Build with OpenAI API
Get everything you need in one bundle: MCP config, cursor rules, and framework integration for OpenAI API.
View OpenAI + Python AI Stack→Read the Guide
Step-by-step walkthrough for setting up and using the OpenAI API MCP server.
OpenAI APIMCP Setup Guide →This listing is verified by the API owner.
Similar APIs
Other APIs in the AI & ML category.
Anthropic API
Access Claude AI models for text generation, analysis, and code assistance through the Anthropic API.
API KeyOpenAI API
APIs for sampling from and fine-tuning language models
Amazon CodeGuru Reviewer
<p>This section provides documentation for the Amazon CodeGuru Reviewer API operations. CodeGuru Reviewer is a service that uses program analysis and machine learning to detect potential defects that are difficult for developers to find and recommends fixes in your Java and Python code.</p> <p>By pr
Amazon CodeGuru Profiler
<p> This section provides documentation for the Amazon CodeGuru Profiler API operations. </p> <p> Amazon CodeGuru Profiler collects runtime performance data from your live applications, and provides recommendations that can help you fine-tune your application performance. Using machine learning algo