跳过安装。2 分钟内即可运行。
在 cloud.anythingmcp.com 开始免费试用,一键添加 OpenAI API,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。
摘要
让你的 AI 用你自己的密钥使用 OpenAI API:通过 Responses API 向 GPT 模型提问,分析链接中的图片,生成和编辑直接显示在聊天中的图片,创建嵌入向量,用审核功能检查内容,并读取模型、文件和批处理任务。
试试这样问
OpenAI API 的示例提示
点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。
Claude 是 AI,可能会出错。请核对回答。
💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → OpenAI API、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无
git clone、无本地服务器。
OpenAI API + Gemini
让你的 AI 用你自己的密钥使用 OpenAI API:通过 Responses API 向 GPT 模型提问,分析链接中的图片,生成和编辑直接显示在聊天中的图片,创建嵌入向量,用审核功能检查内容,并读取模型、文件和批处理任务。
前提条件
完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:
OPENAI_API_KEY
步骤 1 — 获取凭证
- 登录
https://platform.openai.com,在 Settings、Billing 中充值。API 采用预付费:ChatGPT 订阅不包含 API 访问权限。 - 打开
https://platform.openai.com/api-keys,点击 Create new secret key,选择项目并复制密钥。密钥以sk-开头,只显示一次。 - 按 OpenAI 显示的原样(不加 Bearer 一词)将密钥粘贴到
OPENAI_API_KEY,然后安装连接器。密钥只会发送给 OpenAI。 - 可选:只有当密钥所属用户加入了多个组织时,才设置
OPENAI_ORGANIZATION(位于 Settings、Organization、General 的 Organization ID,以org-开头);只有需要把用量计入某个特定项目时,才设置OPENAI_PROJECT(位于 Settings、Project、General 的 Project ID,以proj_开头)。其他情况下两者都留空:与密钥不匹配的值会被拒绝并返回 401。 - 要使用图片工具,请在 Settings、Organization、General、Verify Organization 中验证你的组织。未验证时,GPT 图片模型会返回 403。
- 运行
openai_list_models。它不收费,会显示你的密钥可以使用哪些模型。
计费:每次模型调用都计入该密钥所属的 OpenAI 账户。审核以及模型、文件和批处理列表均免费。除非你要求更高规格,连接器会使用低价默认值:文本用 gpt-6-luna(每百万输入 token 约 0.10 美元,每百万输出 token 约 0.50 美元),图片用中等质量的 gpt-image-1-mini(每张约 0.01 美元)。更强的文本模型价格是其 20 到 100 倍,网页搜索按次计费。
功能:通过 Responses API 向 OpenAI 模型提问(文本、链接图片、网页搜索、结构化输出),生成和编辑显示在聊天中的图片,一次为最多 20 段文本创建嵌入向量,用审核功能检查文本和图片,并读取你的模型、文件以及在其他地方启动的 Batch API 任务。
先确认:每张图片都要花钱,因此 AI 在每次调用 openai_generate_image 或 openai_edit_image 之前都会先征得你的确认,并且除非你要更多,只生成一张。openai_delete_file 在安装时处于关闭状态;启用后它同样会先确认,且删除的文件无法恢复。
常见错误:401 表示密钥错误或已被撤销,或者组织 ID 或项目 ID 与密钥不匹配。403:组织未验证(图片模型),或者该组织无法使用此模型或区域。404 model_not_found:用 openai_list_models 检查。429 insufficient_quota:余额用完或已达到支出上限,请充值。429 rate_limit_exceeded:稍等后重试一次。400 moderation_blocked 或 content_policy_violation:OpenAI 的安全系统拒绝了该提示。
该连接器不涵盖 chat completions(Responses API 已覆盖相同功能)、音频(语音合成和转录)、realtime、视频、文件上传和下载、创建批处理、微调、vector stores、assistants 以及 admin API。
步骤 2 — 安装 adapter
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
步骤 3 — 在 Gemini 中添加连接器
你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(
https://cloud.anythingmcp.com/mcp/…)。本指南中出现YOUR_SERVER_ID的地方都用它替换。
Gemini CLI 从 ~/.gemini/settings.json(Windows 上为 %USERPROFILE%\.gemini\settings.json)读取 MCP 服务器。添加:
{
"mcpServers": {
"anythingmcp": {
"httpUrl": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
"headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
}
}
}
- 在 AnythingMCP 的 MCP Servers → 你的服务器 → API keys 中创建 MCP API 密钥,并用它替换
YOUR_MCP_API_KEY。 - 保存文件并重启
gemini。 - 在 Gemini CLI 中运行
/mcp(或在终端运行gemini mcp list),anythingmcp应显示为已连接。 - 开始输入提示,Gemini CLI 现在可以调用
OpenAI API的工具。
可用工具
| Tool | What it does |
|---|---|
openai_list_models | List the OpenAI models this API key can use (chat and reasoning, image, embedding, moderation, audio), with owner, creation time and… |
openai_get_model | Read one OpenAI model: id, owner, creation time and shutdown date when one is announced |
openai_create_response | Ask an OpenAI model and get its answer (Responses API). input is either a plain prompt string or a list of items, e.g. [{"role": "user"… |
openai_generate_image | Create pictures from a text description with an OpenAI GPT image model and return them as images the user can see |
openai_edit_image | Change existing pictures with an OpenAI GPT image model, or combine several into a new one: describe the edit and pass the pictures by… |
openai_create_embeddings | Turn one text, or a list of up to 20 texts, into embedding vectors for semantic search, clustering or similarity |
openai_moderate | Check text, or text with images, against OpenAI's content policy categories (harassment, hate, self-harm, sexual, violence, illicit and… |
openai_list_files | List the files stored in the OpenAI account (for batches, fine-tuning, assistants, vision or user data), newest first, with id, name, size… |
openai_get_file | Read the details of one file in the OpenAI account: name, size in bytes, purpose, creation time and expiry |
openai_delete_file | Delete a file from the OpenAI account |
openai_list_batches | List the Batch API jobs of the account, newest first: endpoint, model, status (validating, in_progress, finalizing, completed, failed… |
openai_get_batch | Read one Batch API job: status, timestamps of each stage, request counts (total, completed, failed), token usage, errors and the… |
示例提示
- “看看这个链接里的商品照片,为我们的网店写一段简短、亲切的介绍。”
- “为一条社交媒体帖子生成一张木桌上陶瓷咖啡杯的图片,但在生成之前先告诉我使用的模型和预估费用。”
- “用审核功能检查这五条客户评论,告诉我哪些被标记了,以及原因。”
- “我们的密钥可以使用哪些 OpenAI 模型?其中有没有已公布停用日期的?”
FAQ
Gemini CLI 从哪里读取 MCP 服务器? 用户级配置位于 ~/.gemini/settings.json,项目级配置位于项目内的 .gemini/settings.json。gemini mcp list 会列出每个服务器及其连接状态。
下一步
这份指南对你有帮助吗?