Code Runner

v0.1.9Coding Agentsstable

Code Runner MCP Server which can run code in various programming languages.

mcpcode-runnerserver
Share:
241
Stars
0
Downloads
0
Weekly
0/5

What is Code Runner?

Code Runner is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to code runner mcp server which can run code in various programming languages.

Code Runner MCP Server which can run code in various programming languages.

This server falls under the Coding Agents category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • run-code

Use Cases

Execute code in multiple programming languages.
Test and validate code snippets dynamically.
Run scripts across different language runtimes.
formulahendry

Maintainer

LicenseMIT License
Languagetypescript
Versionv0.1.9
UpdatedMay 4, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y mcp-server-code-runner

Manual Installation

npx -y mcp-server-code-runner

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Code Runner

The Code Runner MCP server allows AI assistants to execute code snippets in over 40 programming languages directly within an MCP session, turning any supported client into an interactive code execution environment. It exposes a single run-code tool that accepts source code and a language identifier, runs it through the appropriate local interpreter or compiler, and returns the output. Developers use it to validate logic, test snippets, and automate script execution without switching to a separate terminal.

Prerequisites

  • Node.js 18+ with npx available
  • Language runtimes you want to execute must be installed and available on your PATH (e.g. Python, Go, Ruby, Rust, PHP)
  • An MCP-compatible client such as Claude Desktop or VS Code with MCP extension
  • Optional: Docker if you prefer containerized execution
1

Verify required language runtimes are on PATH

The server delegates execution to local interpreters and compilers. Confirm the languages you plan to use are installed. For example, check Python and Node.

python3 --version && node --version && go version
2

Test the server with npx

Run the server once to confirm it starts cleanly. Press Ctrl+C to stop after verifying startup output.

npx -y mcp-server-code-runner
3

Add the server to your MCP client configuration

Edit your client config file. For Claude Desktop this is claude_desktop_config.json. For VS Code, add to settings.json under the mcp key.

4

Restart your MCP client

Fully quit and reopen Claude Desktop (or reload VS Code) so the new server entry is loaded. The Code Runner server should appear in your connected tools list.

5

Optional: run via Docker for isolation

If you prefer not to install interpreters locally, use the Docker image. Pull and run it as a stdio MCP server.

docker run --rm -i formulahendry/mcp-server-code-runner

Code Runner Examples

Client configuration

Claude Desktop config to register Code Runner using npx. No API keys or environment variables are required.

{
  "mcpServers": {
    "mcp-server-code-runner": {
      "command": "npx",
      "args": ["-y", "mcp-server-code-runner@latest"]
    }
  }
}

Prompts to try

Ask Claude to run code in various languages using the run-code tool.

- "Run this JavaScript code and show the output: console.log(5 + 6)"
- "Execute this Python snippet: import math; print(math.factorial(10))"
- "Run this Go program and tell me the result: package main; import 'fmt'; func main() { fmt.Println(42 * 7) }"
- "Test this Bash script: for i in {1..5}; do echo $i; done"
- "Run this TypeScript code and explain the output: const greet = (name: string) => `Hello, ${name}!`; console.log(greet('World'))"

Troubleshooting Code Runner

Code execution fails with 'command not found' for a language

The interpreter for that language is not installed or not on PATH. Install it (e.g. 'brew install python' or 'apt install python3') and ensure it is accessible from the same shell environment your MCP client uses. Restart the client after installing.

On Windows, npx hangs or the server fails to connect

Install Bun (bun.sh) and use 'bunx' instead of 'npx' in your config args. Replace 'npx' with 'bunx' in the command field of your MCP config.

HTTP transport mode needed instead of stdio

Start the server with the --transport flag: 'npx -y mcp-server-code-runner --transport http'. This exposes an HTTP endpoint suitable for network-connected MCP clients.

Frequently Asked Questions about Code Runner

What is Code Runner?

Code Runner is a Model Context Protocol (MCP) server that code runner mcp server which can run code in various programming languages. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Code Runner?

Install via npm with the command: npx -y mcp-server-code-runner. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).

Which AI clients work with Code Runner?

Code Runner works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Code Runner free to use?

Yes, Code Runner is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Coding Agents MCP Servers

Explore all coding agents servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "code-runner": { "command": "npx", "args": ["-y", "mcp-server-code-runner"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Code Runner?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides