您可以在不克隆的情况下本地尝试 piston-mcp。
要尝试 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 客户端来连接到 piston-mcp,例如 Claude Desktop。
更新 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 客户端应该能够为您运行代码:
