---
title: Local MCP | RunAPI
description: Run the RunAPI MCP Server locally with Claude Code, Cursor, VS Code,
  Windsurf, or another stdio client.
url: https://runapi.ai/docs/resources/mcp/local.md
canonical: https://runapi.ai/docs/resources/mcp/local
locale: en
---

> HTML version: https://runapi.ai/docs/resources/mcp/local
> Site index for agents: https://runapi.ai/llms.txt

# Local MCP

Local MCP lets your MCP client start the RunAPI MCP Server on your
machine. Use it when the client does not support Remote MCP or you
explicitly need a local process.

## Before you start

Install Node.js and confirm `npx` is available. Your MCP client must
support local stdio servers.

Every client below starts the same command:

```shell
npx -y @runapi.ai/mcp
```

You can connect and use catalog tools without signing in.

## Claude Code

Run:

```shell
claude mcp add runapi -s user -- npx -y @runapi.ai/mcp
```

Use `-s user` to make RunAPI available across your projects. Restart
Claude Code if it was already running, then confirm RunAPI is listed as
an MCP server.

## Cursor

Add the server under `mcpServers` in `.cursor/mcp.json` or your user MCP
configuration:

```json
{
  "mcpServers": {
    "runapi": {
      "command": "npx",
      "args": ["-y", "@runapi.ai/mcp"]
    }
  }
}
```

Open **Customize** in the Cursor sidebar, find RunAPI, and enable it. If
the process does not start, open the **Output** panel and select **MCP
Logs**.

## VS Code

1.  Open the Command Palette and run **MCP: Add Server**.
2.  Choose **Command (stdio)** and enter `npx -y @runapi.ai/mcp`.
3.  Name the server **RunAPI**, choose its configuration scope, and
    start it.
4.  Trust the server when prompted. For errors, run **MCP: List
    Servers**, select RunAPI, and choose **Show Output**.

VS Code stores manual configuration under the top-level `servers` key
and uses `type: "stdio"`.

## Windsurf

These steps apply to the Cascade agent. Devin Local uses Devin CLI
configuration.

1.  Open **Devin Settings > Cascade > MCP Servers**.
2.  Open the raw MCP configuration at
    `~/.codeium/windsurf/mcp_config.json`.
3.  Add RunAPI with the `npx` command and arguments shown in the Cursor
    example above.
4.  Save the file, refresh the MCP servers, and enable RunAPI.

## Other MCP clients

Add a local stdio server named **RunAPI**. Set its command to `npx` and
its arguments to `-y` and `@runapi.ai/mcp`. Restart or refresh the
client after saving the configuration.

## Verify the connection

Ask your client:

> What RunAPI image models are available?

The client should call `list_models` and return available image models.
This public discovery tool does not require authentication.

## Sign in when needed

Keep using discovery tools without signing in. When you first ask RunAPI
to create a task, retrieve a task, or check a balance, let the client
call the `login` tool. It opens RunAPI in your browser and saves the
credential to the shared local configuration.

If you prefer to sign in from a terminal, install the [RunAPI
CLI](https://runapi.ai/docs/resources/cli.md) and run:

```shell
runapi login
```

For headless or CI clients, follow the [Authentication
Guide](https://runapi.ai/docs/guides/authentication.md) to create a dedicated standard API
key, then provide it as `RUNAPI_API_KEY` through the client's
environment or secret configuration. An environment key takes precedence
over the credential saved by Local MCP Login.

## Troubleshoot

* `npx` is not found: confirm `node --version` and `npx --version` work,
  then fully restart the MCP client so it receives the updated
  environment.
* The local server exits immediately: run `npx -y @runapi.ai/mcp` in a
  terminal, correct the reported Node.js or package error, then restart
  the client.
* RunAPI tools do not appear: confirm the server is enabled and that the
  command uses stdio, then check the client log described above.
* An authenticated tool fails: ask the client to call the `login` tool.
  If `RUNAPI_API_KEY` is set, update or remove it before trying Local
  MCP Login again.

Prefer a connection without a local Node.js process? [Set up Hosted
MCP](https://runapi.ai/docs/resources/mcp/hosted.md).

---

## More from RunAPI

- [Home](https://runapi.ai/.md)
- [Models](https://runapi.ai/models.md)
- [AI Video API Comparison](https://runapi.ai/ai-video-api-comparison.md)
- [OpenClaw Integration](https://runapi.ai/openclaw.md)
- [Best API for OpenClaw](https://runapi.ai/best-api-for-openclaw.md)
- [OpenClaw Image Generation](https://runapi.ai/openclaw-image-generation.md)
- [Hermes Agent Integration](https://runapi.ai/hermes-agent.md)
- [Pricing](https://runapi.ai/pricing.md)
- [Claude API Pricing](https://runapi.ai/claude-api-pricing.md)
- [ChatGPT API Pricing](https://runapi.ai/chatgpt-api-pricing.md)
- [OpenAI API Pricing](https://runapi.ai/openai-api-pricing.md)
- [Gemini API Pricing](https://runapi.ai/gemini-api-pricing.md)
- [Claude Code Pricing](https://runapi.ai/claude-code-pricing.md)
- [Claude Code API](https://runapi.ai/claude-code-api.md)
- [Claude Code vs Cursor](https://runapi.ai/claude-code-vs-cursor.md)
- [Claude Max vs API](https://runapi.ai/claude-max-vs-api.md)
- [Requesty Alternative](https://runapi.ai/requesty-alternative.md)
- [Docs](https://runapi.ai/docs/guides)
- [SDK](https://runapi.ai/sdk.md)
- [Skills](https://runapi.ai/skills.md)
- [MCP Server](https://runapi.ai/mcp.md)
- [CLI](https://runapi.ai/cli.md)
- [Feedback](https://runapi.ai/)
- [Contact](mailto:support@runapi.ai)
- [Terms](https://runapi.ai/terms.md)
- [Privacy](https://runapi.ai/privacy.md)
- [Site index for agents](https://runapi.ai/llms.txt)

Contact: contact@runapi.ai

## Structured data

```json
[
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "WebSite",
    "name": "RunAPI",
    "url": "https://runapi.ai/",
    "potentialAction": {
      "@type": "SearchAction",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://runapi.ai/models?q={search_term_string}"
      },
      "query-input": "required name=search_term_string"
    }
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "Organization",
    "name": "RunAPI",
    "url": "https://runapi.ai/",
    "logo": {
      "@type": "ImageObject",
      "url": "https://runapi.ai/icon.svg"
    },
    "sameAs": [
      "https://github.com/runapi-ai"
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "TechArticle",
    "headline": "Local MCP",
    "description": "Run the RunAPI MCP Server locally with Claude Code, Cursor, VS Code, Windsurf, or another stdio client.",
    "url": "https://runapi.ai/docs/resources/mcp/local",
    "mainEntityOfPage": "https://runapi.ai/docs/resources/mcp/local"
  }
]
```
