> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runpod.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Use Runpod's MCP servers

> Connect AI tools to Runpod using the Model Context Protocol for infrastructure management and documentation access.

Runpod provides two [Model Context Protocol (MCP)](https://modelcontextprotocol.io) servers that connect AI tools and coding agents directly to Runpod:

* **[Runpod API MCP server](#runpod-api-mcp-server):** Manage Pods, endpoints, templates, volumes, and registries through the Runpod REST API. Requires a [Runpod API key](/get-started/api-keys).
* **[Runpod docs MCP server](#runpod-docs-mcp-server):** Search Runpod documentation for features, code examples, and guides. No authentication required.

## Runpod API MCP server

The Runpod API MCP server gives AI tools access to the [Runpod REST API](/api-reference/overview), letting you create and manage Pods, Serverless endpoints, templates, network volumes, and container registries through natural language.

**Endpoint:** Available via npm package `@runpod/mcp-server`

**Source code:** [github.com/runpod/runpod-mcp](https://github.com/runpod/runpod-mcp)

**Authentication:** Requires a [Runpod API key](/get-started/api-keys)

### Supported clients

* [Claude Code](#claude-code)
* [Codex CLI](#codex-cli)
* [Cursor](#cursor)
* [VS Code with Copilot](#vs-code-with-copilot)
* [Claude Desktop](#claude-desktop)
* [Windsurf](#windsurf)
* [Cline](#cline)
* [Gemini CLI](#gemini-cli)

### Claude Code

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
claude mcp add runpod --scope user -e RUNPOD_API_KEY=your_api_key_here -- npx -y @runpod/mcp-server@latest
```

Replace `your_api_key_here` with your Runpod API key. The `--scope user` flag makes the server available across all your projects. Run `/mcp` inside Claude Code to verify the connection.

### Codex CLI

[Codex CLI](https://github.com/openai/codex) is OpenAI's terminal-based coding agent.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
codex mcp add runpod --env RUNPOD_API_KEY=your_api_key_here -- npx -y @runpod/mcp-server@latest
```

### Cursor

Add the following to `.cursor/mcp.json` (project-level) or `~/.cursor/mcp.json` (global). This configuration works with both the Cursor IDE and the [Cursor Agent](https://cursor.com/docs/cli/mcp):

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "mcpServers": {
    "runpod": {
      "command": "npx",
      "args": ["-y", "@runpod/mcp-server@latest"],
      "env": {
        "RUNPOD_API_KEY": "your_api_key_here"
      }
    }
  }
}
```

### VS Code with Copilot

1. Open the Command Palette (Ctrl+Shift+P on Windows/Linux or Cmd+Shift+P on macOS).
2. Run **MCP: Add Server** and select **stdio**.
3. Enter the following details:
   * **Name:** `Runpod`
   * **Command:** `npx`
   * **Arguments:** `-y @runpod/mcp-server@latest`
4. Add environment variable `RUNPOD_API_KEY` with your Runpod API key.
5. Select **Global** or **Workspace** and click **Add**.

### Claude Desktop

Add the following to your Claude Desktop config file:

* **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
* **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "mcpServers": {
    "runpod": {
      "command": "npx",
      "args": ["-y", "@runpod/mcp-server@latest"],
      "env": {
        "RUNPOD_API_KEY": "your_api_key_here"
      }
    }
  }
}
```

Restart Claude Desktop after saving the file.

### Windsurf

Edit `~/.codeium/windsurf/mcp_config.json` (or open from **Settings** > **Cascade** > **MCP Servers** > **View raw config**):

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "mcpServers": {
    "runpod": {
      "command": "npx",
      "args": ["-y", "@runpod/mcp-server@latest"],
      "env": {
        "RUNPOD_API_KEY": "your_api_key_here"
      }
    }
  }
}
```

### Cline

Open the Cline sidebar in VS Code, click the **MCP Servers** icon, then select **Configure MCP Servers** to edit `cline_mcp_settings.json`:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "mcpServers": {
    "runpod": {
      "command": "npx",
      "args": ["-y", "@runpod/mcp-server@latest"],
      "env": {
        "RUNPOD_API_KEY": "your_api_key_here"
      },
      "disabled": false
    }
  }
}
```

### Gemini CLI

Add to `~/.gemini/settings.json` (global) or `.gemini/settings.json` (project-level):

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "mcpServers": {
    "runpod": {
      "command": "npx",
      "args": ["-y", "@runpod/mcp-server@latest"],
      "env": {
        "RUNPOD_API_KEY": "your_api_key_here"
      }
    }
  }
}
```

### Other clients

For any other MCP-compatible client, use the following connection details:

* **Command:** `npx`
* **Args:** `-y @runpod/mcp-server@latest`
* **Environment:** `RUNPOD_API_KEY=your_api_key_here`

### Usage examples

Once connected, you can interact with your Runpod resources using natural language:

```
List all my Runpod Pods
```

```
Create a new Runpod Pod with the following specifications:
- Name: ml-training-pod
- Image: runpod/pytorch:2.1.0-py3.10-cuda11.8.0-devel-ubuntu22.04
- GPU Type: NVIDIA GeForce RTX 4090
- GPU Count: 1
- Cloud Type: SECURE
```

```
Create a Runpod Serverless endpoint with the following configuration:
- Name: image-generation-endpoint
- Template ID: 30zmvf89kd
- Minimum workers: 0
- Maximum workers: 5
```

```
Stop the Pod named "ml-training-pod"
```

## Runpod docs MCP server

The Runpod docs MCP server provides access to Runpod's documentation knowledge base, making it easier to get answers about features and how to use them.

**Endpoint:** `https://docs.runpod.io/mcp`

**Authentication:** None required

### Claude Code

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
claude mcp add runpod-docs --scope user --transport http https://docs.runpod.io/mcp
```

### Codex CLI

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
codex mcp add runpod-docs --url https://docs.runpod.io/mcp
```

### Cursor

Add to your `.cursor/mcp.json` file:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "mcpServers": {
    "runpod-docs": {
      "url": "https://docs.runpod.io/mcp"
    }
  }
}
```

### VS Code with Copilot

1. Open the Command Palette (Ctrl+Shift+P on Windows/Linux or Cmd+Shift+P on macOS).
2. Run **MCP: Add Server** and select **HTTP**.
3. Enter `https://docs.runpod.io/mcp` as the URL and `Runpod Docs` as the name.
4. Select **Global** or **Workspace** and click **Add**.

### Claude Desktop

1. Open **Settings** in Claude Desktop.
2. Navigate to **Connectors** and select **Add custom connector**.
3. Enter `https://docs.runpod.io/mcp` as the URL and click **Add**.

### Windsurf

Add to `~/.codeium/windsurf/mcp_config.json`:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "mcpServers": {
    "runpod-docs": {
      "serverUrl": "https://docs.runpod.io/mcp"
    }
  }
}
```

### Cline

Add to `cline_mcp_settings.json`:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "mcpServers": {
    "runpod-docs": {
      "url": "https://docs.runpod.io/mcp",
      "disabled": false
    }
  }
}
```

### Gemini CLI

Add to `~/.gemini/settings.json`. Note that Gemini CLI uses `httpUrl` instead of `url`:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "mcpServers": {
    "runpod-docs": {
      "httpUrl": "https://docs.runpod.io/mcp"
    }
  }
}
```

### Other clients

For any other MCP-compatible client, use URL `https://docs.runpod.io/mcp` (HTTP transport).

### Usage examples

With the docs MCP server connected, you can ask questions about Runpod features:

```
Explain the Runpod Serverless model caching feature
```

```
How do I configure environment variables for a Serverless endpoint?
```

```
How does global networking work in Runpod?
```
