RunAPI MCP Server is used to connect RunAPI's model invocation capabilities within MCP-compatible coding tools. According to the repository description, it covers image generation, video generation, music creation, text-to-speech, prompt search, and model discovery, with a total of 160+ executable models, covering 4 categories of modalities, and supports 130+ models from 18 providers.
-
Purpose The server enables AI assistants to browse the RunAPI catalog, view model input requirements, query current runtime pricing, create media tasks, poll task status, and check account balance. It is aimed at top-of-funnel discovery within coding tools as well as authenticated workflow operations.
-
Main Capabilities
- Model discovery: browse available models by modality via list_models, returning model slug, service, action, and required fields.
- Model information: view required fields, enum constraints, range constraints, conditional input rules, supported actions, and current runtime pricing via get_model_info.
- Pricing queries: query current prices via check_pricing, or be directed to runapi.ai/pricing.
- Prompt search: search prompt examples by modality and keyword via search_prompts, returning title, prompt text, model slug, category, and tags.
- Media task creation: create image, video, music, speech, and other media tasks via create_task, supporting either waiting for completion or submitting only and then polling.
- Task status: query task status via get_task.
- Balance query: check account balance via check_balance.
- Login: perform browser login via the login tool, with credentials saved to ~/.config/runapi/config.json.
- How to Use Installation: can be installed via Claude Code's MCP command, using -s user for a global installation, or using -s project to write .mcp.json in the current repository for team sharing. For platforms that do not support the Claude Code MCP command, the init command can be used to generate platform-specific JSON configuration files, with supported outputs including .mcp.json (Claude Code), .cursor/mcp.json (Cursor), .vscode/mcp.json (VS Code, using the top-level servers key with type: "stdio"), Windsurf configuration, and .roo/mcp.json (Roo Code).
Configuration read order is: RUNAPI_API_KEY environment variable (suitable for headless and CI hosts), ~/.config/runapi/config.json (created by the login tool or runapi login), no key (free directory tools are still available). The configuration file is usually managed by login; headless environments can provide the configuration in advance. A custom base URL is supported for local testing. Do not commit real API keys.
Remote MCP clients can connect directly without installing Node.js; when the client supports remote MCP authorization, use OAuth, or configure the RunAPI API key as a bearer credential. The hosted MCP exposes eight Business Tools; local Login is only available in the Local MCP package.
create_task requires an opaque idempotency_key of 1 to 512 characters; generate a new key for each logical task and keep it together with the exact service, action, model, and params. If the creation result is unknown due to a closed connection or timeout, do not automatically create a new task; only use the same key with the same input when intentionally retrying. Reusing the same key with different input returns a conflict. Do not derive this key from the JSON-RPC request ID or X-Client-Request-Id.
When wait: true, the hosted MCP keeps the asynchronous create_task open as a request-scoped SSE for up to 300 seconds, polling about every 5 seconds and sending an SSE heartbeat about every 15 seconds; notifications/progress is sent only when the MCP client provides a progressToken. The final JSON-RPC response is returned in the same stream and then closed. If Completion Wait reaches the deadline, task creation still succeeds, and the result includes wait_deadline_reached: true and next_action: "get_task"; you should continue with get_task rather than creating a replacement task. If polling fails or the connection closes after task creation, the taskmay still be processing, and you should also continue with get_task.
IV. Applicable Scenarios Suitable for MCP-compatible hosts such as Claude Code, Codex, Cursor, Windsurf, VS Code, and Roo Code; suitable for model discovery, pricing queries, and authenticated media generation task submission and status tracking within coding tools. Also suitable for headless and CI hosts, authenticating via RUNAPI_API_KEY. For local testing, you can run the server and perform a manual initialize smoke test.
V. Limitations This package is a pure client and does not run a local generation backend; it only requires RunAPI login when calling authenticated tools. Free directory tools do not create tasks and do not consume account balance. Directory content may change with versions; pricing is queried through the runtime API and does not use an in-package snapshot, so specific prices should be based on check_pricing or the public pricing page. Contract updates require publishing a new package version. The npm package does not include node_modules, .env, local configuration files, or API keys. The project is licensed under the Apache License 2.0. Features, charges, prices, platforms, effects, or usage steps not mentioned above are not currently provided in the materials.