Skip to content
All posts

AnyRouter + ChatGPT: connect it with an MCP plugin

ChatGPT cannot switch its own model provider. Add AnyRouter as a custom MCP plugin instead, then browse models, check credits and publish pages from the chat.

What works today

ChatGPT cannot change the model that answers in its own chat. A custom MCP plugin is the supported bridge. Add AnyRouter as a remote MCP server and ChatGPT can call its tools in a conversation.

The server URL is https://anyrouter.dev/api/v1/mcp. Use the web app to add it. ChatGPT connects to remote servers over HTTPS and accepts SSE or streaming HTTP. A local stdio server will not connect.

  • There is no chat tool on the AnyRouter MCP server. Model calls go to /api/v1/chat/completions, /api/v1/messages or /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, including publish_artifact.
  • Write tools ask for confirmation before they run. Read-only tools carry a hint that clients use to skip the prompt.

The tool list is deliberately small. list_models reports each model's access and can_route flags, so the chat can tell you what is routable instead of guessing from a stale list. recommend_model ranks models for one job with a price or context filter. Neither tool sends a model call, so neither spends inference credit.

Limits are documented too. One credential can make up to 120 tool calls a minute, and one IP can make 300 requests a minute before authentication. The MCP server uses management-tier limits, not the inference rate limits. A chat that loops on a tool will get a 429 with a retry hint.

The OpenAI custom MCP guide describes the ChatGPT side. The AnyRouter MCP reference lists every tool and scope. Both were read on 22 November 2026.

Add the connector

Open ChatGPT Plugins in a browser, then add a custom MCP server.

  1. 1

    Open the add dialog. Select the plus button, then Add custom MCP server. Menu labels move, so look for the custom server action if your workspace uses a newer layout.

  2. 2

    Fill in the server. Name it AnyRouter. Set the server URL to https://anyrouter.dev/api/v1/mcp. Add a one-line description if the dialog asks for one.

  3. 3

    Choose OAuth. Pick OAuth under authentication. Review the risk warning, then select Create as a plugin. Install the plugin if ChatGPT asks you to.

  4. 4

    Approve access. The first call opens anyrouter.dev/oauth/consent. Sign in, choose Read-only or Standard, then allow. Standard is needed only if you want to publish artifacts or change keys from chat.

  5. 5

    Call it in a chat. Type @ in the prompt box, choose AnyRouter, then ask a question that names the tool. For example, Use AnyRouter's list_models tool to show free models that can route today.

Useful prompts

ChatGPT picks tools from the request. Naming the tool removes most ambiguity. These prompts use the tools the server actually exposes.

AskToolBundle
Which models can you route for me right now?list_modelsRead-only
Recommend a cheap model for translation.recommend_modelRead-only
How much credit is left in this workspace?get_creditsRead-only
Show my artifacts.list_artifactsRead-only
Publish this HTML as an unlisted artifact.publish_artifactStandard

A precise prompt works better than a broad one. Include the server label and the tool name when two apps offer similar tools. The OpenAI guide recommends the same pattern.

A prompt that names the server and the tool
@AnyRouter Use the list_models tool with free_only set to true.
Show only models that can_route is true. Return a short table.

When the connector will not connect

Most failures have a short list of causes.

  • 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-server in a browser. A JSON document with authorization_endpoint and registration_endpoint means 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.

A token that works in Claude Code is not a fix for the ChatGPT dialog. The two clients offer different authentication options.

Publish something from the chat

Once the plugin is installed with Standard access, ask ChatGPT to build one self-contained HTML page and publish it with publish_artifact. The tool takes a map of file paths to text, so one index.html is the simplest case.

The website publishing guide walks through the full flow, including the CLI route for folders with images.

Turn a chat-generated page into a shareable link.

Read the guide

FAQ

Can I run GPT models through AnyRouter inside the ChatGPT app?

No. The ChatGPT app uses its own models. AnyRouter is an API gateway. To send a model call through AnyRouter, use the API, the playground or a coding agent. The MCP plugin gives ChatGPT tools, not a different chat model.

Does connecting the plugin cost anything?

Connecting a connector creates no charge. Tool calls follow the MCP rate limits. Model calls you make through the AnyRouter API follow the normal credit and BYOK rules.

Can ChatGPT publish an artifact for me?

Yes. Choose the Standard permission bundle when you approve the connector. That bundle includes the write:artifacts scope used by publish_artifact. The tool accepts text files up to 1 MB in total. Use the REST folder flow or the anyr CLI for images and larger folders.

Related posts

Pick a plan and start

Go is $2 a month for $4 in credits.

Pro is $10 a month for $20 in credits.

Pro+ is $45 a month for $100 in credits.

Max is $100 a month for $300 in credits.

Create an account, pay on the next screen, then call the model.