Choose the site that holds your account and credits. The examples below use the international endpoint. For a toapis.cn account, replace
https://api.toapis.com/mcp with https://api.toapis.cn/mcp and use the toapis.cn console. Accounts and credits are separate.Before connecting
Use a client that supports remote MCP over Streamable HTTP. Optional ToAPIs skills help with model selection and prompts; theirnpx skills add commands require Node.js. You can skip skills installation and still use MCP.
For browser authorization, sign in to the matching ToAPIs site, check the client name, choose an API key or create a dedicated key with a spending limit, then click Allow. For header authentication, create a dedicated key under API Tokens and replace <API_KEY> locally. Keep real keys out of chats and version control.
Pick your client and connect in a few steps
Claude Code
Claude Code
Claude Code
Run the commands below in a terminal. The first installs optional skills; the second adds the MCP server. Then authorize in/mcp and check with claude mcp list.Authorize in /mcp
Type /mcp in Claude Code, select toapis and sign in in the browser. If toapis is not listed, restart Claude Code first.Claude
Claude
Add it manually
Open Settings, then Connectors, and add a custom connector. Name it ToAPIs, use the URL below, and leave the OAuth client ID and secret empty.Connect and authorize
Click Add, then Connect. Sign in on the ToAPIs page, choose an API key and click Allow.Claude reaches ToAPIs from Anthropic’s servers, so do not pick a key with an IP allowlist. The Free plan allows one custom connector.Codex
Codex
Codex
Run the commands below in a terminal. The first installs optional skills. Adding the server may open browser authorization automatically; finish it before continuing. Ifcodex mcp list shows Not logged in, run codex mcp login toapis, finish authorization, and check again. Start a new chat after setup.Authorize in the browser
Codex opens the ToAPIs authorization page. Sign in, check the client name, choose an API key or create a dedicated one with a spending limit, and click Allow. In the desktop app you can also click Authenticate next to toapis under Settings, MCP servers.The Codex CLI and desktop app share one configuration, so one setup covers both.Codex MCPCursor
Cursor
Devin
Devin
Add ToAPIs
Devin Desktop and Devin CLI share one configuration. Run these commands in a terminal, or ask Devin to run them:Authorize in the browser
devin mcp login toapis opens the browser: sign in to ToAPIs, choose an API key and click Allow. If you skip it, Devin asks you to sign in the first time it uses toapis.Antigravity
Antigravity
Add to the MCP configuration
The Antigravity app, IDE and CLI share~/.gemini/config/mcp_config.json. Merge the configuration below and save it, then type /mcp in the CLI or reload the servers in settings.toapis entry into your existing configuration; keep your other servers.Authorize and paste the code
Open Antigravity settings withCmd + , (Ctrl + , on Windows), go to Customizations and click Authenticate next to toapis. After you sign in to ToAPIs and click Allow, the page shows an authorization code. Paste it into settings and click Submit.Doubao (豆包)
Doubao (豆包)
Create a dedicated key
This client only supports a key in a request header. Create a key in the ToAPIs console, preferably with a spending limit, and copy it. Replace<API_KEY> in the configuration below with this key.Open API TokensCreate a custom plugin
Open the Doubao desktop app, click “插件·技能·伙伴” (Plugins, Skills, Partners) in the left sidebar, click ”+ 添加” (Add) at the top right of the “插件” (Plugins) page and choose “新建自定义插件” (New custom plugin). Enter ToAPIs as the server name, choose HTTP as the transport type and enter the URL below as the server URL.Add the auth header and save
Under “自定义 Headers” (Custom headers), click ”+ 添加” (Add). Enter Authorization as the header name and the line below as the value (replace<API_KEY> with your key), then click “保存” (Save).QwenWork (千问办公)
QwenWork (千问办公)
Create a dedicated key
This client only supports a key in a request header. Create a key in the ToAPIs console, preferably with a spending limit, and copy it. Replace<API_KEY> in the configuration below with this key.Open API TokensPaste the JSON configuration
In QwenWork, open “扩展” (Extensions) > “连接器” (Connectors) in the left sidebar, click ”+ 添加” (Add) > “粘贴 JSON 配置” (Paste JSON) at the top right, paste the configuration below (replace<API_KEY> with your key) and click “导入” (Import).Turn on the connector
Connectors are off by default. Turn on toapis in the connector list, then start a new task. It does not work in existing conversations.Qwen Code
Qwen Code
Run in a terminal
The first command installs the ToAPIs skills (needs Node.js; MCP works without them). The second adds the ToAPIs MCP server:Authorize in the browser
Run qwen to start Qwen Code. When it connects to ToAPIs, it opens the authorization page in your browser: sign in, choose a key and click Allow. Type /mcp in Qwen Code to check the connection and sign-in status of toapis.Browser sign-in not working? Use an API key
Create a key under “API Tokens” in the console, replace<API_KEY> in the command below with it and run the command.Trae CN
Trae CN
Create a dedicated key
This client only supports a key in a request header. Create a key in the ToAPIs console, preferably with a spending limit, and copy it. Replace<API_KEY> in the configuration below with this key.Open API TokensAdd the MCP server manually
In Trae, open “设置” (Settings) > “MCP”. In the “MCP Servers 管理” (MCP Servers) section, click “添加” (Add) > “手动添加” (Add manually) at the top right, paste the configuration below (replace<API_KEY> with your key) and click “确认” (Confirm).Install the skills (recommended)
They help the agent pick models and write prompts (needs Node.js; MCP works without them):WorkBuddy
WorkBuddy
Other clients
Other clients
Add a remote MCP server
Add a remote MCP server (Streamable HTTP) with the URL below and choose OAuth sign-in. Leave the client ID and secret empty.No browser sign-in?
Some clients only support header authentication or cannot complete the browser sign-in. Create a dedicated API key in the console and connect with an Authorization: Bearer header.Check the connection
Start a new chat and send the question below. If it shows your balance, the connection works (checking is free). If it asks you to sign in, fails authentication or cannot find the ToAPIs tools, go back and check the steps above.What you can do once connected
Describe what you want in plain words. The agent picks a model, prepares the parameters from its docs, submits the job and follows it up.Generate images
Text to image, edits with reference images, aspect ratio and count.Generate videos
Text to video and image to video, with Seedance recommended by default.Use local files
Give the path of a local image. The agent uploads it and uses it as a reference.create_upload, and follows progress with get_generation. While a job is running, let it finish rather than submit again. If the submission response is lost, reuse the same client_request_id when retrying; a new ID can create another billable job. If the state is unknown, check the console task list before resubmitting. Save the returned result URLs; clients may also download results locally.
Available tools
FAQ
Do I need an API key?
Do I need an API key?
You do not copy one. When you authorize, you pick an existing key on the ToAPIs page or create a dedicated one, and the agent uses it through an access token. Clients that only support header authentication can connect with an API key instead.
How is it billed?
How is it billed?
The same as calling the API: model prices are deducted from the chosen key and your account credits. Listing models, checking the balance and looking up tasks are free. Only image and video generation is charged.
Why does Codex need Full access?
Why does Codex need Full access?
Installing the skills and adding the MCP server writes to the Codex configuration on your computer, and the default permission mode stops the agent from changing files outside the workspace. You only need it for the setup and can switch back afterwards, or run the commands in a terminal yourself.
How do I disconnect?
How do I disconnect?
Disconnect it under Connected apps in the console. This revokes the authorization and disables a dedicated key created for the connection, unless another connection still uses it. Removing toapis in the client, for example with codex mcp remove toapis, only deletes the local configuration.
What is the difference between toapis.com and toapis.cn?
What is the difference between toapis.com and toapis.cn?
The two sites have separate accounts and credits. Accounts on toapis.com use api.toapis.com/mcp, and accounts on toapis.cn use api.toapis.cn/mcp. Signing in on the other site shows a site mismatch.
Which clients are supported?
Which clients are supported?
Most desktop and command-line clients that support remote MCP with OAuth can connect as described under Other clients. If a client’s sign-in fails, connect it with an API key instead. We will keep adding steps for more clients.