list_models
List RunAPI models from the embedded catalog. Optional filters: modality, service, or action.
actionservicemodality
io.github.runapi-builder由 GitHub 账号 runapi-builder 发布v0.17.0更新于 Nov 3, 2026
130+ AI models for image, video, music, and audio — 18 model families, one RunAPI account.
RunAPI MCP 让助手浏览 160 多个图像、视频、音乐和音频模型,查询价格、创建媒体生成任务并查看账户余额。
Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。
把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。
阅读 https://sourceweft.com/mcp/io.github.runapi-builder%2Frunapi-mcp/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。把它添加到你客户端的 mcpServers 配置中。 客户端会在首次连接时完成 OAuth 登录。
{
"mcpServers": {
"runapi": {
"type": "http",
"url": "https://mcp.runapi.ai/mcp"
}
}
}AI image generation, video generation, music creation, text-to-speech, prompt search, and model discovery — 160+ executable models across 4 modalities in one MCP server.
Works with Claude Code, Codex, Cursor, Windsurf, VS Code, Roo Code, and any MCP-compatible host.
[npm version] [Apache-2.0 license] [MCP Server] [160+ models]
Quick Start | Tools | Examples | Catalog | Platforms
RunAPI MCP Server connects MCP-compatible coding tools to RunAPI. It lets an assistant browse the RunAPI catalog, inspect model inputs, check current runtime pricing, create media tasks, poll task status, and check account balance.
The discovery tools work without an API key because they use the embedded build-time catalog.
Authenticated operations use the login tool, runapi login, RUNAPI_API_KEY, or shared RunAPI config.
This package is a pure client. It does not run a local generation backend and only needs RunAPI sign-in for authenticated tools.
Remote MCP clients can connect directly to:
No Node.js installation is required. Use OAuth when the client supports remote MCP authorization, or configure a RunAPI API key as the bearer credential. See the Hosted MCP setup page for Cursor, Claude Desktop, VS Code, and Windsurf configurations.
Hosted MCP exposes the eight Business Tools documented below. Local Login remains available only in the Local MCP package.
For Local MCP over stdio, install RunAPI with Claude Code's MCP command:
The scope flag controls where the MCP server is stored:
-s user: global, available in all projects for your user.-s project: team-shared, written to .mcp.json in the current repo so it can be committed.Use project scope when you want the whole team to share the same server config:
Compatibility fallback for non-Claude Code platforms or manual JSON config:
If your host needs a generated config file, use the legacy init command as a fallback:
Free catalog tools work before sign-in.
For task creation, task status, and balance checks, ask your assistant to call the login tool. It opens a browser login and saves credentials to ~/.config/runapi/config.json, the same file used by runapi login.
Headless and CI hosts can still set RUNAPI_API_KEY before starting the MCP host.
The catalog, pricing, and prompt search tools are designed for funnel-top discovery inside coding tools. The task and balance tools are designed for authenticated workflows.
Ask your assistant natural-language questions. The assistant should use the tools to discover current model slugs and pricing instead of relying on memorized names.
Expected behavior:
list_models with modality: "image".check_pricing.Expected behavior:
search_prompts with modality: "image" and q: "logo".get_model_info before creating a task.Expected behavior:
get_model_info.get_model_info again with service and action.list_models if the slug is not found.Expected behavior:
list_models to choose a compatible image model.get_model_info with the selected service/action/model to read the parameter descriptions.idempotency_key for this logical task and calls create_task.Hosted MCP keeps an asynchronous create_task call with wait: true open as request-scoped SSE for up to 300 seconds. It polls about every 5 seconds, sends an SSE heartbeat about every 15 seconds, and sends standard notifications/progress only when the MCP client supplied a progressToken. The terminal JSON-RPC response arrives in that same stream and then closes it.
The terminal tool result includes matching structuredContent and text content with task_id, final status, completed: true, and the RunAPI result. See examples/create-task-and-wait.arguments.json.
Expected behavior:
idempotency_key and calls create_task with wait: false.get_task.create_task requires an opaque idempotency_key from 1 to 512 characters. Generate one new key for each logical task and retain it with the exact service, action, model, and params used for that task.
If the create result is unknown because the connection closed or timed out, do not automatically create another task. Retry only when intended, using the same key with the same input. Reusing the key with different input returns a conflict. Do not derive the key from a JSON-RPC request ID or X-Client-Request-Id.
When Completion Wait reaches its deadline, task creation remains successful. The non-error result has matching structured and text content with task_id, latest status, completed: false, wait_deadline_reached: true, and next_action: "get_task". Continue with get_task; do not create a replacement task.
If polling fails or the connection closes after task creation, the task may still be processing. Continue with get_task; do not create a replacement task.
See examples/create-task.arguments.json for submit-only arguments.
Expected behavior:
check_balance.login for browser login, or explains RUNAPI_API_KEY for headless hosts.The MCP Embedded Catalog is generated from RunAPI's contract snapshot. It includes only models executable by this server release.
Catalog contents can change between releases.
Use list_models for current service/action/model slugs and get_model_info for each model's current constraints.
RunAPI pricing is exposed through the check_pricing tool and the public pricing page.
Do not rely on examples in README files for exact prices.
Useful flows:
list_models to find a candidate model.check_pricing with service, action, and model.Free catalog tools do not create tasks and do not consume account balance.
Run:
Use -s user for a global install available in all projects.
Use -s project when you want Claude Code to write .mcp.json in the repo for team-shared config.
Restart or reload your MCP host after changing MCP configuration.
Use init only when a host needs a platform-specific JSON file or cannot use the Claude Code MCP command.
Claude Code fallback:
This writes .mcp.json in the current directory.
Cursor fallback:
This writes .cursor/mcp.json.
Open Cursor settings to verify the MCP server is enabled.
VS Code fallback:
This writes .vscode/mcp.json.
VS Code uses a top-level servers key and type: "stdio" in generated config.
Windsurf fallback:
This writes the generated config for the Windsurf target used by the init command.
Run:
This writes .roo/mcp.json.
Use the example files in examples/ as starting points.
Each platform has slightly different wrapper keys and file paths, but all run the same command:
The server reads configuration in this order:
RUNAPI_API_KEY environment variable, useful for headless and CI hosts~/.config/runapi/config.json, created by the MCP login tool or runapi loginThe config file is normally managed by login. A pre-provisioned headless config can use:
You can also set a custom base URL for local testing:
Do not commit real API keys.
This package ships build-time contract data:
data/contract.json: catalog, actions, model slugs, and input constraintsRefresh data from the RunAPI source tree before a release:
Contract updates require a new package release. Pricing is queried from the RunAPI runtime API and does not use a package snapshot.
Run the server locally:
Manual initialize smoke test:
The npm package includes:
dist/ filesdata/ filesIt does not include node_modules, .env, local config files, or API keys.
RunAPI also has a separate command-line client for terminal workflows. Use this MCP server when you want RunAPI available inside an MCP host. Use the CLI when you want direct shell commands, scripts, or CI integration.
Licensed under the Apache License, Version 2.0.
来源:README.md,提交 6db9fa1
List RunAPI models from the embedded catalog. Optional filters: modality, service, or action.
actionservicemodalityGet supported endpoint, current runtime pricing, and input constraints for a RunAPI model slug. Add service and action when the model supports multiple endpoints.
model必填actionserviceList RunAPI endpoint names grouped by output modality.
无需输入参数。
Return current runtime pricing for a RunAPI model/action pair.
modelaction必填service必填Search RunAPI prompt examples by modality, category, tags, text query, or model. Each prompt includes its approved example images in media; example videos and reference images are not returned. Free, no API key required.
qpagetagsmodelcategorymodalityper_pageReturn the authenticated RunAPI account balance and spending metrics.
无需输入参数。
Run a RunAPI operation with a caller-generated idempotency key. Asynchronous operations can optionally poll until completion.
waitmodelaction必填paramsservice必填timeout_msidempotency_key必填poll_interval_msFetch the current status and latest payload for an existing RunAPI task.
actionservice必填task_id必填Authenticate RunAPI by opening a browser PKCE login flow and saving the API key to ~/.config/runapi/config.json.
force已满足适用检查项的 100%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
https://mcp.runapi.ai/mcpclaude mcp add runapi -s user -- npx -y @runapi.ai/mcpclaude mcp add runapi -s project -- npx -y @runapi.ai/mcp{ "mcpServers": { "runapi": { "command": "npx", "args": ["-y", "@runapi.ai/mcp"] } }}npx @runapi.ai/mcp init claudenpx @runapi.ai/mcp init cursornpx @runapi.ai/mcp init vscodenpx @runapi.ai/mcp init windsurfnpx @runapi.ai/mcp init rooWhat RunAPI image models are available?Find image prompt examples for a logo.Show me the required parameters for this model slug: <model-slug>Generate a square product image with RunAPI. Pick a suitable image model.Create the task but do not wait for completion.Check my RunAPI balance.claude mcp add runapi -s user -- npx -y @runapi.ai/mcpnpx @runapi.ai/mcp init claudenpx @runapi.ai/mcp init cursornpx @runapi.ai/mcp init vscodenpx @runapi.ai/mcp init windsurfnpx @runapi.ai/mcp init roonpx -y @runapi.ai/mcp{ "apiKey": "your_runapi_key"}{ "apiKey": "your_runapi_key", "baseUrl": "https://runapi.ai"}npm run sync:datanpm installnpm run typechecknpm testnpm pack --dry-runnpm run devprintf '%s\n' '{"jsonrpc":"2.0","method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"0.1.0"}},"id":1}' | npx tsx src/index.ts