Code Runner

Developer tools

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

Your AI app calls the Code Runner MCP server, which does the developer tools work and sends the result back to the chat.

About Code Runner

Code Runner is a community MCP server from formulahendry, filed in our directory under developer tools. Code Runner MCP Server which can run code in various programming languages.

Code Runner runs on your own machine: your AI app starts it with the command npx -y mcp-server-code-runner@0.1.8 and talks to it over standard input and output.

Code Runner is listed in the official MCP registry as io.github.formulahendry/code-runner, version 0.1.9.

At a glance

Publisher
formulahendry (community)
Runs
Locally on your machine
Install from
Node.js package on npm: mcp-server-code-runner
Written in
TypeScript
License
MIT
GitHub stars
240
Official MCP registry
io.github.formulahendry/code-runner

How to set up Code Runner

  1. Install Node.js on the machine that runs your AI app, because Code Runner starts with npx and downloads its package on first run.
  2. Check the Code Runner README for keys or settings; the registry lists none that Code Runner requires.
  3. Add Code Runner to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Code Runner tools to confirm the connection.
  5. Run one read-only task with Code Runner first, and keep your app asking before each tool call until the results look right.

Code Runner compared with similar servers

  • Mindmap by YuChenSSR has fewer GitHub stars than Code Runner (240 against 240); both are community servers, and both run locally.
  • Sloppy by Heyosseus has more GitHub stars than Code Runner (241 against 240); both are community servers, and both run locally.
  • Nano Banana by ConechoAI has fewer GitHub stars than Code Runner (240 against 240); both are community servers, and both run locally.

Before you connect Code Runner

  • Give Code Runner its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Code Runner tool call until you trust what it does with them.
  • Treat text that Code Runner fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Code Runner on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Code Runner

How marketing and sales teams put Code Runner to work, by company size. Pick the size closest to yours and start Code Runner on one use case.

Small business

  • A small business with a developer can use Code Runner to ship site and tracking fixes faster, with the AI reading the code it changes.
  • Technical founders can ask Code Runner to explain and fix a marketing site issue without context switching between tools.
  • Code Runner runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Growth engineers can use Code Runner to build landing pages, tracking and integrations in fewer cycles, with reviews kept in the normal flow.
  • Marketing ops engineers can connect Code Runner to keep scripts and automations documented and versioned as they change.
  • Start Code Runner on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprise engineering teams can roll out Code Runner with repo scopes and audit logs, so agents work only where they are allowed.
  • Platform teams can standardize on Code Runner so web and marketing engineering share one reviewed way of working with AI.
  • Code Runner is a community server, so have security review the code and pin a version before Code Runner touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Code Runner README

From formulahendry/mcp-server-code-runner on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

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"
        ]
      }
    }
  }
}
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:

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

Run with Streamable HTTP Transport

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!

Questions about Code Runner

What is the Code Runner MCP server?

Code Runner MCP Server which can run code in various programming languages. Code Runner is maintained by formulahendry on GitHub at formulahendry/mcp-server-code-runner, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Code Runner MCP server?

Add Code Runner to your AI app's MCP config with the command npx -y mcp-server-code-runner@0.1.8. In Claude Code, run claude mcp add --transport stdio code-runner -- npx -y mcp-server-code-runner@0.1.8. To run Code Runner this way you need Node.js installed.

Does Code Runner need an API key?

The registry lists no required keys for Code Runner. Check the Code Runner README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Code Runner an official MCP server?

No. Code Runner is a community server maintained by formulahendry. Community servers can be excellent; read the code and the open issues before you give Code Runner access to company data.

What license is Code Runner under?

Code Runner is released under the MIT license, according to its GitHub repository. The license covers the code of Code Runner; the service it connects to has its own terms.