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 "Install 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 ServerDraft 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 inspectMaintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
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.24938ISC
- AlicenseNot gradedqualityCmaintenanceA local MCP server that enables Claude to generate images using the OpenAI API.9MIT
- FlicenseNot gradedqualityCmaintenanceMCP server that wraps OpenAI's gpt-image-2 image generation API, enabling image generation from text prompts, listing saved images, and loading images inline.1
- AlicenseNot gradedqualityCmaintenanceA minimal MCP server for generating images via OpenAI's GPT image model, supporting inline display or file output.MIT
Related MCP Connectors
MCP server for AI dialogue using various LLM models via AceDataCloud
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
MCP server for OpenAI Sora AI video generation
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/boghyjunior-dot/openai-image-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server