From 10b7d4c575402ef36e24d14f3d88d14226f98275 Mon Sep 17 00:00:00 2001 From: "promptless[bot]" <179508745+promptless[bot]@users.noreply.github.com> Date: Tue, 27 Jan 2026 20:54:08 +0000 Subject: [PATCH 01/11] Add MCP servers documentation for Claude integration --- docs.json | 2 +- get-started/mcp-servers.mdx | 107 ++++++++++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 get-started/mcp-servers.mdx diff --git a/docs.json b/docs.json index eb5cb51c..99fe4211 100644 --- a/docs.json +++ b/docs.json @@ -41,7 +41,7 @@ "get-started/concepts", "get-started/manage-accounts", "get-started/api-keys", - "get-started/connect-to-runpod" + "get-started/mcp-servers" ] }, { diff --git a/get-started/mcp-servers.mdx b/get-started/mcp-servers.mdx new file mode 100644 index 00000000..d7733a4d --- /dev/null +++ b/get-started/mcp-servers.mdx @@ -0,0 +1,107 @@ +--- +title: "Connect to Runpod MCP servers" +sidebarTitle: "Runpod MCP servers" +description: "Use to Runpod's MCP servers to manage resources and access documentation." +--- + +Runpod provides two Model Context Protocol (MCP) servers that connect AI tools and agents directly to Runpod. Use the API MCP server to manage your infrastructure, or the docs MCP server to get help with Runpod features. + +## Requirements + +- A [Runpod API key](/get-started/api-keys) (for the API server only). + +## Runpod API MCP server + +The Runpod API MCP server gives MCP-compatible tools access to the Runpod REST API, letting you create and manage Pods, Serverless endpoints, and other resources through natural language. + +You can find the source code [on GitHub](https://github.com/runpod/runpod-mcp). + +### Connect with Claude Code + +Run this command to install the Runpod API MCP server for Claude Code: + +```bash +npx -y @smithery/cli install @runpod/runpod-mcp-ts --client claude-code +``` + +When prompted, enter your Runpod API key. + +### Connect with Claude Desktop + +Run this command to install the Runpod API MCP server for Claude Desktop: + +```bash +npx -y @smithery/cli install @runpod/runpod-mcp-ts --client claude +``` + +When prompted, enter your Runpod API key. + +### Usage examples + +Once connected, you can ask your tool/agent to interact with your Runpod resources: + +**List all Pods** + +``` +List all my Runpod Pods +``` + +**Create a new Pod** + +``` +Create a new Runpod Pod with the following specifications: +- Name: test-pod +- Image: runpod/pytorch:2.1.0-py3.10-cuda11.8.0-devel-ubuntu22.04 +- GPU Type: NVIDIA GeForce RTX 4090 +- GPU Count: 1 +``` + +**Create a Serverless endpoint** + +``` +Create a Runpod Serverless endpoint with the following configuration: +- Name: my-endpoint +- Template ID: 30zmvf89kd +- Minimum workers: 0 +- Maximum workers: 3 +``` + +## Runpod docs MCP server + +The Runpod docs MCP server gives MCP-compatible tools access to Runpod documentation, making it easier to get answers about features and how to use them. + +The documentation MCP server is available at: + +``` +https://docs.runpod.io/mcp +```` + +### Connect with Claude Code + +Run this command to add the Runpod docs MCP server to Claude Code: + +```bash +claude mcp add --transport http runpod-docs --scope user https://docs.runpod.io/mcp +``` + +### Connect with Claude Desktop + +To connect Claude Desktop to the Runpod docs MCP server: + +1. Open [Claude](https://claude.ai/) in your browser and go to **Settings** by clicking your profile icon. +2. Select **Connectors** in the sidebar. +3. Scroll down and select **Add custom connector**. +4. Enter `https://docs.runpod.io/mcp` as the URL and select **Add**. +5. Complete any authentication prompts if required. + +### Usage examples + +Once connected, you can ask your tool/agent questions about Runpod features and documentation: + +``` +Explain the Runpod Serverless model caching feature +``` + +``` +How does global networking work? +``` From 5268e90fc9b07c9ea4d290872963e89c5cd8e98d Mon Sep 17 00:00:00 2001 From: Mo King Date: Tue, 27 Jan 2026 16:02:25 -0500 Subject: [PATCH 02/11] Revise MCP servers documentation for clarity Updated the title, sidebar title, and description for clarity. Changed 'Requirements' section to 'Benefits' and updated API key reference. --- get-started/mcp-servers.mdx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/get-started/mcp-servers.mdx b/get-started/mcp-servers.mdx index d7733a4d..3ac2cead 100644 --- a/get-started/mcp-servers.mdx +++ b/get-started/mcp-servers.mdx @@ -1,14 +1,13 @@ --- title: "Connect to Runpod MCP servers" -sidebarTitle: "Runpod MCP servers" -description: "Use to Runpod's MCP servers to manage resources and access documentation." +sidebarTitle: "Connect to MCP" +description: "Manage Runpod resources and access documentation from within your favorite AI tools." --- Runpod provides two Model Context Protocol (MCP) servers that connect AI tools and agents directly to Runpod. Use the API MCP server to manage your infrastructure, or the docs MCP server to get help with Runpod features. -## Requirements +## Benefits -- A [Runpod API key](/get-started/api-keys) (for the API server only). ## Runpod API MCP server @@ -24,7 +23,7 @@ Run this command to install the Runpod API MCP server for Claude Code: npx -y @smithery/cli install @runpod/runpod-mcp-ts --client claude-code ``` -When prompted, enter your Runpod API key. +When prompted, enter your [Runpod API key](/get-started/api-keys). ### Connect with Claude Desktop From c417c5d7485db41e6db3f0ec52409c3ee235cd00 Mon Sep 17 00:00:00 2001 From: Mo King Date: Tue, 27 Jan 2026 16:07:56 -0500 Subject: [PATCH 03/11] Add benefits section --- get-started/mcp-servers.mdx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/get-started/mcp-servers.mdx b/get-started/mcp-servers.mdx index 3ac2cead..9da3c762 100644 --- a/get-started/mcp-servers.mdx +++ b/get-started/mcp-servers.mdx @@ -8,6 +8,12 @@ Runpod provides two Model Context Protocol (MCP) servers that connect AI tools a ## Benefits +With Runpod's MCP servers, you can: + +- **Manage resources without leaving your workflow.** Create Pods, configure endpoints, and monitor deployments directly from your AI assistant. +- **Get contextual help when you need it.** Access Runpod documentation from within your coding environment. Your AI assistant can look up features, configuration options, and best practices while helping you build. +- **Automate complex tasks with simple requests.** Describe what you want in plain language, and let the AI handle the API calls. Chain multiple operations together without writing scripts. +- **Reduce errors and guesswork.** The AI assistant validates your requests against the actual API, catching issues before they cause problems. ## Runpod API MCP server @@ -39,14 +45,12 @@ When prompted, enter your Runpod API key. Once connected, you can ask your tool/agent to interact with your Runpod resources: -**List all Pods** +**Manage Pods** ``` List all my Runpod Pods ``` -**Create a new Pod** - ``` Create a new Runpod Pod with the following specifications: - Name: test-pod @@ -55,6 +59,10 @@ Create a new Runpod Pod with the following specifications: - GPU Count: 1 ``` +``` +Delete the Pod "test-pod" +``` + **Create a Serverless endpoint** ``` From 7bf8fc318caa71e9f16d6d6ae847d6bcd91776cd Mon Sep 17 00:00:00 2001 From: Mo King Date: Tue, 27 Jan 2026 16:08:21 -0500 Subject: [PATCH 04/11] Update --- get-started/mcp-servers.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/get-started/mcp-servers.mdx b/get-started/mcp-servers.mdx index 9da3c762..013d6263 100644 --- a/get-started/mcp-servers.mdx +++ b/get-started/mcp-servers.mdx @@ -1,5 +1,5 @@ --- -title: "Connect to Runpod MCP servers" +title: "Connect to Runpod's MCP servers" sidebarTitle: "Connect to MCP" description: "Manage Runpod resources and access documentation from within your favorite AI tools." --- From 8906713a3c8b9a562cc4eb3b2870b5fd49c263d2 Mon Sep 17 00:00:00 2001 From: Mo King Date: Tue, 27 Jan 2026 16:15:20 -0500 Subject: [PATCH 05/11] Update docs instructions --- get-started/mcp-servers.mdx | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/get-started/mcp-servers.mdx b/get-started/mcp-servers.mdx index 013d6263..af02a281 100644 --- a/get-started/mcp-servers.mdx +++ b/get-started/mcp-servers.mdx @@ -17,13 +17,13 @@ With Runpod's MCP servers, you can: ## Runpod API MCP server -The Runpod API MCP server gives MCP-compatible tools access to the Runpod REST API, letting you create and manage Pods, Serverless endpoints, and other resources through natural language. +The Runpod API MCP server gives MCP-compatible tools access to the [Runpod REST API](/api-reference/overview), letting you create and manage Pods, Serverless endpoints, and other resources through natural language. You can find the source code [on GitHub](https://github.com/runpod/runpod-mcp). ### Connect with Claude Code -Run this command to install the Runpod API MCP server for Claude Code: +Run this command to add the Runpod API MCP server to Claude Code: ```bash npx -y @smithery/cli install @runpod/runpod-mcp-ts --client claude-code @@ -33,7 +33,7 @@ When prompted, enter your [Runpod API key](/get-started/api-keys). ### Connect with Claude Desktop -Run this command to install the Runpod API MCP server for Claude Desktop: +Run this command to add the Runpod API MCP server to Claude Desktop: ```bash npx -y @smithery/cli install @runpod/runpod-mcp-ts --client claude @@ -77,11 +77,11 @@ Create a Runpod Serverless endpoint with the following configuration: The Runpod docs MCP server gives MCP-compatible tools access to Runpod documentation, making it easier to get answers about features and how to use them. -The documentation MCP server is available at: +The docs MCP server is available at: ``` https://docs.runpod.io/mcp -```` +``` ### Connect with Claude Code @@ -91,15 +91,14 @@ Run this command to add the Runpod docs MCP server to Claude Code: claude mcp add --transport http runpod-docs --scope user https://docs.runpod.io/mcp ``` -### Connect with Claude Desktop +### Connect with Claude (browser or desktop) -To connect Claude Desktop to the Runpod docs MCP server: +To connect to the Runpod docs MCP server with Claude (browser or desktop): -1. Open [Claude](https://claude.ai/) in your browser and go to **Settings** by clicking your profile icon. +1. Open [Claude Desktop](https://claude.ai/desktop) or [Claude in your browser](https://claude.ai/) and go to **Settings** by clicking your profile icon. 2. Select **Connectors** in the sidebar. 3. Scroll down and select **Add custom connector**. -4. Enter `https://docs.runpod.io/mcp` as the URL and select **Add**. -5. Complete any authentication prompts if required. +4. Enter `https://docs.runpod.io/mcp` as the URL and click **Add**. ### Usage examples From 4cd5f6d86210b44b27a54761525d17a40d50a282 Mon Sep 17 00:00:00 2001 From: Mo King Date: Wed, 28 Jan 2026 10:01:07 -0500 Subject: [PATCH 06/11] Add mcp to overview.mdx --- get-started/mcp-servers.mdx | 4 ++-- overview.mdx | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/get-started/mcp-servers.mdx b/get-started/mcp-servers.mdx index af02a281..7301a347 100644 --- a/get-started/mcp-servers.mdx +++ b/get-started/mcp-servers.mdx @@ -26,7 +26,7 @@ You can find the source code [on GitHub](https://github.com/runpod/runpod-mcp). Run this command to add the Runpod API MCP server to Claude Code: ```bash -npx -y @smithery/cli install @runpod/runpod-mcp-ts --client claude-code +npx -y @smithery/cli install @runpod/runpod-mcp --client claude-code ``` When prompted, enter your [Runpod API key](/get-started/api-keys). @@ -36,7 +36,7 @@ When prompted, enter your [Runpod API key](/get-started/api-keys). Run this command to add the Runpod API MCP server to Claude Desktop: ```bash -npx -y @smithery/cli install @runpod/runpod-mcp-ts --client claude +npx -y @smithery/cli install @runpod/runpod-mcp --client claude ``` When prompted, enter your Runpod API key. diff --git a/overview.mdx b/overview.mdx index 04164cd3..d5edd92b 100644 --- a/overview.mdx +++ b/overview.mdx @@ -20,8 +20,8 @@ If you're new to Runpod, start here to learn the essentials and deploy your firs Create API keys to manage your access to Runpod resources. - - Explore various methods for accessing and managing Runpod resources. + + Connect your AI tools to Runpod's MCP servers to manage resources and access docs. @@ -47,12 +47,13 @@ Serverless provides pay-per-second computing with automatic scaling for producti Learn how Serverless billing works and how to optimize your costs. + + Write a handler function, build a worker image, create an endpoint, and send your first request. + Deploy a large language model for text or image generation in minutes using vLLM. - - Build a custom worker and deploy it as a Serverless endpoint. - + ## Pods From a28a269c2b0c2bf2d066b3364cc7f43c5d7cecb1 Mon Sep 17 00:00:00 2001 From: Mo King Date: Wed, 28 Jan 2026 10:01:26 -0500 Subject: [PATCH 07/11] update --- get-started/mcp-servers.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/get-started/mcp-servers.mdx b/get-started/mcp-servers.mdx index 7301a347..af02a281 100644 --- a/get-started/mcp-servers.mdx +++ b/get-started/mcp-servers.mdx @@ -26,7 +26,7 @@ You can find the source code [on GitHub](https://github.com/runpod/runpod-mcp). Run this command to add the Runpod API MCP server to Claude Code: ```bash -npx -y @smithery/cli install @runpod/runpod-mcp --client claude-code +npx -y @smithery/cli install @runpod/runpod-mcp-ts --client claude-code ``` When prompted, enter your [Runpod API key](/get-started/api-keys). @@ -36,7 +36,7 @@ When prompted, enter your [Runpod API key](/get-started/api-keys). Run this command to add the Runpod API MCP server to Claude Desktop: ```bash -npx -y @smithery/cli install @runpod/runpod-mcp --client claude +npx -y @smithery/cli install @runpod/runpod-mcp-ts --client claude ``` When prompted, enter your Runpod API key. From 79c4ed0fe1bd6c0add0c8b3152ef159fa6c5d434 Mon Sep 17 00:00:00 2001 From: Mo King Date: Mon, 23 Feb 2026 09:05:02 -0500 Subject: [PATCH 08/11] Expand mcp server doc --- .cursor/rules/rp-styleguide.mdc | 1 + get-started/mcp-servers.mdx | 480 +++++++++++++++++++++++++++++--- snippets/tooltips.jsx | 6 + 3 files changed, 446 insertions(+), 41 deletions(-) diff --git a/.cursor/rules/rp-styleguide.mdc b/.cursor/rules/rp-styleguide.mdc index 9c4fefc5..60a049f0 100644 --- a/.cursor/rules/rp-styleguide.mdc +++ b/.cursor/rules/rp-styleguide.mdc @@ -10,6 +10,7 @@ These are generic terms: endpoint, worker, cluster, template, handler, fine-tune Prefer using paragraphs to bullet points unless directly asked. When using bullet points, end each line with a period. +When a bullet point has a bold label followed by description text, use a colon after the bold text instead of a hyphen (e.g., "**List volumes:** Retrieve all network volumes." not "**List volumes** - Retrieve all network volumes."). When creating a tutorial, always include these sections: diff --git a/get-started/mcp-servers.mdx b/get-started/mcp-servers.mdx index af02a281..dfee775e 100644 --- a/get-started/mcp-servers.mdx +++ b/get-started/mcp-servers.mdx @@ -1,39 +1,156 @@ --- -title: "Connect to Runpod's MCP servers" -sidebarTitle: "Connect to MCP" -description: "Manage Runpod resources and access documentation from within your favorite AI tools." +title: "Use Runpod's MCP servers" +sidebarTitle: "Runpod MCP servers" +description: "Connect AI tools to Runpod using the Model Context Protocol for infrastructure management and documentation access." --- -Runpod provides two Model Context Protocol (MCP) servers that connect AI tools and agents directly to Runpod. Use the API MCP server to manage your infrastructure, or the docs MCP server to get help with Runpod features. +import { PodsTooltip, ServerlessTooltip, TemplatesTooltip, NetworkVolumesTooltip } from "/snippets/tooltips.jsx"; + +Runpod provides two official MCP servers that enable AI tools and coding agents to interact with your Runpod resources: + +1. **Runpod API MCP server:** Manage your infrastructure through the Runpod REST API. +2. **Runpod docs MCP server:** Search and access Runpod documentation. + +These servers let you integrate Runpod directly into popular AI assistants like Claude Code, enabling you to: + +- Create and manage , , and . +- Configure and container registries. +- Monitor deployments and resource usage. +- Search Runpod documentation for features and best practices. ## Benefits With Runpod's MCP servers, you can: -- **Manage resources without leaving your workflow.** Create Pods, configure endpoints, and monitor deployments directly from your AI assistant. -- **Get contextual help when you need it.** Access Runpod documentation from within your coding environment. Your AI assistant can look up features, configuration options, and best practices while helping you build. -- **Automate complex tasks with simple requests.** Describe what you want in plain language, and let the AI handle the API calls. Chain multiple operations together without writing scripts. -- **Reduce errors and guesswork.** The AI assistant validates your requests against the actual API, catching issues before they cause problems. +- **Manage resources without leaving your workflow:** Create Pods, configure endpoints, and monitor deployments directly from your AI assistant. +- **Get contextual help when you need it:** Access Runpod documentation from within your coding environment. Your AI assistant can look up features, configuration options, and best practices while helping you build. +- **Automate complex tasks with simple requests:** Describe what you want in plain language, and let the AI handle the API calls. Chain multiple operations together without writing scripts. +- **Reduce errors and guesswork:** The AI assistant validates your requests against the actual API, catching issues before they cause problems. + +## Available MCP servers + +### Runpod API MCP server + +The Runpod API MCP server provides programmatic access to the [Runpod REST API](/api-reference/overview), enabling you to create and manage infrastructure resources through natural language. + +**Endpoint**: Available via npm package `@runpod/runpod-mcp-ts` + +**Source code**: [github.com/runpod/runpod-mcp](https://github.com/runpod/runpod-mcp) + +**Authentication**: Requires Runpod API key + +**Tools**: The Runpod API MCP server provides a comprehensive set of tools for managing your infrastructure. All tools require authentication with a valid Runpod API key. + +### Pods + +- **List Pods:** Retrieve all Pods in your account. +- **Get Pod:** Get details for a specific Pod by ID. +- **Create Pod:** Create a new Pod with specified configuration. +- **Update Pod:** Modify settings for an existing Pod. +- **Start Pod:** Start a stopped Pod. +- **Stop Pod:** Stop a running Pod. +- **Delete Pod:** Remove a Pod from your account. + +### Serverless + +- **List endpoints:** Retrieve all Serverless endpoints. +- **Get endpoint:** Get details for a specific endpoint by ID. +- **Create endpoint:** Create a new Serverless endpoint. +- **Update endpoint:** Modify endpoint configuration. +- **Delete endpoint:** Remove a Serverless endpoint. + +### Templates + +- **List templates:** Retrieve all templates in your account. +- **Get template:** Get details for a specific template by ID. +- **Create template:** Create a new template. +- **Update template:** Modify template configuration. +- **Delete template:** Remove a template. + +### Network volumes -## Runpod API MCP server +- **List volumes:** Retrieve all network volumes. +- **Get volume:** Get details for a specific volume by ID. +- **Create volume:** Create a new network volume. +- **Update volume:** Modify volume configuration. +- **Delete volume:** Remove a network volume. -The Runpod API MCP server gives MCP-compatible tools access to the [Runpod REST API](/api-reference/overview), letting you create and manage Pods, Serverless endpoints, and other resources through natural language. +### Container registries -You can find the source code [on GitHub](https://github.com/runpod/runpod-mcp). +- **List registry authentications:** Retrieve all container registry credentials. +- **Get registry authentication:** Get details for specific registry credentials. +- **Create registry authentication:** Add new container registry credentials. +- **Delete registry authentication:** Remove registry credentials. + -### Connect with Claude Code +### Runpod docs MCP server -Run this command to add the Runpod API MCP server to Claude Code: +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 + +**Tools**: The Runpod docs MCP server provides a single tool: +- **Search documentation:** Search across Runpod's knowledge base for relevant information, code examples, API references, and guides. + +## Setup + +Connect your AI client to Runpod's MCP servers and start managing your infrastructure from within your AI assistant. + +### Supported clients + +Runpod MCP servers work with any MCP-compatible client. Verified clients include: + +- [Claude Code](#claude-code) +- [Claude.ai and Claude Desktop](#claude-desktop) +- [Cursor](#cursor) +- [VS Code with Copilot](#vs-code-with-copilot) + +### Claude Code + +[Claude Code](https://claude.ai/code) is Anthropic's official CLI for interacting with Claude from your terminal. + +#### Runpod API MCP server + +Install the Runpod API MCP server using Smithery: ```bash +# Install Claude Code +npm install -g @anthropic-ai/claude-code + +# Add Runpod API MCP npx -y @smithery/cli install @runpod/runpod-mcp-ts --client claude-code + +# Start coding with Claude +claude + +# Verify MCP tools are available +/mcp ``` When prompted, enter your [Runpod API key](/get-started/api-keys). -### Connect with Claude Desktop +#### Runpod docs MCP server + +Add the Runpod docs MCP server: + +```bash +# Add Runpod docs MCP +claude mcp add --transport http runpod-docs https://docs.runpod.io/mcp + +# Verify the connection +claude +/mcp +``` + +### Claude Desktop + +[Claude Desktop](https://claude.ai/desktop) is Anthropic's native desktop application for macOS and Windows. -Run this command to add the Runpod API MCP server to Claude Desktop: +#### Runpod API MCP server + +Install using Smithery: ```bash npx -y @smithery/cli install @runpod/runpod-mcp-ts --client claude @@ -41,73 +158,354 @@ npx -y @smithery/cli install @runpod/runpod-mcp-ts --client claude When prompted, enter your Runpod API key. -### Usage examples +Alternatively, manually configure by adding to your Claude Desktop config file: + +**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json` + +**Windows**: `%APPDATA%\Claude\claude_desktop_config.json` + +```json +{ + "mcpServers": { + "runpod": { + "command": "npx", + "args": ["-y", "@runpod/runpod-mcp-ts"], + "env": { + "RUNPOD_API_KEY": "your_api_key_here" + } + } + } +} +``` + +#### Runpod docs MCP server + +1. Open **Settings** in Claude Desktop. +2. Navigate to **Connectors** and select **Add custom connector**. +3. Configure the connector: + - **Name:** `Runpod Docs` + - **URL:** `https://docs.runpod.io/mcp` +4. Click **Add**. + +### Cursor + +[Cursor](https://cursor.com) is an AI-powered code editor built on VS Code. + +Add the Runpod API MCP server to your project-specific or global `.cursor/mcp.json` file: + +```json +{ + "mcpServers": { + "runpod": { + "command": "npx", + "args": ["-y", "@runpod/runpod-mcp-ts"], + "env": { + "RUNPOD_API_KEY": "your_api_key_here" + } + } + } +} +``` + +For the docs MCP server, add: + +```json +{ + "mcpServers": { + "runpod-docs": { + "url": "https://docs.runpod.io/mcp" + } + } +} +``` + +For more details, see the [Cursor MCP documentation](https://docs.cursor.com/en/context/mcp). + +### VS Code with Copilot -Once connected, you can ask your tool/agent to interact with your Runpod resources: +GitHub Copilot in VS Code supports MCP servers for enhanced context and capabilities. -**Manage Pods** +#### Runpod API MCP server +1. Open the Command Palette (Ctrl+Shift+P on Windows/Linux or Cmd+Shift+P on macOS). +2. Run **MCP: Add Server** +3. Select **stdio** +4. Enter the following details: + - **Name:** `Runpod` + - **Command:** `npx` + - **Arguments:** `-y @runpod/runpod-mcp-ts` +5. Add environment variable: + - **Key:** `RUNPOD_API_KEY` + - **Value:** Your Runpod API key +6. Select **Global** or **Workspace** depending on your needs. +7. Click **Add**. + +#### Runpod docs MCP server + +1. Open the Command Palette (Ctrl+Shift+P on Windows/Linux or Cmd+Shift+P on macOS). +2. Run **MCP: Add Server**. +3. Select **HTTP**. +4. Enter the following details: + - **URL:** `https://docs.runpod.io/mcp` + - **Name:** `Runpod Docs` +5. Select **Global** or **Workspace**. +6. Click **Add**. + +### Other clients + +For other MCP-compatible clients, use the following connection details: + +**Runpod API MCP server (stdio transport)**: +- **Command:** `npx` +- **Args:** `-y @runpod/runpod-mcp-ts` +- **Environment:** `RUNPOD_API_KEY=your_api_key_here` + +**Runpod docs MCP server (HTTP transport)**: +- **URL:** `https://docs.runpod.io/mcp`. + +## Usage examples + +### Managing Pods + +Once connected, you can interact with your Runpod infrastructure using natural language: + +**List all Pods**: ``` List all my Runpod Pods ``` +**Create a new Pod**: ``` Create a new Runpod Pod with the following specifications: -- Name: test-pod +- 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 +``` + +**Get Pod details**: +``` +Get details for Pod ID abc123xyz ``` +**Stop a running Pod**: ``` -Delete the Pod "test-pod" +Stop the Pod named "ml-training-pod" ``` -**Create a Serverless endpoint** +**Delete a Pod**: +``` +Delete the Pod with ID abc123xyz +``` +### Managing Serverless endpoints + +**Create a Serverless endpoint**: ``` Create a Runpod Serverless endpoint with the following configuration: -- Name: my-endpoint +- Name: image-generation-endpoint - Template ID: 30zmvf89kd - Minimum workers: 0 -- Maximum workers: 3 +- Maximum workers: 5 +- GPU Type: NVIDIA A40 +- Scaling: Workers per second = 4 ``` -## Runpod docs MCP server - -The Runpod docs MCP server gives MCP-compatible tools access to Runpod documentation, making it easier to get answers about features and how to use them. +**List all endpoints**: +``` +Show me all my Serverless endpoints +``` -The docs MCP server is available at: +**Update an endpoint**: +``` +Update endpoint ID xyz789 to have a maximum of 10 workers +``` +**Delete an endpoint**: ``` -https://docs.runpod.io/mcp +Delete the endpoint named "image-generation-endpoint" ``` -### Connect with Claude Code +### Working with templates -Run this command to add the Runpod docs MCP server to Claude Code: +**Create a template**: +``` +Create a new template for Stable Diffusion: +- Name: stable-diffusion-xl +- Docker Image: runpod/stable-diffusion:xl-latest +- Container disk: 20 GB +- Expose HTTP ports: 8000, 8001 +``` -```bash -claude mcp add --transport http runpod-docs --scope user https://docs.runpod.io/mcp +**List templates**: +``` +List all my Runpod templates ``` -### Connect with Claude (browser or desktop) +### Managing network volumes -To connect to the Runpod docs MCP server with Claude (browser or desktop): +**Create a network volume**: +``` +Create a network volume: +- Name: training-data +- Size: 100 GB +- Datacenter: US-CA-1 +``` -1. Open [Claude Desktop](https://claude.ai/desktop) or [Claude in your browser](https://claude.ai/) and go to **Settings** by clicking your profile icon. -2. Select **Connectors** in the sidebar. -3. Scroll down and select **Add custom connector**. -4. Enter `https://docs.runpod.io/mcp` as the URL and click **Add**. +**List volumes**: +``` +Show all my network volumes +``` -### Usage examples +### Searching documentation -Once connected, you can ask your tool/agent questions about Runpod features and documentation: +With the Runpod docs MCP server connected, you can ask questions about Runpod features: +**Learn about features**: ``` Explain the Runpod Serverless model caching feature ``` +**Get configuration help**: +``` +How do I configure environment variables for a Serverless endpoint? +``` + +**Understand networking**: +``` +How does global networking work in Runpod? +``` + +**Find code examples**: +``` +Show me examples of using the Python SDK to create a Pod +``` + +## Advanced usage + +### Chaining operations + +Combine multiple operations to accomplish complex tasks: + +``` +Create a new Pod with GPU RTX 4090, then create a network volume +named "model-storage" with 50GB, and attach it to the new Pod +``` + +### Conditional operations + +Use conditional logic in your requests: + +``` +Check if I have any running Pods. If I do, list them with their GPU types +and current costs. If not, create a new Pod with the cheapest available GPU. +``` + +### Monitoring and reporting + +Generate reports about your infrastructure: + +``` +Show me a summary of all my Serverless endpoints including their +current worker counts, GPU types, and monthly costs +``` + +### Batch operations + +Perform operations on multiple resources: + ``` -How does global networking work? +Stop all Pods that have been running for more than 24 hours ``` + +## Troubleshooting + +### Authentication errors + +**Problem**: "Invalid API key" or "Authentication failed" + +**Solution**: +- Verify your API key is correct. +- Check that the API key has not expired. +- Ensure the API key has appropriate permissions. +- Confirm the environment variable is set correctly. + +### Connection errors + +**Problem**: MCP server fails to connect or times out + +**Solution**: +- Verify you have internet connectivity. +- Check that the MCP server URL is correct (`https://docs.runpod.io/mcp` for docs). +- For API server, ensure Node.js 18+ is installed. +- Restart your AI client and try reconnecting. + +### Tool execution errors + +**Problem**: Operations fail or return unexpected results + +**Solution**: +- Verify the resource IDs you're using are correct. +- Check that you have sufficient permissions for the operation. +- Ensure you have adequate credits in your Runpod account. +- Review error messages for specific details about what went wrong. + +### Missing tools + +**Problem**: MCP tools don't appear in your AI client + +**Solution**: +- Verify the MCP server was installed correctly. +- Restart your AI client after installation. +- Check the MCP server configuration file for syntax errors. +- Run `/mcp` (in Claude) or equivalent command to list available tools. + +### Documentation search returns no results + +**Problem**: Docs MCP server searches return empty or irrelevant results + +**Solution**: +- Rephrase your query with different keywords. +- Be more specific about what you're looking for. +- Try breaking complex queries into simpler questions. +- Check that the docs MCP server is connected (URL: `https://docs.runpod.io/mcp`). + +### Performance issues + +**Problem**: MCP server is slow or unresponsive + +**Solution**: +- Check your internet connection speed. +- Verify you're not hitting rate limits on the Runpod API. +- For the API server, ensure Node.js has sufficient resources. +- Try restarting the MCP server. + +## Security best practices + +The MCP ecosystem is rapidly evolving. Follow these best practices to keep your infrastructure secure: + +### Protect your API keys + +- **Never commit API keys to version control:** Use environment variables or secure secret management. +- **Limit permissions:** Grant only the minimum necessary permissions to each API key. +- **Rotate keys regularly:** Periodically generate new API keys and revoke old ones. +- **Monitor key usage:** Review API key activity for unexpected access patterns. + +### Enable human confirmation + +- **Review before execution:** Enable confirmation prompts in your AI client for destructive operations. +- **Monitor resource changes:** Regularly check your Runpod dashboard for unexpected resource creation or modification. + +### Data protection + +- **Be aware of data sharing:** AI assistants may send prompts and tool results to their cloud services. +- **Avoid sensitive data in prompts:** Don't include passwords, private keys, or confidential data in your requests. +- **Review AI client privacy policies:** Understand how your AI tool provider handles data. + +## Related resources + +- [Runpod REST API reference](/api-reference/overview). +- [API key setup guide](/get-started/api-keys). +- [Model Context Protocol specification](https://modelcontextprotocol.io). +- [Runpod MCP GitHub repository](https://github.com/runpod/runpod-mcp). diff --git a/snippets/tooltips.jsx b/snippets/tooltips.jsx index 1751ca50..c700bd92 100644 --- a/snippets/tooltips.jsx +++ b/snippets/tooltips.jsx @@ -155,6 +155,12 @@ export const NetworkVolumeTooltip = () => { ); }; +export const NetworkVolumesTooltip = () => { + return ( + network volumes + ); +}; + export const VolumeDiskTooltip = () => { return ( From 87e4618c3542767580f7e9cc415da6098c936da3 Mon Sep 17 00:00:00 2001 From: Mo King Date: Mon, 23 Feb 2026 09:10:48 -0500 Subject: [PATCH 09/11] update --- get-started/mcp-servers.mdx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/get-started/mcp-servers.mdx b/get-started/mcp-servers.mdx index dfee775e..07c28824 100644 --- a/get-started/mcp-servers.mdx +++ b/get-started/mcp-servers.mdx @@ -11,7 +11,7 @@ Runpod provides two official MCP servers that enable AI tools and coding agents 1. **Runpod API MCP server:** Manage your infrastructure through the Runpod REST API. 2. **Runpod docs MCP server:** Search and access Runpod documentation. -These servers let you integrate Runpod directly into popular AI assistants like Claude Code, enabling you to: +These servers let you integrate Runpod directly into popular AI assistants like Claude, enabling you to: - Create and manage , , and . - Configure and container registries. @@ -119,6 +119,9 @@ Install the Runpod API MCP server using Smithery: # Install Claude Code npm install -g @anthropic-ai/claude-code +# Navigate to your project +cd your-runpod-project + # Add Runpod API MCP npx -y @smithery/cli install @runpod/runpod-mcp-ts --client claude-code From 471eb3a73e3d49fe935407e27148946eae52a19e Mon Sep 17 00:00:00 2001 From: max4c Date: Mon, 23 Feb 2026 15:15:22 -0800 Subject: [PATCH 10/11] Remove Smithery dependency, fix npm package name, add more MCP clients - Replace all Smithery CLI commands with native client setup instructions - Fix npm package from @runpod/runpod-mcp-ts (Smithery-only name) to @runpod/mcp-server (actual npm package) - Claude Code: use `claude mcp add` with --scope user for global install - Add setup instructions for Windsurf, Cline, Gemini CLI, and OpenAI Codex CLI - Claude Desktop, Cursor, VS Code with Copilot sections updated with correct package Co-Authored-By: Claude Opus 4.6 (1M context) --- get-started/mcp-servers.mdx | 157 +++++++++++++++++++++++++++--------- 1 file changed, 121 insertions(+), 36 deletions(-) diff --git a/get-started/mcp-servers.mdx b/get-started/mcp-servers.mdx index 07c28824..efc15677 100644 --- a/get-started/mcp-servers.mdx +++ b/get-started/mcp-servers.mdx @@ -33,7 +33,7 @@ With Runpod's MCP servers, you can: The Runpod API MCP server provides programmatic access to the [Runpod REST API](/api-reference/overview), enabling you to create and manage infrastructure resources through natural language. -**Endpoint**: Available via npm package `@runpod/runpod-mcp-ts` +**Endpoint**: Available via npm package `@runpod/mcp-server` **Source code**: [github.com/runpod/runpod-mcp](https://github.com/runpod/runpod-mcp) @@ -100,12 +100,17 @@ Connect your AI client to Runpod's MCP servers and start managing your infrastru ### Supported clients -Runpod MCP servers work with any MCP-compatible client. Verified clients include: +Runpod MCP servers work with any MCP-compatible client. Setup instructions are available for: - [Claude Code](#claude-code) -- [Claude.ai and Claude Desktop](#claude-desktop) +- [Claude Desktop](#claude-desktop) - [Cursor](#cursor) - [VS Code with Copilot](#vs-code-with-copilot) +- [Windsurf](#windsurf) +- [Cline](#cline) +- [Gemini CLI](#gemini-cli) +- [OpenAI Codex CLI](#openai-codex-cli) +- [Other clients](#other-clients) ### Claude Code @@ -113,36 +118,27 @@ Runpod MCP servers work with any MCP-compatible client. Verified clients include #### Runpod API MCP server -Install the Runpod API MCP server using Smithery: +Add the Runpod API MCP server to Claude Code: ```bash -# Install Claude Code -npm install -g @anthropic-ai/claude-code - -# Navigate to your project -cd your-runpod-project - -# Add Runpod API MCP -npx -y @smithery/cli install @runpod/runpod-mcp-ts --client claude-code - -# Start coding with Claude -claude - -# Verify MCP tools are available -/mcp +claude mcp add runpod --scope user -e RUNPOD_API_KEY=your_api_key_here -- npx -y @runpod/mcp-server@latest ``` -When prompted, enter your [Runpod API key](/get-started/api-keys). +Replace `your_api_key_here` with your [Runpod API key](/get-started/api-keys). The `--scope user` flag makes the server available across all your projects. #### Runpod docs MCP server Add the Runpod docs MCP server: ```bash -# Add Runpod docs MCP -claude mcp add --transport http runpod-docs https://docs.runpod.io/mcp +claude mcp add runpod-docs --scope user --transport http https://docs.runpod.io/mcp +``` + +#### Verify the connection -# Verify the connection +Start Claude Code and run `/mcp` to confirm both servers are connected: + +```bash claude /mcp ``` @@ -153,15 +149,7 @@ claude #### Runpod API MCP server -Install using Smithery: - -```bash -npx -y @smithery/cli install @runpod/runpod-mcp-ts --client claude -``` - -When prompted, enter your Runpod API key. - -Alternatively, manually configure by adding to your Claude Desktop config file: +Add the following to your Claude Desktop config file: **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json` @@ -172,7 +160,7 @@ Alternatively, manually configure by adding to your Claude Desktop config file: "mcpServers": { "runpod": { "command": "npx", - "args": ["-y", "@runpod/runpod-mcp-ts"], + "args": ["-y", "@runpod/mcp-server@latest"], "env": { "RUNPOD_API_KEY": "your_api_key_here" } @@ -181,6 +169,8 @@ Alternatively, manually configure by adding to your Claude Desktop config file: } ``` +Replace `your_api_key_here` with your [Runpod API key](/get-started/api-keys). Restart Claude Desktop after saving the file. + #### Runpod docs MCP server 1. Open **Settings** in Claude Desktop. @@ -201,7 +191,7 @@ Add the Runpod API MCP server to your project-specific or global `.cursor/mcp.js "mcpServers": { "runpod": { "command": "npx", - "args": ["-y", "@runpod/runpod-mcp-ts"], + "args": ["-y", "@runpod/mcp-server@latest"], "env": { "RUNPOD_API_KEY": "your_api_key_here" } @@ -236,7 +226,7 @@ GitHub Copilot in VS Code supports MCP servers for enhanced context and capabili 4. Enter the following details: - **Name:** `Runpod` - **Command:** `npx` - - **Arguments:** `-y @runpod/runpod-mcp-ts` + - **Arguments:** `-y @runpod/mcp-server@latest` 5. Add environment variable: - **Key:** `RUNPOD_API_KEY` - **Value:** Your Runpod API key @@ -254,17 +244,112 @@ GitHub Copilot in VS Code supports MCP servers for enhanced context and capabili 5. Select **Global** or **Workspace**. 6. Click **Add**. +### Windsurf + +[Windsurf](https://windsurf.com) is an AI-powered code editor. + +Edit your Windsurf MCP config file at `~/.codeium/windsurf/mcp_config.json`: + +```json +{ + "mcpServers": { + "runpod": { + "command": "npx", + "args": ["-y", "@runpod/mcp-server@latest"], + "env": { + "RUNPOD_API_KEY": "your_api_key_here" + } + }, + "runpod-docs": { + "serverUrl": "https://docs.runpod.io/mcp" + } + } +} +``` + +You can also open this file from Windsurf: **Settings** > **Cascade** > **MCP Servers** > **View raw config**. + +### Cline + +[Cline](https://cline.bot) is an AI coding agent that runs as a VS Code extension. + +Open the Cline sidebar, click the **MCP Servers** icon, then select **Configure MCP Servers** to edit `cline_mcp_settings.json`: + +```json +{ + "mcpServers": { + "runpod": { + "command": "npx", + "args": ["-y", "@runpod/mcp-server@latest"], + "env": { + "RUNPOD_API_KEY": "your_api_key_here" + }, + "disabled": false + }, + "runpod-docs": { + "url": "https://docs.runpod.io/mcp", + "disabled": false + } + } +} +``` + +### Gemini CLI + +[Gemini CLI](https://github.com/google-gemini/gemini-cli) is Google's command-line interface for Gemini. + +Add the following to `~/.gemini/settings.json` (global) or `.gemini/settings.json` (project-level): + +```json +{ + "mcpServers": { + "runpod": { + "command": "npx", + "args": ["-y", "@runpod/mcp-server@latest"], + "env": { + "RUNPOD_API_KEY": "your_api_key_here" + } + }, + "runpod-docs": { + "httpUrl": "https://docs.runpod.io/mcp" + } + } +} +``` + +Gemini CLI uses `httpUrl` for HTTP transport servers, not `url`. + +### OpenAI Codex CLI + +[Codex CLI](https://github.com/openai/codex) is OpenAI's command-line coding agent. + +Add the following to `~/.codex/config.toml` (global) or `.codex/config.toml` (project-level): + +```toml +[mcp_servers.runpod] +command = "npx" +args = ["-y", "@runpod/mcp-server@latest"] + +[mcp_servers.runpod.env] +RUNPOD_API_KEY = "your_api_key_here" + +[mcp_servers.runpod-docs] +url = "https://docs.runpod.io/mcp" +``` + +Codex CLI uses TOML format instead of JSON. + ### Other clients For other MCP-compatible clients, use the following connection details: **Runpod API MCP server (stdio transport)**: - **Command:** `npx` -- **Args:** `-y @runpod/runpod-mcp-ts` +- **Args:** `-y @runpod/mcp-server@latest` - **Environment:** `RUNPOD_API_KEY=your_api_key_here` **Runpod docs MCP server (HTTP transport)**: -- **URL:** `https://docs.runpod.io/mcp`. +- **URL:** `https://docs.runpod.io/mcp` ## Usage examples From 7a1a983d1dac29958a2231c6264c17efeba008f9 Mon Sep 17 00:00:00 2001 From: max4c Date: Mon, 23 Feb 2026 16:07:07 -0800 Subject: [PATCH 11/11] Rewrite MCP servers page: trim fluff, add clients, fix layout - Restructure page around the two servers (API + docs) with client configs nested under each, modeled after Vercel's MCP docs layout - Add anchor links at top for quick navigation between servers - Add setup instructions for Codex CLI, Windsurf, Cline, Gemini CLI - Use native CLI commands for Claude Code and Codex CLI instead of manual config file editing - Remove Benefits, Available tools accordion, Advanced usage, Troubleshooting, Security best practices, and Related resources - Page reduced from 514 to ~300 lines Co-Authored-By: Claude Opus 4.6 (1M context) --- get-started/mcp-servers.mdx | 518 ++++++++---------------------------- 1 file changed, 110 insertions(+), 408 deletions(-) diff --git a/get-started/mcp-servers.mdx b/get-started/mcp-servers.mdx index efc15677..09a233ce 100644 --- a/get-started/mcp-servers.mdx +++ b/get-started/mcp-servers.mdx @@ -4,156 +4,51 @@ sidebarTitle: "Runpod MCP servers" description: "Connect AI tools to Runpod using the Model Context Protocol for infrastructure management and documentation access." --- -import { PodsTooltip, ServerlessTooltip, TemplatesTooltip, NetworkVolumesTooltip } from "/snippets/tooltips.jsx"; +Runpod provides two [Model Context Protocol (MCP)](https://modelcontextprotocol.io) servers that connect AI tools and coding agents directly to Runpod: -Runpod provides two official MCP servers that enable AI tools and coding agents to interact with your Runpod resources: +- **[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. -1. **Runpod API MCP server:** Manage your infrastructure through the Runpod REST API. -2. **Runpod docs MCP server:** Search and access Runpod documentation. +## Runpod API MCP server -These servers let you integrate Runpod directly into popular AI assistants like Claude, enabling you to: +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. -- Create and manage , , and . -- Configure and container registries. -- Monitor deployments and resource usage. -- Search Runpod documentation for features and best practices. +**Endpoint:** Available via npm package `@runpod/mcp-server` -## Benefits +**Source code:** [github.com/runpod/runpod-mcp](https://github.com/runpod/runpod-mcp) -With Runpod's MCP servers, you can: - -- **Manage resources without leaving your workflow:** Create Pods, configure endpoints, and monitor deployments directly from your AI assistant. -- **Get contextual help when you need it:** Access Runpod documentation from within your coding environment. Your AI assistant can look up features, configuration options, and best practices while helping you build. -- **Automate complex tasks with simple requests:** Describe what you want in plain language, and let the AI handle the API calls. Chain multiple operations together without writing scripts. -- **Reduce errors and guesswork:** The AI assistant validates your requests against the actual API, catching issues before they cause problems. - -## Available MCP servers - -### Runpod API MCP server - -The Runpod API MCP server provides programmatic access to the [Runpod REST API](/api-reference/overview), enabling you to create and manage infrastructure resources 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 Runpod API key - -**Tools**: The Runpod API MCP server provides a comprehensive set of tools for managing your infrastructure. All tools require authentication with a valid Runpod API key. - -### Pods - -- **List Pods:** Retrieve all Pods in your account. -- **Get Pod:** Get details for a specific Pod by ID. -- **Create Pod:** Create a new Pod with specified configuration. -- **Update Pod:** Modify settings for an existing Pod. -- **Start Pod:** Start a stopped Pod. -- **Stop Pod:** Stop a running Pod. -- **Delete Pod:** Remove a Pod from your account. - -### Serverless - -- **List endpoints:** Retrieve all Serverless endpoints. -- **Get endpoint:** Get details for a specific endpoint by ID. -- **Create endpoint:** Create a new Serverless endpoint. -- **Update endpoint:** Modify endpoint configuration. -- **Delete endpoint:** Remove a Serverless endpoint. - -### Templates - -- **List templates:** Retrieve all templates in your account. -- **Get template:** Get details for a specific template by ID. -- **Create template:** Create a new template. -- **Update template:** Modify template configuration. -- **Delete template:** Remove a template. - -### Network volumes - -- **List volumes:** Retrieve all network volumes. -- **Get volume:** Get details for a specific volume by ID. -- **Create volume:** Create a new network volume. -- **Update volume:** Modify volume configuration. -- **Delete volume:** Remove a network volume. - -### Container registries - -- **List registry authentications:** Retrieve all container registry credentials. -- **Get registry authentication:** Get details for specific registry credentials. -- **Create registry authentication:** Add new container registry credentials. -- **Delete registry authentication:** Remove registry credentials. - - -### 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 - -**Tools**: The Runpod docs MCP server provides a single tool: -- **Search documentation:** Search across Runpod's knowledge base for relevant information, code examples, API references, and guides. - -## Setup - -Connect your AI client to Runpod's MCP servers and start managing your infrastructure from within your AI assistant. +**Authentication:** Requires a [Runpod API key](/get-started/api-keys) ### Supported clients -Runpod MCP servers work with any MCP-compatible client. Setup instructions are available for: - - [Claude Code](#claude-code) -- [Claude Desktop](#claude-desktop) +- [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) -- [OpenAI Codex CLI](#openai-codex-cli) -- [Other clients](#other-clients) ### Claude Code -[Claude Code](https://claude.ai/code) is Anthropic's official CLI for interacting with Claude from your terminal. - -#### Runpod API MCP server - -Add the Runpod API MCP server to Claude Code: - ```bash 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](/get-started/api-keys). The `--scope user` flag makes the server available across all your projects. - -#### Runpod docs MCP server - -Add the Runpod docs MCP server: - -```bash -claude mcp add runpod-docs --scope user --transport http https://docs.runpod.io/mcp -``` +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. -#### Verify the connection +### Codex CLI -Start Claude Code and run `/mcp` to confirm both servers are connected: +[Codex CLI](https://github.com/openai/codex) is OpenAI's terminal-based coding agent. ```bash -claude -/mcp +codex mcp add runpod --env RUNPOD_API_KEY=your_api_key_here -- npx -y @runpod/mcp-server@latest ``` -### Claude Desktop - -[Claude Desktop](https://claude.ai/desktop) is Anthropic's native desktop application for macOS and Windows. - -#### Runpod API MCP server - -Add the following to your Claude Desktop config file: - -**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json` +### Cursor -**Windows**: `%APPDATA%\Claude\claude_desktop_config.json` +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 { @@ -169,22 +64,23 @@ Add the following to your Claude Desktop config file: } ``` -Replace `your_api_key_here` with your [Runpod API key](/get-started/api-keys). Restart Claude Desktop after saving the file. - -#### Runpod docs MCP server +### VS Code with Copilot -1. Open **Settings** in Claude Desktop. -2. Navigate to **Connectors** and select **Add custom connector**. -3. Configure the connector: - - **Name:** `Runpod Docs` - - **URL:** `https://docs.runpod.io/mcp` -4. Click **Add**. +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**. -### Cursor +### Claude Desktop -[Cursor](https://cursor.com) is an AI-powered code editor built on VS Code. +Add the following to your Claude Desktop config file: -Add the Runpod API MCP server to your project-specific or global `.cursor/mcp.json` file: +- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json` +- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json` ```json { @@ -200,55 +96,11 @@ Add the Runpod API MCP server to your project-specific or global `.cursor/mcp.js } ``` -For the docs MCP server, add: - -```json -{ - "mcpServers": { - "runpod-docs": { - "url": "https://docs.runpod.io/mcp" - } - } -} -``` - -For more details, see the [Cursor MCP documentation](https://docs.cursor.com/en/context/mcp). - -### VS Code with Copilot - -GitHub Copilot in VS Code supports MCP servers for enhanced context and capabilities. - -#### Runpod API MCP server - -1. Open the Command Palette (Ctrl+Shift+P on Windows/Linux or Cmd+Shift+P on macOS). -2. Run **MCP: Add Server** -3. Select **stdio** -4. Enter the following details: - - **Name:** `Runpod` - - **Command:** `npx` - - **Arguments:** `-y @runpod/mcp-server@latest` -5. Add environment variable: - - **Key:** `RUNPOD_API_KEY` - - **Value:** Your Runpod API key -6. Select **Global** or **Workspace** depending on your needs. -7. Click **Add**. - -#### Runpod docs MCP server - -1. Open the Command Palette (Ctrl+Shift+P on Windows/Linux or Cmd+Shift+P on macOS). -2. Run **MCP: Add Server**. -3. Select **HTTP**. -4. Enter the following details: - - **URL:** `https://docs.runpod.io/mcp` - - **Name:** `Runpod Docs` -5. Select **Global** or **Workspace**. -6. Click **Add**. +Restart Claude Desktop after saving the file. ### Windsurf -[Windsurf](https://windsurf.com) is an AI-powered code editor. - -Edit your Windsurf MCP config file at `~/.codeium/windsurf/mcp_config.json`: +Edit `~/.codeium/windsurf/mcp_config.json` (or open from **Settings** > **Cascade** > **MCP Servers** > **View raw config**): ```json { @@ -259,21 +111,14 @@ Edit your Windsurf MCP config file at `~/.codeium/windsurf/mcp_config.json`: "env": { "RUNPOD_API_KEY": "your_api_key_here" } - }, - "runpod-docs": { - "serverUrl": "https://docs.runpod.io/mcp" } } } ``` -You can also open this file from Windsurf: **Settings** > **Cascade** > **MCP Servers** > **View raw config**. - ### Cline -[Cline](https://cline.bot) is an AI coding agent that runs as a VS Code extension. - -Open the Cline sidebar, click the **MCP Servers** icon, then select **Configure MCP Servers** to edit `cline_mcp_settings.json`: +Open the Cline sidebar in VS Code, click the **MCP Servers** icon, then select **Configure MCP Servers** to edit `cline_mcp_settings.json`: ```json { @@ -285,10 +130,6 @@ Open the Cline sidebar, click the **MCP Servers** icon, then select **Configure "RUNPOD_API_KEY": "your_api_key_here" }, "disabled": false - }, - "runpod-docs": { - "url": "https://docs.runpod.io/mcp", - "disabled": false } } } @@ -296,9 +137,7 @@ Open the Cline sidebar, click the **MCP Servers** icon, then select **Configure ### Gemini CLI -[Gemini CLI](https://github.com/google-gemini/gemini-cli) is Google's command-line interface for Gemini. - -Add the following to `~/.gemini/settings.json` (global) or `.gemini/settings.json` (project-level): +Add to `~/.gemini/settings.json` (global) or `.gemini/settings.json` (project-level): ```json { @@ -309,60 +148,27 @@ Add the following to `~/.gemini/settings.json` (global) or `.gemini/settings.jso "env": { "RUNPOD_API_KEY": "your_api_key_here" } - }, - "runpod-docs": { - "httpUrl": "https://docs.runpod.io/mcp" } } } ``` -Gemini CLI uses `httpUrl` for HTTP transport servers, not `url`. - -### OpenAI Codex CLI - -[Codex CLI](https://github.com/openai/codex) is OpenAI's command-line coding agent. - -Add the following to `~/.codex/config.toml` (global) or `.codex/config.toml` (project-level): - -```toml -[mcp_servers.runpod] -command = "npx" -args = ["-y", "@runpod/mcp-server@latest"] - -[mcp_servers.runpod.env] -RUNPOD_API_KEY = "your_api_key_here" - -[mcp_servers.runpod-docs] -url = "https://docs.runpod.io/mcp" -``` - -Codex CLI uses TOML format instead of JSON. - ### Other clients -For other MCP-compatible clients, use the following connection details: +For any other MCP-compatible client, use the following connection details: -**Runpod API MCP server (stdio transport)**: - **Command:** `npx` - **Args:** `-y @runpod/mcp-server@latest` - **Environment:** `RUNPOD_API_KEY=your_api_key_here` -**Runpod docs MCP server (HTTP transport)**: -- **URL:** `https://docs.runpod.io/mcp` - -## Usage examples +### Usage examples -### Managing Pods +Once connected, you can interact with your Runpod resources using natural language: -Once connected, you can interact with your Runpod infrastructure using natural language: - -**List all Pods**: ``` List all my Runpod Pods ``` -**Create a new Pod**: ``` Create a new Runpod Pod with the following specifications: - Name: ml-training-pod @@ -372,228 +178,124 @@ Create a new Runpod Pod with the following specifications: - Cloud Type: SECURE ``` -**Get Pod details**: -``` -Get details for Pod ID abc123xyz -``` - -**Stop a running Pod**: -``` -Stop the Pod named "ml-training-pod" -``` - -**Delete a Pod**: -``` -Delete the Pod with ID abc123xyz -``` - -### Managing Serverless endpoints - -**Create a Serverless endpoint**: ``` Create a Runpod Serverless endpoint with the following configuration: - Name: image-generation-endpoint - Template ID: 30zmvf89kd - Minimum workers: 0 - Maximum workers: 5 -- GPU Type: NVIDIA A40 -- Scaling: Workers per second = 4 -``` - -**List all endpoints**: -``` -Show me all my Serverless endpoints -``` - -**Update an endpoint**: -``` -Update endpoint ID xyz789 to have a maximum of 10 workers ``` -**Delete an endpoint**: ``` -Delete the endpoint named "image-generation-endpoint" +Stop the Pod named "ml-training-pod" ``` -### Working with templates +## Runpod docs MCP server -**Create a template**: -``` -Create a new template for Stable Diffusion: -- Name: stable-diffusion-xl -- Docker Image: runpod/stable-diffusion:xl-latest -- Container disk: 20 GB -- Expose HTTP ports: 8000, 8001 -``` +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. -**List templates**: -``` -List all my Runpod templates -``` +**Endpoint:** `https://docs.runpod.io/mcp` -### Managing network volumes +**Authentication:** None required -**Create a network volume**: -``` -Create a network volume: -- Name: training-data -- Size: 100 GB -- Datacenter: US-CA-1 -``` +### Claude Code -**List volumes**: -``` -Show all my network volumes +```bash +claude mcp add runpod-docs --scope user --transport http https://docs.runpod.io/mcp ``` -### Searching documentation - -With the Runpod docs MCP server connected, you can ask questions about Runpod features: +### Codex CLI -**Learn about features**: -``` -Explain the Runpod Serverless model caching feature +```bash +codex mcp add runpod-docs --url https://docs.runpod.io/mcp ``` -**Get configuration help**: -``` -How do I configure environment variables for a Serverless endpoint? -``` +### Cursor -**Understand networking**: -``` -How does global networking work in Runpod? -``` +Add to your `.cursor/mcp.json` file: -**Find code examples**: -``` -Show me examples of using the Python SDK to create a Pod +```json +{ + "mcpServers": { + "runpod-docs": { + "url": "https://docs.runpod.io/mcp" + } + } +} ``` -## Advanced usage +### VS Code with Copilot -### Chaining operations +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**. -Combine multiple operations to accomplish complex tasks: +### Claude Desktop -``` -Create a new Pod with GPU RTX 4090, then create a network volume -named "model-storage" with 50GB, and attach it to the new Pod -``` +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**. -### Conditional operations +### Windsurf -Use conditional logic in your requests: +Add to `~/.codeium/windsurf/mcp_config.json`: -``` -Check if I have any running Pods. If I do, list them with their GPU types -and current costs. If not, create a new Pod with the cheapest available GPU. +```json +{ + "mcpServers": { + "runpod-docs": { + "serverUrl": "https://docs.runpod.io/mcp" + } + } +} ``` -### Monitoring and reporting +### Cline -Generate reports about your infrastructure: +Add to `cline_mcp_settings.json`: -``` -Show me a summary of all my Serverless endpoints including their -current worker counts, GPU types, and monthly costs +```json +{ + "mcpServers": { + "runpod-docs": { + "url": "https://docs.runpod.io/mcp", + "disabled": false + } + } +} ``` -### Batch operations +### Gemini CLI -Perform operations on multiple resources: +Add to `~/.gemini/settings.json`. Note that Gemini CLI uses `httpUrl` instead of `url`: +```json +{ + "mcpServers": { + "runpod-docs": { + "httpUrl": "https://docs.runpod.io/mcp" + } + } +} ``` -Stop all Pods that have been running for more than 24 hours -``` - -## Troubleshooting - -### Authentication errors - -**Problem**: "Invalid API key" or "Authentication failed" - -**Solution**: -- Verify your API key is correct. -- Check that the API key has not expired. -- Ensure the API key has appropriate permissions. -- Confirm the environment variable is set correctly. - -### Connection errors -**Problem**: MCP server fails to connect or times out - -**Solution**: -- Verify you have internet connectivity. -- Check that the MCP server URL is correct (`https://docs.runpod.io/mcp` for docs). -- For API server, ensure Node.js 18+ is installed. -- Restart your AI client and try reconnecting. - -### Tool execution errors - -**Problem**: Operations fail or return unexpected results - -**Solution**: -- Verify the resource IDs you're using are correct. -- Check that you have sufficient permissions for the operation. -- Ensure you have adequate credits in your Runpod account. -- Review error messages for specific details about what went wrong. - -### Missing tools - -**Problem**: MCP tools don't appear in your AI client - -**Solution**: -- Verify the MCP server was installed correctly. -- Restart your AI client after installation. -- Check the MCP server configuration file for syntax errors. -- Run `/mcp` (in Claude) or equivalent command to list available tools. - -### Documentation search returns no results - -**Problem**: Docs MCP server searches return empty or irrelevant results - -**Solution**: -- Rephrase your query with different keywords. -- Be more specific about what you're looking for. -- Try breaking complex queries into simpler questions. -- Check that the docs MCP server is connected (URL: `https://docs.runpod.io/mcp`). - -### Performance issues - -**Problem**: MCP server is slow or unresponsive - -**Solution**: -- Check your internet connection speed. -- Verify you're not hitting rate limits on the Runpod API. -- For the API server, ensure Node.js has sufficient resources. -- Try restarting the MCP server. - -## Security best practices - -The MCP ecosystem is rapidly evolving. Follow these best practices to keep your infrastructure secure: - -### Protect your API keys - -- **Never commit API keys to version control:** Use environment variables or secure secret management. -- **Limit permissions:** Grant only the minimum necessary permissions to each API key. -- **Rotate keys regularly:** Periodically generate new API keys and revoke old ones. -- **Monitor key usage:** Review API key activity for unexpected access patterns. +### Other clients -### Enable human confirmation +For any other MCP-compatible client, use URL `https://docs.runpod.io/mcp` (HTTP transport). -- **Review before execution:** Enable confirmation prompts in your AI client for destructive operations. -- **Monitor resource changes:** Regularly check your Runpod dashboard for unexpected resource creation or modification. +### Usage examples -### Data protection +With the docs MCP server connected, you can ask questions about Runpod features: -- **Be aware of data sharing:** AI assistants may send prompts and tool results to their cloud services. -- **Avoid sensitive data in prompts:** Don't include passwords, private keys, or confidential data in your requests. -- **Review AI client privacy policies:** Understand how your AI tool provider handles data. +``` +Explain the Runpod Serverless model caching feature +``` -## Related resources +``` +How do I configure environment variables for a Serverless endpoint? +``` -- [Runpod REST API reference](/api-reference/overview). -- [API key setup guide](/get-started/api-keys). -- [Model Context Protocol specification](https://modelcontextprotocol.io). -- [Runpod MCP GitHub repository](https://github.com/runpod/runpod-mcp). +``` +How does global networking work in Runpod? +```