Piston MCP Server
piston-mcp is an MCP server that allows LLMs to connect to and execute code using Piston.
](https://github.com/alvii147/piston-mcp/actions) 
\[!警告\] 截至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客户端应该能够为您运行代码:
