@runpod/mcp-server 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/README.md +177 -39
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +511 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +500 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @runpod/mcp-server
|
|
2
2
|
|
|
3
|
+
## 1.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 7b715eb: Add list-gpu-types and list-data-centers tools using public GraphQL API for hardware and region discovery. Enhance list-templates with filter params (includeRunpodTemplates, includePublicTemplates, includeEndpointBoundTemplates). Add tool descriptions to create-pod and list-templates recommending Pytorch 2.8.0 as default template.
|
|
8
|
+
- ea2451b: Add Serverless endpoint runtime tools for invoking deployed workers. New tools: run-endpoint (async), runsync-endpoint (sync), get-job-status, stream-job, cancel-job, retry-job, endpoint-health, and purge-endpoint-queue. These use the Serverless API at api.runpod.ai/v2 with a new serverlessRequest helper.
|
|
9
|
+
- 34c0463: Add caller tracking headers to every outbound API call. Each request now carries a structured `User-Agent` (`runpod-mcp-server/<version> (caller=mcp; client=<mcp_client_name>; client_version=<mcp_client_version>; transport=<stdio|http>)`) and an anonymous per-process `X-Runpod-Session-Id` UUID. The MCP client identity is sourced from the `initialize` handshake's `clientInfo`. No tool behavior changes — observability only — so the Runpod platform can attribute traffic to specific MCP clients (Claude Code, Cursor, Codex, Gemini CLI, etc.) and count distinct agent sessions.
|
|
10
|
+
|
|
3
11
|
## 1.1.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1,31 +1,21 @@
|
|
|
1
|
-
# Runpod MCP
|
|
1
|
+
# Runpod MCP server
|
|
2
2
|
[](https://smithery.ai/server/@runpod/runpod-mcp-ts)
|
|
3
3
|
|
|
4
|
-
This Model Context Protocol (MCP) server
|
|
4
|
+
This Model Context Protocol (MCP) server lets you manage Runpod infrastructure through any MCP-compatible client. It provides tools for working with Pods, Serverless endpoints, templates, network volumes, and container registry authentications.
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## Quick start
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
### Requirements
|
|
9
9
|
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
- **Templates**: Create, list, get details, update, and delete templates
|
|
13
|
-
- **Network Volumes**: Create, list, get details, update, and delete network volumes
|
|
14
|
-
- **Container Registry Authentications**: Create, list, get details, and delete authentications
|
|
15
|
-
|
|
16
|
-
## Quick Start
|
|
17
|
-
|
|
18
|
-
### Prerequisites
|
|
19
|
-
|
|
20
|
-
- Node.js 18 or higher
|
|
21
|
-
- A Runpod account and API key ([get your API key](https://www.runpod.io/console/user/settings))
|
|
10
|
+
- Node.js 18 or higher.
|
|
11
|
+
- A Runpod account and API key ([get your API key](https://www.runpod.io/console/user/settings)).
|
|
22
12
|
|
|
23
13
|
### Running with npx
|
|
24
14
|
|
|
25
15
|
You can run the server directly without installation:
|
|
26
16
|
|
|
27
17
|
```bash
|
|
28
|
-
RUNPOD_API_KEY=
|
|
18
|
+
RUNPOD_API_KEY=YOUR_API_KEY npx @runpod/mcp-server@latest
|
|
29
19
|
```
|
|
30
20
|
|
|
31
21
|
### Installing via Smithery
|
|
@@ -36,66 +26,214 @@ To install for Claude Desktop automatically via [Smithery](https://smithery.ai/s
|
|
|
36
26
|
npx -y @smithery/cli install @runpod/runpod-mcp-ts --client claude
|
|
37
27
|
```
|
|
38
28
|
|
|
39
|
-
## Setting up with
|
|
29
|
+
## Setting up with your client
|
|
30
|
+
|
|
31
|
+
Most MCP clients use a JSON configuration file with the same general structure. The examples below show the npx approach (recommended for most users) and the local build approach (for development). Replace `YOUR_API_KEY` with your actual Runpod API key.
|
|
32
|
+
|
|
33
|
+
### Claude Code
|
|
34
|
+
|
|
35
|
+
Add the MCP server globally so it's available across all your projects:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
claude mcp add runpod -s user \
|
|
39
|
+
-e RUNPOD_API_KEY=YOUR_API_KEY \
|
|
40
|
+
-- npx -y @runpod/mcp-server@latest
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Or add it to a specific project (creates a `.mcp.json` file you can commit):
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
claude mcp add runpod -s project \
|
|
47
|
+
-e RUNPOD_API_KEY=YOUR_API_KEY \
|
|
48
|
+
-- npx -y @runpod/mcp-server@latest
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Verify the server is connected with `claude mcp list`. If you're in an active session, type `/mcp` to reconnect without restarting.
|
|
52
|
+
|
|
53
|
+
### Claude Desktop
|
|
54
|
+
|
|
55
|
+
Edit the config file at `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{
|
|
59
|
+
"mcpServers": {
|
|
60
|
+
"runpod": {
|
|
61
|
+
"command": "npx",
|
|
62
|
+
"args": ["-y", "@runpod/mcp-server@latest"],
|
|
63
|
+
"env": {
|
|
64
|
+
"RUNPOD_API_KEY": "YOUR_API_KEY"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Restart Claude Desktop after saving.
|
|
72
|
+
|
|
73
|
+
### Cursor
|
|
74
|
+
|
|
75
|
+
Add the following to `.cursor/mcp.json` in your project directory, or `~/.cursor/mcp.json` for global access:
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"mcpServers": {
|
|
80
|
+
"runpod": {
|
|
81
|
+
"command": "npx",
|
|
82
|
+
"args": ["-y", "@runpod/mcp-server@latest"],
|
|
83
|
+
"env": {
|
|
84
|
+
"RUNPOD_API_KEY": "YOUR_API_KEY"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Windsurf
|
|
92
|
+
|
|
93
|
+
Open Windsurf settings (Cmd+Shift+P → "Open Windsurf Settings"), navigate to the Cascade section, and enable MCP. Then edit `~/.codeium/windsurf/mcp_config.json`:
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"mcpServers": {
|
|
98
|
+
"runpod": {
|
|
99
|
+
"command": "npx",
|
|
100
|
+
"args": ["-y", "@runpod/mcp-server@latest"],
|
|
101
|
+
"env": {
|
|
102
|
+
"RUNPOD_API_KEY": "YOUR_API_KEY"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### VS Code (GitHub Copilot)
|
|
110
|
+
|
|
111
|
+
MCP works in VS Code's agent mode (requires VS Code 1.101+). Add the following to `.vscode/mcp.json` in your workspace:
|
|
112
|
+
|
|
113
|
+
```json
|
|
114
|
+
{
|
|
115
|
+
"mcpServers": {
|
|
116
|
+
"runpod": {
|
|
117
|
+
"command": "npx",
|
|
118
|
+
"args": ["-y", "@runpod/mcp-server@latest"],
|
|
119
|
+
"env": {
|
|
120
|
+
"RUNPOD_API_KEY": "YOUR_API_KEY"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Click the "Start" button next to the server entry to connect.
|
|
128
|
+
|
|
129
|
+
### Cline
|
|
130
|
+
|
|
131
|
+
Open Cline in VS Code, click the hamburger menu (☰), and go to MCP Servers. You can add servers through the marketplace or manually configure in Cline's settings using the same JSON structure shown above.
|
|
132
|
+
|
|
133
|
+
### JetBrains IDEs
|
|
40
134
|
|
|
41
|
-
|
|
42
|
-
2. Edit the config file:
|
|
43
|
-
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
44
|
-
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
45
|
-
3. Add the server configuration:
|
|
135
|
+
Create a `mcp.json` file at `~/.junie/mcp.json` (global) or `.junie/mcp/` in your project:
|
|
46
136
|
|
|
47
137
|
```json
|
|
48
138
|
{
|
|
49
139
|
"mcpServers": {
|
|
50
140
|
"runpod": {
|
|
51
141
|
"command": "npx",
|
|
52
|
-
"args": ["@runpod/mcp-server@latest"],
|
|
142
|
+
"args": ["-y", "@runpod/mcp-server@latest"],
|
|
53
143
|
"env": {
|
|
54
|
-
"RUNPOD_API_KEY": "
|
|
144
|
+
"RUNPOD_API_KEY": "YOUR_API_KEY"
|
|
55
145
|
}
|
|
56
146
|
}
|
|
57
147
|
}
|
|
58
148
|
}
|
|
59
149
|
```
|
|
60
150
|
|
|
61
|
-
|
|
151
|
+
### Other clients
|
|
62
152
|
|
|
63
|
-
|
|
153
|
+
This server uses stdio transport and works with any MCP-compatible client. The configuration pattern is the same across all clients — point the command to `npx` with `@runpod/mcp-server@latest` as the argument, and set `RUNPOD_API_KEY` in the environment. For a full list of MCP clients, see the [official MCP clients page](https://modelcontextprotocol.io/clients).
|
|
64
154
|
|
|
65
|
-
|
|
155
|
+
## Using a local build
|
|
156
|
+
|
|
157
|
+
If you want to run from a local clone of the repo (for development or to test unreleased changes):
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
git clone https://github.com/runpod/runpod-mcp.git
|
|
161
|
+
cd runpod-mcp
|
|
162
|
+
pnpm install
|
|
163
|
+
pnpm build
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Then replace the `command` and `args` in any of the configurations above with:
|
|
167
|
+
|
|
168
|
+
```json
|
|
169
|
+
{
|
|
170
|
+
"command": "node",
|
|
171
|
+
"args": ["/absolute/path/to/runpod-mcp/dist/index.mjs"]
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
After making changes to the source, re-run `pnpm build` and restart or reconnect the MCP server for changes to take effect.
|
|
176
|
+
|
|
177
|
+
## Usage examples
|
|
178
|
+
|
|
179
|
+
### List all Pods
|
|
66
180
|
|
|
67
181
|
```
|
|
68
|
-
Can you list all my Runpod
|
|
182
|
+
Can you list all my Runpod Pods?
|
|
69
183
|
```
|
|
70
184
|
|
|
71
|
-
### Create a new
|
|
185
|
+
### Create a new Pod
|
|
72
186
|
|
|
73
187
|
```
|
|
74
|
-
Create a new Runpod
|
|
188
|
+
Create a new Runpod Pod with the following specifications:
|
|
75
189
|
- Name: test-pod
|
|
76
190
|
- Image: runpod/pytorch:2.1.0-py3.10-cuda11.8.0-devel-ubuntu22.04
|
|
77
191
|
- GPU Type: NVIDIA GeForce RTX 4090
|
|
78
192
|
- GPU Count: 1
|
|
79
193
|
```
|
|
80
194
|
|
|
81
|
-
### Create a
|
|
195
|
+
### Create a Serverless endpoint
|
|
82
196
|
|
|
83
197
|
```
|
|
84
|
-
Create a Runpod
|
|
198
|
+
Create a Runpod Serverless endpoint with the following configuration:
|
|
85
199
|
- Name: my-endpoint
|
|
86
200
|
- Template ID: 30zmvf89kd
|
|
87
201
|
- Minimum workers: 0
|
|
88
202
|
- Maximum workers: 3
|
|
89
203
|
```
|
|
90
204
|
|
|
91
|
-
##
|
|
205
|
+
## Contributing
|
|
206
|
+
|
|
207
|
+
To get started with local development, clone the repo and build:
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
git clone https://github.com/runpod/runpod-mcp.git
|
|
211
|
+
cd runpod-mcp
|
|
212
|
+
pnpm install
|
|
213
|
+
pnpm build
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
After making changes, rebuild with `pnpm build`. In Claude Code, type `/mcp` to reconnect to the updated server without restarting your session. You can also use `pnpm build:watch` for auto-rebuilding during development.
|
|
217
|
+
|
|
218
|
+
All tools live in `src/index.ts`. The server uses two backends: the REST API (`runpodRequest()`) for authenticated CRUD operations, and the GraphQL API (`graphqlRequest()`) for public read-only queries like GPU types and data centers. Follow existing patterns when adding new tools — kebab-case names, Zod schemas with `.describe()`, and JSON stringified responses.
|
|
219
|
+
|
|
220
|
+
This project uses [changesets](https://github.com/changesets/changesets) for versioning and npm publishing. Every PR with user-facing changes needs a changeset file at `.changeset/DESCRIPTIVE_NAME.md`:
|
|
221
|
+
|
|
222
|
+
```markdown
|
|
223
|
+
---
|
|
224
|
+
"@runpod/mcp-server": minor
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
Description of what changed and why.
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
Use `patch` for bug fixes, `minor` for new tools or features, and `major` for breaking changes. The `.changeset/` directory is gitignored, so use `git add -f` to stage changeset files.
|
|
231
|
+
|
|
232
|
+
See [CLAUDE.md](./CLAUDE.md) for the full development guide including architecture details, tool conventions, and known issues.
|
|
92
233
|
|
|
93
|
-
|
|
234
|
+
## Security considerations
|
|
94
235
|
|
|
95
|
-
|
|
96
|
-
- Be cautious about what operations you perform
|
|
97
|
-
- Consider setting up a separate API key with limited permissions
|
|
98
|
-
- Don't use this in a production environment without proper security measures
|
|
236
|
+
This server requires your Runpod API key, which grants full access to your Runpod account. Never share your API key. Be cautious about what operations you perform, and consider setting up a separate API key with limited permissions. Do not use this in a production environment without proper security measures.
|
|
99
237
|
|
|
100
238
|
## License
|
|
101
239
|
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED