formulahendry_mcp_server_code_runner

formulahendry_mcp_server_code_runner

by formulahendry
An MCP server for executing code snippets across multiple programming languages and displaying the results.

Code Runner MCP Server

NPM Downloads
smithery badge
Docker Pulls

The Code Runner MCP Server is a powerful tool for executing code snippets and displaying the results. It supports a wide range of programming languages, making it versatile for developers working with multiple technologies.

Overview

The Code Runner MCP Server is designed to run code snippets in various programming languages and return the output. It integrates seamlessly with tools like VS Code and Claude Desktop, enabling developers to execute code directly from their development environments.

Supported Languages

The server supports the following programming languages:

  • JavaScript
  • PHP
  • Python
  • Perl
  • 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

For a complete list, refer to the constants.ts file.

Setup

npx for VS Code

Add the following configuration to your settings.json file:

{
  "mcp": {
    "inputs": [],
    "servers": {
      "mcp-server-code-runner": {
        "command": "npx",
        "args": ["-y", "mcp-server-code-runner"]
      }
    }
  }
}

npx for Claude Desktop

Add the following configuration to your claude_desktop_config.json file:

{
  "mcpServers": {
    "mcp-server-code-runner": {
      "command": "npx",
      "args": ["-y", "mcp-server-code-runner"]
    }
  }
}

Docker

To use Docker, add the following configuration to your settings.json file:

{
  "mcp": {
    "inputs": [],
    "servers": {
      "mcp-server-code-runner": {
        "command": "docker",
        "args": ["run", "--rm", "-i", "formulahendry/mcp-server-code-runner"]
      }
    }
  }
}

Installing via Smithery

To install the Code Runner MCP Server for Claude Desktop automatically via Smithery, run the following command:

npx -y @smithery/cli install @formulahendry/mcp-server-code-runner --client claude

npx Issue on Windows

On Windows, MCP servers may fail to connect with npx. You can try the following workarounds:

Use bunx

  1. Install Bun.
  2. In the configuration, change npx to bunx.

Use cmd

Add the following configuration to your settings.json file:

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

Usage

Before using the Code Runner MCP Server, ensure that the interpreter or compiler for the programming language you want to run is set in the PATH environment variable.

Try the following prompts in the application that has configured the Code Runner MCP Server:

  • Run the JavaScript Code: console.log(5+6)
  • Where is the temporary folder in my OS? Use run-code tool
  • How many CPUs do I have in my machine? Use run-code tool

Usage Confirm

Usage Result

Build Your Own MCP Server

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

About

The Code Runner MCP Server is an open-source project licensed under the MIT License.

Resources

Contributors

Languages

  • TypeScript (71.3%)
  • Dockerfile (17.7%)
  • JavaScript (11.0%)

Features & Capabilities

Categories
mcp_server model_context_protocol typescript docker api_integration code_execution claude smithery

Implementation Details

Stats

0 Views
70 GitHub Stars

Repository Info

formulahendry Organization

Similar MCP Servers

continuedev_continue by continuedev
25049
21423
9300
SunMonTueWedThuFriSat
303112345678910111213141516171819202122232425262728293012345678910
:
PM
SunMonTueWedThuFriSat
303112345678910111213141516171819202122232425262728293012345678910
:
PM