Code Runner logo

Code Runner

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

Install Code Runner

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "code-runner": {
      "command": "npx",
      "args": [
        "-y",
        "issue"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y issue

Process exited before answering initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked 1d ago.

Overview

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

9/9 checks healthy over the last 43d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 1d ago via OSV.dev · issue (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars242Stargazers on the source repository.
npm downloads164Package downloads in the last 30 days.
Last commit8mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

From the project README

Code Runner MCP Server

NPM Downloads smithery badge Docker Pulls

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.

mcp-server-code-runner MCP server

Setup

npx for VS Code

Install the Code Runner MCP server in VS Code using below buttons:

Install in VS Code Install in VS Code Insiders

Alternatively, you can add configuration in settings.json:

config.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:

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:

Install in VS Code Install in VS Code Insiders

Alternatively, you can add configuration in settings.json:

config.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

  1. Install Bun.
  2. In configuration, change npx with bunx.

use cmd

Below is VS Code configuration in settings.json:

config.json
{
  "mcp": {
    "inputs": [],
    "servers": {
      "mcp-server-code-runner": {
        "command": "cmd",
        "args": [
          "/c",
          "npx",
          "-y",
          "mcp-server-code-runner@latest"
        ],
      }
    }
  }
}

Run with Streamable HTTP Transport

Terminal
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 tool
  • How 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!

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Code Runner

code-runner is an MCP server that runs code snippets and shows their results, allowing MCP-compatible clients to execute code across many programming languages. It supports languages including JavaScript, Python, PHP, Ruby, Go, Lua, TypeScript, C#, Bash, PowerShell, Swift, Kotlin Script, Dart, R, and others listed in its constants.ts file.

You can install code-runner with npx by configuring an MCP client to run `npx -y mcp-server-code-runner@latest`. The README provides configuration examples for VS Code and Claude Desktop, using the server name `mcp-server-code-runner` and the npx command with those arguments.

code-runner supports many languages, including JavaScript, PHP, Python, Perl, Ruby, Go, Lua, Groovy, PowerShell, Bash, TypeScript, C#, Scala, Swift, Julia, R, Elixir, Kotlin Script, Dart, Haskell, Lisp, V, Sass, and others. The complete list is available in the project’s `constants.ts` file.

Yes, code-runner can run with Docker using the `formulahendry/mcp-server-code-runner` image.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewCode Runner AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/code-runner?style=directory)](https://allmcps.com/mcp/code-runner)
HTML Embed
<a href="https://allmcps.com/mcp/code-runner"><img src="https://allmcps.com/api/badge/code-runner?style=directory" alt="Code Runner on AllMCPs" /></a>