返回市场
活塞-mcp

活塞-mcp

作者:alvii1476 星标更新:2025-07-07

项目介绍

<p align="center"> <img alt="Piston Logo" src="https://github.com/engineer-man/piston/blob/master/var/docs/images/piston.svg" width=125 /> </p> <h1 align="center"> Piston MCP 服务器 </h1> <p align="center"> <strong><i>piston-mcp</i></strong> 是一个MCP服务器,允许大型语言模型连接并使用 <a href="https://github.com/engineer-man/piston"><i>Piston</i></a> 执行代码。 </p> <div align="center">

GitHub Actions License

</div>

安装

您可以在不克隆的情况下本地尝试 piston-mcp

安装 uv

要尝试 piston-mcp,您需要安装 uv

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

安装 MCP 客户端

您还需要下载一个 MCP 客户端来连接到 piston-mcp,例如 Claude Desktop

更新 MCP 客户端配置

更新 MCP 客户端的配置以连接到 piston-mcp

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

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

# 在 MacOS 和 Linux 上
~/Library/Application\ Support/Claude/claude_desktop_config.json
# 在 Windows 上
%APPDATA%\Claude\claude_desktop_config.json

使用

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

Claude 演示

致谢