RunAPI MCP Server
OfficialThe RunAPI MCP Server connects MCP-compatible AI coding tools to RunAPI's 130+ models from 18+ providers, enabling model discovery, media generation, LLM interaction, and account management across image, video, audio, and utility modalities.
No API key required:
Browse Models (
list_models): Discover available models, filterable by modality (image,video,audio,llm,utility), service, or action.Inspect Model Details (
get_model_info): Retrieve supported endpoints, input constraints, required parameters, enum/range rules, and pricing snapshots for any model.List Endpoint Actions (
list_actions): View all available endpoint action names grouped by output modality.Check Pricing (
check_pricing): Get pricing snapshot data for a specific service + action + model combination.Search Prompt Examples (
search_prompts): Find reusable prompt examples filtered by modality, category, tags, keywords, or model.
Requires API key:
Create Media Tasks (
create_task): Submit image, video, audio, music, or speech generation tasks and optionally poll until completion.Poll Task Status (
get_task): Fetch the current status and output payload for an existing task by ID.Chat with LLMs (
chat): Send prompts to LLM endpoints (e.g., Claude, GPT, Gemini) and receive responses with usage metadata.Check Account Balance (
check_balance): View your RunAPI account balance and spending metrics.
Provides access to ElevenLabs text-to-speech models through the RunAPI platform, enabling AI voice synthesis.
Provides access to Flux image generation models through the RunAPI platform, enabling AI image creation.
Provides access to Suno music generation models through the RunAPI platform, enabling AI music creation.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@RunAPI MCP ServerGenerate an image of a futuristic city using Flux"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
What Is This?
RunAPI MCP Server connects MCP-compatible coding tools to RunAPI. It lets an assistant browse the RunAPI catalog, inspect model inputs, check current pricing snapshots, 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 require RUNAPI_API_KEY.
This package is a pure client. It does not run a local generation backend and does not require changes to your RunAPI account beyond creating an API key for authenticated tools.
Quick Start
For Claude Code, Cursor, Windsurf, and VS Code, install RunAPI with Claude Code's MCP command:
claude mcp add runapi -s user -- npx -y @runapi.ai/mcpThe 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.jsonin the current repo so it can be committed.
Use project scope when you want the whole team to share the same server config:
claude mcp add runapi -s project -- npx -y @runapi.ai/mcpCompatibility fallback for non-Claude Code platforms or manual JSON config:
{
"mcpServers": {
"runapi": {
"command": "npx",
"args": ["-y", "@runapi.ai/mcp"],
"env": {
"RUNAPI_API_KEY": "${RUNAPI_API_KEY}"
}
}
}
}If your host needs a generated config file, use the legacy init command as a fallback:
npx @runapi.ai/mcp init claude
npx @runapi.ai/mcp init cursor
npx @runapi.ai/mcp init vscode
npx @runapi.ai/mcp init windsurf
npx @runapi.ai/mcp init rooFree catalog tools work even when RUNAPI_API_KEY is not configured.
For task creation and balance checks, create an API key in the RunAPI dashboard and expose it as RUNAPI_API_KEY.
Tools
Tool | Auth | Purpose |
| No | List RunAPI models from the embedded catalog. Supports |
| No | Return service, action, modality, input constraints, and pricing snapshot for a model slug. Use |
| No | Group endpoint action names by modality. |
| No | Return pricing snapshot data for a |
| No | Search reusable prompt examples by |
| Yes | Create a media task and optionally poll until completion. |
| Yes | Fetch status and latest payload for an existing media task. |
| Yes | Return account balance and spending metrics. |
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.
Examples
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.
Browse The Catalog
What RunAPI image models are available?Expected behavior:
The assistant calls
list_modelswithmodality: "image".It summarizes the returned model slugs, services, actions, and required fields.
It avoids quoting stale prices unless it calls
check_pricing.
Search Prompt Examples
Find image prompt examples for a logo.Expected behavior:
The assistant calls
search_promptswithmodality: "image"andq: "logo".It summarizes returned titles, prompt text, model slugs, categories, and tags.
It uses the selected prompt with
get_model_infobefore creating a task.
Inspect A Model
Show me the required parameters for this model slug: <model-slug>Expected behavior:
The assistant calls
get_model_info.If the response is ambiguous, it chooses the relevant service/action from the returned matches and calls
get_model_infoagain withserviceandaction.It shows required fields, enum constraints, range constraints, conditional input rules, supported action, and pricing snapshot if present.
It tells you to choose another slug with
list_modelsif the slug is not found.
Create A Media Task
Generate a square product image with RunAPI. Pick a suitable image model.Expected behavior:
The assistant calls
list_modelsto choose a compatible image model.It calls
get_model_infowith the selected service/action/model to validate parameters and any conditional input rules.It asks for confirmation if the request is expensive, long-running, or a batch.
It calls
create_task.It returns task ID, status, output URLs, and cost fields when available.
Submit Without Waiting
Create the task but do not wait for completion.Expected behavior:
The assistant calls
create_taskwithwait: false.It returns the task ID.
You can later ask for status with
get_task.
Check Account Balance
Check my RunAPI balance.Expected behavior:
The assistant calls
check_balance.If no key is configured, it explains how to set
RUNAPI_API_KEY.
Catalog Coverage
The embedded catalog is generated from RunAPI's contract snapshot. It includes media models, utility endpoints, and LLM model slugs for discovery.
Modality | What To Use |
Image |
|
Video |
|
Audio and music |
|
LLM |
|
Utility |
|
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.
For LLM inference, connect through the RunAPI API or SDK directly.
Pricing
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:
Call
list_modelsto find a candidate model.Call
check_pricingwithservice,action, andmodel.Show the returned pricing snapshot or link to runapi.ai/pricing.
Free catalog tools do not create tasks and do not consume account balance.
Platform Setup
Claude Code, Cursor, Windsurf, And VS Code
Run:
claude mcp add runapi -s user -- npx -y @runapi.ai/mcpUse -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.
Compatibility Fallback: Generated Config
Use init only when a host needs a platform-specific JSON file or cannot use the Claude Code MCP command.
Claude Code fallback:
npx @runapi.ai/mcp init claudeThis writes .mcp.json in the current directory.
Cursor fallback:
npx @runapi.ai/mcp init cursorThis writes .cursor/mcp.json.
Open Cursor settings to verify the MCP server is enabled.
VS Code fallback:
npx @runapi.ai/mcp init vscodeThis writes .vscode/mcp.json.
VS Code uses a top-level servers key and type: "stdio" in generated config.
Windsurf fallback:
npx @runapi.ai/mcp init windsurfThis writes the generated config for the Windsurf target used by the init command.
Roo Code
Run:
npx @runapi.ai/mcp init rooThis writes .roo/mcp.json.
Manual Configuration
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:
npx -y @runapi.ai/mcpConfiguration
The server reads configuration in this order:
RUNAPI_API_KEYenvironment variable~/.config/runapi/config.jsonNo key, which still allows free catalog tools
Example config file:
{
"apiKey": "your_runapi_key"
}You can also set a custom base URL for local testing:
{
"apiKey": "your_runapi_key",
"baseUrl": "https://runapi.ai"
}Do not commit real API keys.
Data Sync
This package ships build-time data files:
data/contract.json: catalog, actions, model slugs, and input constraintsdata/pricing.json: pricing snapshot used bycheck_pricing
Refresh data from the RunAPI source tree before a release:
npm run sync:dataBuild-time data means a pricing or catalog update requires a new package release.
Development
npm install
npm run typecheck
npm test
npm pack --dry-runRun the server locally:
npm run devManual initialize smoke test:
printf '%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.tsPackage Contents
The npm package includes:
compiled
dist/filesembedded
data/filesplatform examples
eval scenarios, when generated by this repo
README, changelog, license, and package metadata
It does not include node_modules, .env, local config files, or API keys.
Also Available Via CLI
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.
License
Licensed under the Apache License, Version 2.0.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/runapi-ai/mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server