Code Runner

io.github.formulahendryPublished by GitHub account formulahendryv0.1.9Updated Oct 24, 2026

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

VerifiedSTDIODesktop onlyDeveloper ToolsAI & ML

Overview

AI-generated overview

Lets an assistant execute code snippets in many programming languages and return the output.

What you can do
Code Runner exposes a run-code tool that executes a code snippet and shows the result. It supports a long list of languages, including JavaScript, TypeScript, Python, PHP, Ruby, Go, Lua, PowerShell, BASH/SH, C# Script, F# Script, R, Swift, Julia, Kotlin Script, Dart and Haskell. It can be started locally over stdio via npx or Docker, or run with a Streamable HTTP transport.
When to use it
Useful when you want the assistant to actually run small programs, check calculations, or inspect the local machine through a script instead of only writing code. It fits quick experiments and one-off snippets rather than full project builds.
Requirements
A local runtime: Node.js for the npm package (npx) or Docker for the container image. The interpreter or compiler for each language you want to run must be installed and available in the PATH environment variable. No accounts, API keys or environment variables are declared.
Before you install
The run-code tool executes arbitrary code on the machine where the server runs, with the permissions of that process, so snippets can read, modify or delete local files and make network calls. Only run code you trust, and prefer an isolated container or sandbox for untrusted input.

Installation

In SourceWeft

  1. Open Code Runner in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

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:

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:

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:

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:

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

Run with Streamable HTTP Transport

shell
npm install -g mcp-server-code-runner@latestmcp-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

[Image]

[Image]

Build your own MCP Server

Want to build your own MCP Server? Try Yeoman Generator for MCP Server to create your MCP Server project!

Source: README.md at commit 529b5ed

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.1.9LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts