Code Runner
Code Runner MCP Server which can run code in various programming languages.
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
Maintainer
Works with
Installation
NPM
npx -y mcp-server-code-runnerManual Installation
npx -y mcp-server-code-runnerConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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 versionTest 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-runnerAdd 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.
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.
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-runnerCode 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.
Code Runner Alternatives — Similar Coding Agents Servers
Looking for alternatives to Code Runner? Here are other popular coding agents servers you can use with Claude, Cursor, and VS Code.
Dify
★ 142.2kProduction-ready platform for agentic workflow development.
Ruflo
★ 54.0k🌊 The leading agent orchestration platform for Claude. Deploy intelligent multi-agent swarms, coordinate autonomous workflows, and build conversational AI systems. Features enterprise-grade architecture, self-learning swarm intelligence, RAG integrat
Goose
★ 45.7kan open source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM
Antigravity Awesome Skills
★ 38.3kInstallable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.
AgentScope
★ 25.5kBuild and run agents you can see, understand and trust.
Serena
★ 24.5kA coding agent toolkit that provides IDE-like semantic code retrieval and editing tools, enabling LLMs to efficiently navigate and modify codebases using symbol-level operations instead of basic file reading and string replacements.
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.
Set Up Code Runner in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.