What is Code Runner MCP Server?
Code Runner MCP Server is an MCP server that runs code snippets and displays the results. It supports multiple programming languages including JavaScript, Python, Ruby, Go, PHP, and many others. This server is for developers who want to execute code directly through MCP-compatible applications like VS Code or Claude Desktop.
How to use Code Runner MCP Server?
Install and configure the server via npx, Docker, or bunx in your MCP client's configuration file (e.g., settings.json for VS Code or claude_desktop_config.json for Claude Desktop). Ensure the interpreter or compiler for your desired language is set in the PATH environment variable, then use prompts like Run the JavaScript Code: console.log(5+6).
Key features of Code Runner MCP Server
- Runs code snippets in 37+ programming languages
- Supports setup via npx, Docker, or bunx
- Offers Streamable HTTP Transport option
- Returns execution output and results to the client
- Works with VS Code, Claude Desktop, and other MCP hosts
- Simple prompt-based usage with
run-code tool
Use cases of Code Runner MCP Server
- Execute ad-hoc code snippets without leaving your editor
- Test small scripts or algorithms during development
- Run system commands or retrieve OS information via code
- Validate code logic before integrating into larger projects
Comments