OpenAI GPT MCP Server
OpenAI GPT MCP Server
一个本地 Model Context Protocol 服务器,通过标准输入/输出提供 OpenAI GPT 文本生成功能。
前置条件
Node.js 18 或更高版本
一个 OpenAI API 密钥
Related MCP server: gpt-mcp
安装与构建
npm install
npm run build将 .env.example 复制为 .env,然后设置你的 API 密钥:
OPENAI_API_KEY=your_api_keyOPENAI_MODEL 是可选的,默认值为 gpt-5。OPENAI_IMAGE_MODEL 也是可选的,默认值为 gpt-image-2。
MCP 客户端配置
先构建,然后将此服务器添加到你的 MCP 客户端配置中。请将 <absolute-path-to-repository> 替换为你克隆仓库的绝对路径。
{
"mcpServers": {
"openai-gpt": {
"command": "node",
"args": ["<absolute-path-to-repository>\\dist\\index.js"]
}
}
}工具:generate_text
必需输入:
prompt:要发送给模型的文本。
可选输入:
instructions:响应的系统级行为。model:GPT 模型 ID,用于覆盖OPENAI_MODEL。max_output_tokens:最大响应长度,范围为 1 到 16,384。
该服务器使用 OpenAI Responses API,并将生成的文本返回给 MCP 客户端。它绝不会将 API 密钥写入输出或日志。
工具:generate_image
生成一张 PNG 图片,并将其直接返回给 MCP 客户端。
prompt(必需):详细的图片描述。model(可选):图片模型 ID,用于覆盖OPENAI_IMAGE_MODEL。size(可选):1024x1024、1536x1024或1024x1536。quality(可选):low、medium或high。
图片生成会单独消耗 OpenAI API 额度,与 Claude 的使用量分开计算。
直接运行
npm start用于交互式检查:
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