# 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.

- Date: November 22, 2026
- Category: guides
- HTML: https://anyrouter.dev/blog/anyrouter-chatgpt

## 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](https://developers.openai.com/api/docs/guides/custom-mcp-server) describes the ChatGPT side. The [AnyRouter MCP reference](https://anyrouter.dev/docs/api-reference/mcp) lists every tool and scope. Both were read on 22 November 2026.

## Add the connector

Open [ChatGPT Plugins](https://chatgpt.com/plugins) in a browser, then add a custom MCP server.





## Useful prompts

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

| 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 |

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.

```text
@AnyRouter Use the list_models tool with free_only set to true.
Show only models that can_route is true. Return a short table.
```

_A prompt that names the server and the tool._

## 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](https://anyrouter.dev/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](https://anyrouter.dev/blog/publish-chatgpt-website-artifacts) 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](https://anyrouter.dev/blog/publish-chatgpt-website-artifacts)
