MCP for AI assistants
Generate images, videos and speech with RuToken.ai directly inside Claude, ChatGPT, Claude Code, Cursor and other MCP clients.
RuToken.ai runs a remote MCP server, so AI assistants can check your balance and generate images, videos and speech for you right inside the chat.
Before you start
- An account on RuToken.ai with some balance. You can sign up during the first connection.
- The MCP server URL:
https://rutoken.ai/mcp
The server uses the Streamable HTTP transport. Web clients sign in with OAuth 2.1; developer clients can also send an API key as Authorization: Bearer sk-xxxx.
MCP must be enabled by the site administrator under System Settings → Operations → MCP Server. If it is not enabled, https://rutoken.ai/mcp returns 404.
Claude (claude.ai)
- Open Customize → Connectors, click Add and choose Add custom connector.
- Enter a name (for example,
RuToken.ai) and the URLhttps://rutoken.ai/mcp, then click Connect. - A pop-up opens the RuToken.ai sign-in page. Sign in, or sign up if you are new.
- The consent page Connect Claude to RuToken.ai lists what the connection can do. Optionally turn on Limit how much this connection can spend and enter an amount in the site currency, and pick a group. Click Allow; the pop-up closes.
- In a chat, enable the connector from the + menu and ask, for example:
Use gpt-image-2 to draw a cat on the moon.
- Team / Enterprise: an organization Owner first adds the custom connector under Organization settings → Connectors; then each member connects it with their own account.
- The Free plan allows one custom connector.
- Connectors added on the web are also available in the Claude mobile apps.
ChatGPT
- Open Settings → Apps & Connectors and turn on Developer mode.
- Create a connector (Add custom MCP server) with the URL
https://rutoken.ai/mcp. - Sign in and click Allow on the consent page, as described for Claude above.
The Plus plan supports this. Menu names may vary as ChatGPT updates.
Claude Code
Add the server, then sign in with OAuth:
claude mcp add --transport http rutoken-ai https://rutoken.ai/mcp
Start Claude Code, run /mcp, select the server and choose Authenticate. A browser window opens for sign-in and consent.
To use an API key instead of OAuth, create a key on the API Keys page and pass it as a header:
claude mcp add --transport http rutoken-ai https://rutoken.ai/mcp \
--header "Authorization: Bearer sk-xxxx"
Cursor and other clients
Any client that supports remote (Streamable HTTP) MCP servers can connect with the URL. For example, in Cursor's mcp.json:
{
"mcpServers": {
"rutoken-ai": {
"url": "https://rutoken.ai/mcp",
"headers": {
"Authorization": "Bearer sk-xxxx"
}
}
}
}
Omit headers if the client supports OAuth sign-in.
Tools
| Tool | What it does | Billing |
|---|---|---|
get_balance |
Wallet balance and the remaining quota of this connection's key. | Free |
list_models |
Available models by type: image, video, audio (text-to-speech) or text. |
Free |
get_usage |
Your recent paid calls. | Free |
generate_image |
Generates images from prompt and model; optional size, n (1–4) and reference_images (up to 16 URLs) for image-to-image and editing. |
Paid |
generate_video |
Starts a video task from prompt and model; optional duration, size, aspect_ratio and a first-frame image URL. Returns a task_id immediately. |
Paid |
get_video_task |
Status and progress of a video task. When it is completed, returns a playable link valid for 7 days. | Free |
list_voices |
Voices of a text-to-speech model; optional language (e.g. zh, en) and query filters. |
Free |
generate_speech |
Reads text aloud with model and voice (up to 5,000 characters); optional speed (0.5–2.0) and format (mp3, wav, flac). Returns an audio link. |
Paid |
You do not need to call the tools by name — describe what you want and the assistant picks the right tool.
Billing and storage
- Calls cost the same as the regular API and are charged to your balance.
- Every call appears in Usage Logs; video tasks also appear in Task Logs. Failed video tasks are refunded.
- Generated images and speech are kept on RuToken.ai for 30 days and video links expire after 7 days — download videos you want to keep.
Disconnect
Each authorization creates an API key named MCP · <client name> (for example, MCP · Claude) on the API Keys page. Delete or disable that key to revoke access immediately. Removing the connector in the client also stops it.
Troubleshooting
| Symptom | Fix |
|---|---|
Couldn't connect / 404 |
MCP is not enabled on this site. Ask the administrator to enable it under System Settings → Operations → MCP Server. |
| Sent back to the sign-in page repeatedly | Allow pop-ups and third-party cookies for the site in your browser, then connect again. |
| Insufficient balance | The assistant replies with a top-up link. Top up on the Wallet page and try again. |
| Model not available | Ask the assistant to call list_models and pick a model from the list. |
| Claude Code cannot reach a local test server | A system proxy may intercept localhost. Set NO_PROXY=localhost,127.0.0.1,::1 before starting Claude Code. |