今天可行的做法
ChatGPT 无法更换自己在对话中使用的模型。自定义 MCP 插件是受支持的桥梁。把 AnyRouter 添加为远程 MCP 服务,ChatGPT 就能在对话中调用我们的工具。
服务地址是 https://anyrouter.dev/api/v1/mcp。请在网页端添加。ChatGPT 通过 HTTPS 连接远程服务,支持 SSE 和流式 HTTP。本地 stdio 服务无法连接。
- There is no chat tool on the AnyRouter MCP server. Model calls go to
/api/v1/chat/completions,/api/v1/messagesor/api/v1/responses. - ChatGPT's custom MCP plugin dialog offers OAuth and no authentication. It does not offer a static bearer token field as of 22 November 2026. AnyRouter supports OAuth with dynamic client registration and PKCE, so the web flow is the one to use.
- The Read-only permission bundle is the default. It includes
list_models,recommend_model, artifact reads and credit reads. Standard adds the write tools, includingpublish_artifact. - Write tools ask for confirmation before they run. Read-only tools carry a hint that clients use to skip the prompt.
工具列表刻意保持简短。list_models 会返回每个模型的 access 和 can_route 标记,对话就能判断哪些模型当前可路由,而不是依赖过期列表猜测。recommend_model 按价格或上下文过滤为某个任务排序。两个工具都不发起模型调用,因此不消耗推理额度。
限流也有文档。每个 credential 每分钟最多调用 120 次工具,每个 IP 在认证前每分钟最多 300 次请求。MCP 使用管理层限流,而非推理限流。工具陷入循环时会收到带重试提示的 429。
OpenAI 的自定义 MCP 服务指南说明 ChatGPT 一侧的设置。AnyRouter MCP 参考文档列出全部工具和权限。两者均于 2026 年 11 月 22 日查阅。
添加连接器
在浏览器中打开 ChatGPT Plugins,然后添加自定义 MCP 服务。
- 1
打开添加对话框. 点击加号,再选择 Add custom MCP server。菜单文字可能变化,若你的工作区使用新版布局,请寻找添加自定义服务的入口。
- 2
填写服务信息. 名称填
AnyRouter。服务器地址填https://anyrouter.dev/api/v1/mcp。对话框若要求描述,写一行即可。 - 3
选择 OAuth. 在认证方式中选择 OAuth。阅读风险提示后点击 Create as a plugin。如果 ChatGPT 要求安装插件,请确认安装。
- 4
批准权限. 第一次调用会打开
anyrouter.dev/oauth/consent。登录后选择 Read-only 或 Standard,再点击允许。只有需要在聊天中发布 artifact 或管理密钥时才选 Standard。 - 5
在对话中调用. 在输入框键入
@,选择 AnyRouter,然后提出点名工具的提问。例如Use AnyRouter's list_models tool to show free models that can route today.
好用的提示词
ChatGPT 根据请求挑选工具。点名工具可以消除大部分歧义。下面的提示词只用服务器上真实存在的工具。
| Ask | Tool | Bundle |
|---|---|---|
| Which models can you route for me right now? | list_models | Read-only |
| Recommend a cheap model for translation. | recommend_model | Read-only |
| How much credit is left in this workspace? | get_credits | Read-only |
| Show my artifacts. | list_artifacts | Read-only |
| Publish this HTML as an unlisted artifact. | publish_artifact | Standard |
具体的提示词比宽泛的更可靠。当两个应用有相似工具时,写明服务标签和工具名。OpenAI 指南也推荐这种做法。
@AnyRouter Use the list_models tool with free_only set to true.
Show only models that can_route is true. Return a short table.连接器无法连接时
大多数失败原因都很短。
- Use ChatGPT on the web. The custom server flow is a web feature, and workspace rules can hide it.
- Open
https://anyrouter.dev/.well-known/oauth-authorization-serverin a browser. A JSON document withauthorization_endpointandregistration_endpointmeans discovery is reachable. - If tools do not appear, start a new chat and select the plugin with
@. Check the app settings page for a refresh action that pulls new tools. - On a work or school account, ask the admin whether connectors are enabled. Workspace permissions apply to custom MCP servers.
- For a headless or local integration, skip the plugin. Use a bearer key from Dashboard, Keys in a client that supports token auth.
在 Claude Code 中可用的 token 不能修好 ChatGPT 的对话框。两种客户端提供的认证方式不同。
从聊天中发布内容
安装插件并授予 Standard 权限后,可以让 ChatGPT 生成一个自包含的 HTML 页面,再用 publish_artifact 发布。该工具接受路径到文本内容的映射,所以一个 index.html 是最简单的情况。
网站发布指南覆盖完整流程,包括带图片目录的 CLI 方案。
Turn a chat-generated page into a shareable link.
Read the guide常见问题
相关文章
- 给 AI agent 用的 MCP 服务器:是什么、怎么连GuidesJuly 12, 2026 · MCP 服务器让 AI agent 经一套标准接口调用工作区工具,key、额度、模型、状态,而不是每个服务手写胶水。MCP 是什么,以及如何把 AnyRouter 托管的 MCP 服务器接到 Claude Desktop、Claude Code、Cursor 或你自己的 agent。
- 用 AnyRouter Artifacts 发布 ChatGPT 生成的网站GuidesNovember 22, 2026 · ChatGPT 写 HTML,AnyRouter Artifacts 把它托管在一个稳定地址。可以在聊天里用 MCP 发布,也可以在终端用 anyr 发布。默认私密。
- AnyRouter 是什么?用人话讲 AI 模型路由GuidesAugust 5, 2026 · AI 模型路由器让你用一个 API 调用很多 LLM。下面讲 AnyRouter 是什么、为什么存在、对你下一个项目有没有用。