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:
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:
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"
]
}
}
}
}
Installing via Smithery
NOTE: This will run Code Runner MCP Server in a remote Container environment hosted by Smithery.
To install Code Runner MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @formulahendry/mcp-server-code-runner --client claude
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"
],
}
}
}
}
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!
Code Runner MCP Server
Project Details
- formulahendry/mcp-server-code-runner
- mcp-server-code-runner
- MIT License
- Last Updated: 4/14/2025
Categories
Recomended MCP Servers
Official Notion MCP Server
Model Context Protocol server implementation for Figma API
A powerful MCP memory using a knowledge graph powered by elastic search
An MCP server to allow you to debug webpages using LLMs
mcp-collection
CLI to set up and deploy MCP Servers to Cloudflare Workers in seconds. Just write TypeScript functions to...
MCP server for interacting with SingleStore Management API and services
A simple and clear example for implementation and understanding Anthropic MCP (on AWS Bedrock).
This is an MCP (Model Context Protocol) server that connects your Limitless Pendant data to AI tools like...
mcp server accessing MySQL database
MCP web search using perplexity without any API KEYS
MCP server to expose local zotero repository to MCP clients





