io.github.formulahendry/code-runner
Code Runner MCP Server which can run code in various programming languages.
Install
Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).
mcp-server-code-runnerclaude mcp add code-runner -- npx -y mcp-server-code-runner@0.1.8
{
"mcpServers": {
"code-runner": {
"command": "npx",
"args": [
"-y",
"mcp-server-code-runner@0.1.8"
]
}
}
}
docker.io/formulahendry/mcp-server-code-runner:0.1.8claude mcp add code-runner -- docker run -i --rm docker.io/formulahendry/mcp-server-code-runner:0.1.8
{
"mcpServers": {
"code-runner": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/formulahendry/mcp-server-code-runner:0.1.8"
]
}
}
}
Documentation
From the project's README on GitHub, refreshed weekly. Links open on GitHub.
Contents
Code Runner MCP Server
MCP Server for running code snippet and show the result.
It supports running multiple programming languages: JavaScript, PHP, Python, Perl, Perl 6, Ruby, Go, Lua, Groovy, PowerShell, BAT/CMD, BASH/SH, F# Script, C# Script, VBScript, TypeScript, CoffeeScript, Scala, Swift, Julia, Crystal, OCaml Script, R, AppleScript, Elixir, Clojure, Racket, Scheme, AutoHotkey, AutoIt, Kotlin Script, Dart, Haskell, Ni, Lisp, Kit, V, SCSS, Sass. Full list could be seen here in constants.ts.
Setup
npx for VS Code
Install the Code Runner MCP server in VS Code using below buttons:
-VS_Code-0098FF) -VS_Code_Insiders-24bfa5)
Alternatively, you can add configuration in settings.json:
{
"mcp": {
"inputs": [],
"servers": {
"mcp-server-code-runner": {
"command": "npx",
"args": [
"-y",
"mcp-server-code-runner@latest"
],
}
}
}
}
npx for Claude Desktop
Configuration in claude_desktop_config.json:
{
"mcpServers": {
"mcp-server-code-runner": {
"command": "npx",
"args": [
"-y",
"mcp-server-code-runner@latest"
],
}
}
}
Docker
Use VS Code as example. Install the Code Runner MCP server in VS Code using below buttons:
-VS_Code-0098FF) -VS_Code_Insiders-24bfa5)
Alternatively, you can add configuration in settings.json:
{
"mcp": {
"inputs": [],
"servers": {
"mcp-server-code-runner": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"formulahendry/mcp-server-code-runner"
]
}
}
}
}
npx issue on Widnows
On Windows, MCP servers may fail to connect with npx.
You could try below two workarounds:
use bunx
- Install Bun.
- In configuration, change
npxwithbunx.
use cmd
Below is VS Code configuration in settings.json:
{
"mcp": {
"inputs": [],
"servers": {
"mcp-server-code-runner": {
"command": "cmd",
"args": [
"/c",
"npx",
"-y",
"mcp-server-code-runner@latest"
],
}
}
}
}
Run with Streamable HTTP Transport
npm install -g mcp-server-code-runner@latest
mcp-server-code-runner --transport http
Usage
Before using Code Runner MCP Server, please make sure interpreter or compiler of the programming language you want to run is set in PATH environment variable.
Try below prompts in the application which has configured Code Runner MCP Server:
Run the JavaScript Code: console.log(5+6)Where is temporary folder in my OS? Use run-code toolHow many CPUs do I have in my machine? Use run-code tool
Build your own MCP Server
Want to build your own MCP Server? Try Yeoman Generator for MCP Server to create your MCP Server project!
Frequently asked questions
What is io.github.formulahendry/code-runner?
Code Runner MCP Server which can run code in various programming languages.
How do I install io.github.formulahendry/code-runner?
It runs on your machine. In Claude Code: claude mcp add code-runner -- npx -y mcp-server-code-runner@0.1.8. For other clients, paste the JSON configuration from this page into their MCP settings.
Does io.github.formulahendry/code-runner need an API key?
Its registry entry lists no required key or secret. Some features may still need an account with the service it connects to.
Is io.github.formulahendry/code-runner open source?
Yes. Its code is on GitHub under the MIT license.
Who maintains io.github.formulahendry/code-runner?
It is published by formulahendry. AI.tn lists it but does not maintain or endorse it.
From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.