MCP代码执行服务

piston-mcp是一个MCP服务器,允许LLMs通过Piston连接并执行代码。

  • by alvii147
  • Python
  • 本地部署
  • 9 星标
  • 更新于
在 GitHub 查看 alvii147/piston-mcp

使用说明

Piston MCP Server

piston-mcp is an MCP server that allows LLMs to connect to and execute code using Piston.

[!警告] 截至2026年2月15日, 活塞API 不再公开可用,需要授权令牌。这意味着 活塞mcp 将不再与公开托管的Piston实例一起工作。

安装

你可以试试 活塞mcp 在本地不进行克隆。

安装 紫外线

试用 活塞mcp 您需要安装 uv:

# On MacOS and Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# On Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

安装MCP客户端

您还需要下载MCP客户端以连接到 活塞mcp,例如 克劳德桌面.

更新MCP客户端配置

使用以下配置更新MCP客户端的配置以连接到 活塞mcp:

{
  "mcpServers": {
    "piston": {
      "command": "uv",
      "args": [
        "tool",
        "run",
        "--from",
        "git+https://github.com/alvii147/piston-mcp.git@main",
        "piston_mcp"
      ]
    }
  }
}

对于Claude Desktop,配置文件通常位于:

# On MacOS and Linux
~/Library/Application\ Support/Claude/claude_desktop_config.json
# On Windows
%APPDATA%\Claude\claude_desktop_config.json

用法

完成上述步骤后,您的MCP客户端应该能够为您运行代码:

致谢