此模型上下文协议(MCP)服务器使您能够通过Claude或其他与MCP兼容的客户端与RunPod REST API交互。
此模型上下文协议(MCP)服务器可让您借助Claude或其他支持MCP的客户端,与RunPod REST API进行交互。下面将为您详细介绍如何安装、配置和运行该服务器。
该服务器具备以下管理功能:
通过 Smithery 可自动为 Claude Desktop 安装 runpod-mcp-ts:
npx -y @smithery/cli install @runpod/runpod-mcp-ts --client claude
npm install
npm run build
需将 RunPod API 密钥设置为环境变量:
# Linux/macOS
export RUNPOD_API_KEY=your_api_key_here
# Windows (Command Prompt)
set RUNPOD_API_KEY=your_api_key_here
# Windows (PowerShell)
$env:RUNPOD_API_KEY="your_api_key_here"
您可在 RunPod 控制台 获取 API 密钥。
启动服务器:
npm start
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json{
"mcpServers": {
"runpod": {
"command": "node",
"args": ["/path/to/runpod-mcp-server/build/index.js"],
"env": {
"RUNPOD_API_KEY": "your_api_key_here"
}
}
}
}
请将 "args": ["/path/to/runpod-mcp-server/build/index.js"] 替换为仓库中构建文件夹的实际路径。
4. 重启 Claude for Desktop。
以下是使用 Claude 时的一些示例:
你能列出我所有的RunPod pod吗?
创建一个具有以下规格的新的RunPod pod:
- 名称:test-pod
- 镜像:runpod/pytorch:2.1.0-py3.10-cuda11.8.0-devel-ubuntu22.04
- GPU类型:NVIDIA GeForce RTX 4090
- GPU数量:1
创建一个具有以下规格的新的RunPod无服务器端点:
- 名称:my-serverless-endpoint
- 端口:3000
文档未提及相关内容,暂不展示。
文档未提及相关内容,暂不展示。
⚠️ 重要提示
不要共享 API 密钥,始终确保您的 RunPod API 密钥安全,避免将其共享给未经授权的人。
💡 使用建议
- 根据需要为不同的应用程序或服务分配适当的权限级别,以最小化潜在的安全风险。
- 定期更改您的 API 密钥,特别是在怀疑发生安全事件时。