CodeQL Development MCP Server
OFFICIAL SERVERWrite, test, run and profile CodeQL queries from an AI assistant through the local CodeQL CLI
Runs code snippets in dozens of languages on your machine and returns their output
By Jun Han (individual) TypeScript Local · stdio Developer tools
26 popularity score ★ 242 ↓ 1.0k/wk
Opens the app, which asks before it adds the server.
claude mcp add code-runner -- npx -y mcp-server-code-runner@latest{
"mcpServers": {
"code-runner": {
"command": "npx",
"args": [
"-y",
"mcp-server-code-runner@latest"
]
}
}
}{
"mcpServers": {
"code-runner": {
"command": "npx",
"args": [
"-y",
"mcp-server-code-runner@latest"
]
}
}
}{
"servers": {
"code-runner": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-server-code-runner@latest"
]
}
}
}[mcp_servers.code-runner]
command = "npx"
args = ["-y", "mcp-server-code-runner@latest"]gemini mcp add --scope user code-runner npx -- -y mcp-server-code-runner@latestOpens the app, which asks before it adds the server.
claude mcp add code-runner -- docker run --rm -i formulahendry/mcp-server-code-runner{
"mcpServers": {
"code-runner": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"formulahendry/mcp-server-code-runner"
]
}
}
}{
"mcpServers": {
"code-runner": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"formulahendry/mcp-server-code-runner"
]
}
}
}{
"servers": {
"code-runner": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"formulahendry/mcp-server-code-runner"
]
}
}
}[mcp_servers.code-runner]
command = "docker"
args = ["run", "--rm", "-i", "formulahendry/mcp-server-code-runner"]gemini mcp add --scope user code-runner docker -- run --rm -i formulahendry/mcp-server-code-runnerCode Runner MCP Server gives an assistant one tool, run-code, that takes a snippet and a language ID, writes the snippet to a file in the operating system's temporary folder and runs it with that language's usual interpreter or compiler command (node, python -u, go run, ruby, bash, Rscript and so on). Whatever the program prints to standard output comes back as the result. It calls whatever toolchain is already installed rather than bringing its own.
The practical use is letting an assistant check a calculation, try a short script, or ask the machine about itself (its temp folder, CPU count) by writing and running a few lines. It runs over stdio by default; started with --transport http it serves Streamable HTTP instead, and a Docker image is published as well.
The source's language table (src/constants.ts) has 37 language IDs. It does not match the README's list exactly: the README names Elixir and Kotlin Script, but neither has an entry in the code, so the tool will not accept them.
| Runtime | Node.jsorDocker |
|---|
Node.js with npx for the npm way (on Windows the README suggests bunx, which needs Bun, or wrapping npx in cmd /c). The interpreter or compiler for each language you want to run must already be on PATH; the server installs none. For the Docker way, Docker; the image adds only Python 3, Go, PHP and Ruby beside Node.
One tool only; there is no setting to limit languages, set a timeout, or cap output. In the code at src/server.ts every run writes to the same file name (tmp.<extension>) in the temp folder, so two runs at once in the same language can overwrite each other. Any text on standard error makes the call fail with that text, even when the program succeeds, and there is no way to pass stdin or command-line arguments. Python is started as `python`, not `python3`. The Docker image cannot run languages beyond what it ships. The README notes npx may fail to connect on Windows.
Suits a developer who wants an assistant to try out small snippets against the toolchains already on their own machine, and who will approve each run. Because snippets run with the user's own permissions and no sandbox, pick the Docker way to keep runs inside a container, or a sandboxed code-execution service, when the code might be untrusted or the machine holds anything sensitive. Not suited to long-running jobs, programs that need input or arguments, or projects with several files.
run-code