home / mcp / code runner mcp server
Code Runner MCP Server
Configuration
View docs{
"mcpServers": {
"formulahendry-mcp-server-code-runner": {
"command": "npm",
"args": [
"install",
"-g",
"mcp-server-code-runner@latest"
]
}
}
}The Code Runner MCP Server lets you run code snippets in many languages and return the results through a programmable MCP interface. It’s useful for testing small code blocks, educational tips, or automating quick evaluations in your workflows.
Configure your MCP client to connect to the Code Runner MCP Server using one of the supported local, stdio-based start methods. You can run via your editor, a desktop client, or a container, then send code snippets to be executed and receive the results. The server base supports numerous languages and executes code in a controlled environment so you can verify outputs, errors, and behavior of small code samples.
Prerequisites: you need Node.js installed (for npm/npx usage) and, if you choose the Docker route, Docker installed on your system.
Choose one of the supported local start methods and add the corresponding configuration to your MCP client.
{
"mcp": {
"inputs": [],
"servers": {
"code_runner_vscode": {
"command": "npx",
"args": [
"-y",
"mcp-server-code-runner@latest"
]
}
}
}
}{
"mcpServers": {
"code_runner_claude": {
"command": "npx",
"args": [
"-y",
"mcp-server-code-runner@latest"
]
}
}
}{
"mcp": {
"inputs": [],
"servers": {
"code_runner_docker": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"formulahendry/mcp-server-code-runner"
]
}
}
}
}npm install -g mcp-server-code-runner@latest
mcp-server-code-runner --transport httpBefore running, ensure the interpreter or compiler for your chosen language is available in your PATH. You can then prompt the server with code snippets like JavaScript, Python, Ruby, or many other supported languages to see immediate results.
Executes a provided code snippet in the configured language and returns the output.