OpenAI GPT MCP Server
Provides tools for generating text with OpenAI GPT models via the Responses API and generating PNG images using OpenAI image models.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@OpenAI GPT MCP Server Draft a friendly follow-up email to a potential client."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
OpenAI GPT MCP Server
A local Model Context Protocol server that provides OpenAI GPT text generation over standard input/output.
Prerequisites
Node.js 18 or newer
An OpenAI API key
Related MCP server: gpt-mcp
Install and build
npm install
npm run buildCopy .env.example to .env and set your API key:
OPENAI_API_KEY=your_api_keyOPENAI_MODEL is optional and defaults to gpt-5. OPENAI_IMAGE_MODEL is optional and defaults to gpt-image-2.
MCP client configuration
Build first, then add this server to your MCP client's configuration. Replace <absolute-path-to-repository> with the absolute path to your clone.
{
"mcpServers": {
"openai-gpt": {
"command": "node",
"args": ["<absolute-path-to-repository>\\dist\\index.js"]
}
}
}Tool: generate_text
Required input:
prompt: text to send to the model.
Optional inputs:
instructions: system-level behavior for the response.model: a GPT model ID, overridingOPENAI_MODEL.max_output_tokens: maximum response size, from 1 through 16,384.
The server uses the OpenAI Responses API and returns generated text to the MCP client. It never writes API keys to output or logs.
Tool: generate_image
Generates one PNG image and returns it directly to the MCP client.
prompt(required): detailed image description.model(optional): image model ID, overridingOPENAI_IMAGE_MODEL.size(optional):1024x1024,1536x1024, or1024x1536.quality(optional):low,medium, orhigh.
Image generation consumes OpenAI API credits separately from Claude usage.
Run directly
npm startFor interactive inspection:
npm run inspectAvailable Tools
2 toolsgenerate_imageGenerate an image with OpenAIB
Generate one image from a text prompt using OpenAI's image generation API.
Inputs: prompt (required), size, model, quality.
generate_textGenerate text with OpenAIA
Generate a text response using an OpenAI GPT model via the Responses API.
Inputs: prompt (required), model, instructions, max_output_tokens.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools are clearly distinct: one generates text and the other generates images. There is no overlap or ambiguity in their purposes.
Both tools follow the same consistent generate_noun pattern using snake_case. The naming convention is uniform and predictable.
Two tools is borderline for a coherent server; they are well-scoped but the surface feels thin for a general OpenAI GPT server. Each tool earns its place, but the count is on the low end.
The two-generation capabilities cover the core domain of text and image generation with no obvious dead ends. Minor gaps exist if considering broader OpenAI features like embeddings or audio, but for the stated GPT-focused purpose the coverage is reasonable.
Related MCP Connectors
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
Focused MCP server for OpenAI image/audio generation (v2.0.0). Wraps endpoints via HAPI CLI.
MCP server for AI dialogue using various LLM models via AceDataCloud
MCP server for OpenAI Sora AI video generation
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server that wraps OpenAI's image generation and editing APIs, enabling text-to-image and image-to-image operations via tools.186 npm37ISC
- FlicenseNot gradedqualityDmaintenanceA local MCP server that enables Claude to generate images using the OpenAI API.-
- AlicenseNot gradedqualityDmaintenanceMCP server that wraps OpenAI's gpt-image-2 image generation API, enabling image generation from text prompts, listing saved images, and loading images inline.1MIT
- AlicenseNot gradedqualityDmaintenanceA minimal MCP server for generating images via OpenAI's GPT image model, supporting inline display or file output.MIT