# AnyRouter + ChatGPT: kết nối bằng plugin MCP

> ChatGPT không đổi được nhà cung cấp model. Thêm AnyRouter làm plugin MCP tùy chỉnh để xem model, kiểm tra credit và publish trang trong chat.

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

## Điều làm được hôm nay

ChatGPT không đổi được model trả lời trong chính ứng dụng của nó. Plugin MCP tùy chỉnh là cầu nối được hỗ trợ. Thêm AnyRouter làm MCP server từ xa và ChatGPT có thể gọi công cụ của chúng tôi trong một cuộc trò chuyện.

Địa chỉ server là `https://anyrouter.dev/api/v1/mcp`. Hãy thêm địa chỉ này trong ứng dụng web. ChatGPT kết nối server từ xa qua HTTPS và hỗ trợ SSE cùng streaming HTTP. Server stdio chạy trên máy cục bộ sẽ không kết nối được.

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

Danh sách công cụ được giữ ngắn gọn. `list_models` báo cờ `access` và `can_route` của từng model, nên chat biết model nào đang định tuyến được thay vì đoán từ một danh sách cũ. `recommend_model` xếp hạng model cho một công việc với bộ lọc giá hoặc ngữ cảnh. Hai công cụ này không gọi model, nên không tiêu credit inference.

Giới hạn cũng được ghi rõ. Một credential gọi tối đa 120 công cụ mỗi phút, một IP gửi tối đa 300 yêu cầu mỗi phút trước khi xác thực. MCP dùng giới hạn tầng quản trị, không dùng giới hạn inference. Chat bị lặp công cụ sẽ nhận 429 kèm gợi ý thử lại.

Hướng dẫn [custom MCP server của OpenAI](https://developers.openai.com/api/docs/guides/custom-mcp-server) mô tả phía ChatGPT. [Tài liệu tham chiếu MCP của AnyRouter](https://anyrouter.dev/docs/api-reference/mcp) liệt kê từng công cụ và quyền. Cả hai được đọc ngày 22 tháng 11 năm 2026.

## Thêm connector

Mở [ChatGPT Plugins](https://chatgpt.com/plugins) trong trình duyệt, rồi thêm custom MCP server.





## Câu nhắc hữu ích

ChatGPT chọn công cụ dựa trên yêu cầu. Nêu tên công cụ sẽ giảm hầu hết nhầm lẫn. Các câu dưới đây dùng đúng công cụ mà server cung cấp.

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

Một câu nhắc cụ thể tốt hơn câu nhắc chung. Hãy nêu nhãn server và tên công cụ khi hai app có công cụ giống nhau. Tài liệu của OpenAI cũng khuyên vậy.

```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._

## Khi connector không kết nối

Hầu hết lỗi đều có nguyên nhân ngắn gọn.

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

Một token chạy được trong Claude Code không sửa được hộp thoại của ChatGPT. Hai client đưa ra hai cách xác thực khác nhau.

## Publish một trang từ chat

Sau khi cài plugin với quyền Standard, hãy nhờ ChatGPT tạo một trang HTML tự chứa rồi gọi `publish_artifact`. Công cụ nhận bản đồ đường dẫn tới nội dung văn bản, nên một file `index.html` là trường hợp đơn giản nhất.

Hướng dẫn [publish website](https://anyrouter.dev/blog/publish-chatgpt-website-artifacts) đi qua toàn bộ quy trình, gồm cả cách dùng CLI cho thư mục có ảnh.

Turn a chat-generated page into a shareable link.

[Read the guide](https://anyrouter.dev/blog/publish-chatgpt-website-artifacts)
