MCP Setup Guide
Connect AI agents to ToAPIs through MCP and generate images and videos with 200+ models.
Connect ToAPIs to the agents you already use through MCP. Sign in with your browser instead of copying an API key. The agent picks the model, reads its parameters, submits the job and brings back the result.
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.
| Site | MCP endpoint |
|---|---|
| International | https://api.toapis.com/mcp |
| Mainland China | https://api.toapis.cn/mcp |
Before connecting
Use a client that supports remote MCP over Streamable HTTP. Optional ToAPIs skills help with model selection and prompts; their npx 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
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.
How many ToAPIs credits do I have left, and how much did I spend today?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.
Use ToAPIs to generate a 16:9 image of a lighthouse at dawnGenerate videos
Text to video and image to video, with Seedance recommended by default.
Turn this product photo into a 5-second vertical promo videoUse local files
Give the path of a local image. The agent uploads it and uses it as a reference.
Use ./product.png as a reference and put the product on a white backgroundThe agent reads the model documentation before generating, uploads local references with 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
| Tool | Purpose |
|---|---|
list_models | List image and video models available to the current key, including prices and docs_available. |
get_model_docs | Read model parameters before generation. Choose a model with docs_available: true. |
generate_image | Generate images. Billable. |
generate_video | Generate videos. Billable. |
get_generation | Check an MCP generation by client_request_id. |
get_task | Check an image or video task by task_id. |
create_upload | Create a one-time upload URL for a local image, video or audio file. |
get_balance | Check the key quota and account balance. |
list_tasks | List recent tasks for the current key. |
get_usage | Summarize charges for the current key over a time range (up to 31 days). Refunds are not subtracted. |