---
title: &quot;RunAPI MCP Server — 為 Claude Code、Cursor 與 VS Code 提供 210+ 個 AI 模型&quot;
url: &quot;https://runapi.ai/zh-HK/mcp.md&quot;
canonical: &quot;https://runapi.ai/zh-HK/mcp&quot;
locale: &quot;zh-HK&quot;
---

# RunAPI MCP Server

將 Claude Code、Cursor、VS Code、Windsurf，以及任何相容 MCP 的 host 連接到 RunAPI — 無需離開編輯器，即可生成圖像、影片、音樂，並呼叫 LLM。

## What Is RunAPI MCP Server?

RunAPI MCP Server 會將相容 MCP 的編碼工具連接到 RunAPI 平台。它讓您的 AI assistant 可瀏覽 23 個 provider 的 210+ 個模型、檢視輸入參數、查看即時定價、建立媒體生成任務、輪詢任務狀態、查看帳戶餘額，並呼叫 LLM endpoint——全部都可在編輯器內完成。探索工具無需 API key。需要驗證的操作則必須使用 RunAPI API key。

## Tools

| Tool | Auth | Purpose |
|---|---|---|
| list_models | No | Browse models by modality, service, or action. |
| get_model_info | No | Inspect input params, constraints, and pricing for a model. |
| list_actions | No | Group endpoint action names by output modality. |
| check_pricing | No | Return pricing snapshot for a service + action + model. |
| create_task | Yes | Create a media task and optionally poll until completion. |
| get_task | Yes | Fetch status and latest payload for an existing task. |
| check_balance | Yes | Return account balance and spending metrics. |
| chat | Yes | Send messages to a RunAPI LLM endpoint. |

## Quick Start

Choose the command for your MCP client.

### Claude Code

```bash
claude mcp add runapi -s user -- npx -y @runapi.ai/mcp
export RUNAPI_API_KEY="runapi_xxx"
claude
```

Use project scope when you want the repo to share `.mcp.json`:

```bash
claude mcp add runapi -s project -- npx -y @runapi.ai/mcp
```

### Codex

```bash
codex plugin install runapi-mcp@agents
export RUNAPI_API_KEY="runapi_xxx"
codex
```

### Cursor

```bash
npx @runapi.ai/mcp init cursor
export RUNAPI_API_KEY="runapi_xxx"
cursor .
```

### Windsurf

```bash
npx @runapi.ai/mcp init windsurf
export RUNAPI_API_KEY="runapi_xxx"
windsurf .
```

### VS Code

```bash
npx @runapi.ai/mcp init vscode
export RUNAPI_API_KEY="runapi_xxx"
code .
```

### Roo Code

```bash
npx @runapi.ai/mcp init roo
export RUNAPI_API_KEY="runapi_xxx"
code .
```

Free catalog tools work without a key.
Set `RUNAPI_API_KEY` for `create_task`, `check_balance`, and `chat`.
For GUI-launched clients, add the variable in the client's environment settings.

## Model Coverage

- **Image** — Flux Kontext, Nano Banana, GPT Image, Seedream, Ideogram, Qwen
- **Video** — Kling, Veo, Seedance, Hailuo, Wan, Runway, Luma
- **Music** — Suno v4 / v4.5 / v5 / v5.5
- **Audio** — ElevenLabs TTS, Sound Effects, STT, Isolation
- **LLM** — Claude, GPT, Gemini, DeepSeek

## FAQ

### 可以喺 CI 或無頭環境使用 MCP server 嗎？

可以。設定 RUNAPI_API_KEY environment variable，並喺你的 agent 或 CI pipeline 配置 MCP server。伺服器會以 stdio process 運行，唔需要 browser 或 GUI。

### MCP server 支援邊些 coding tools？

RunAPI MCP Server 支援任何相容 MCP 的 host：Claude Code、Codex、Cursor、VS Code（透過 GitHub Copilot）、Windsurf 同 Roo Code。亦可以配置任何支援 MCP protocol 的工具。


## Links

- [Model catalog](https://runapi.ai/zh-HK/models)
- [CLI](https://runapi.ai/zh-HK/cli)
- [SDKs](https://runapi.ai/zh-HK/sdk)
- [Skills](https://runapi.ai/zh-HK/skills)
- [Pricing](https://runapi.ai/zh-HK/pricing)
- [API docs](https://runapi.ai/zh-HK/docs)
- [GitHub](https://github.com/runapi-ai/mcp)
- [npm](https://www.npmjs.com/package/@runapi.ai/mcp)
