Run code snippets in many programming languages and return the output.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add code-runner -- npx -y mcp-server-code-runner~/.codex/config.toml
[mcp_servers.code-runner]
command = "npx"
args = ["-y", "mcp-server-code-runner"]
# codex mcp add code-runner -- npx -y mcp-server-code-runner~/.cursor/mcp.json
{
"mcpServers": {
"code-runner": {
"command": "npx",
"args": [
"-y",
"mcp-server-code-runner"
]
}
}
}.vscode/mcp.json
{
"servers": {
"code-runner": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-server-code-runner"
]
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"code-runner": {
"command": "npx",
"args": [
"-y",
"mcp-server-code-runner"
]
}
}
}claude_desktop_config.json
{
"mcpServers": {
"code-runner": {
"command": "npx",
"args": [
"-y",
"mcp-server-code-runner"
]
}
}
}.trae/mcp.json
{
"mcpServers": {
"code-runner": {
"command": "npx",
"args": [
"-y",
"mcp-server-code-runner"
]
}
}
}