Cover image
Try Now
2025-04-04

Code Runner MCP Server

3 years

Works with Finder

2

Github Watches

14

Github Forks

108

Github Stars

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:

{
  "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:

Install in VS Code Install in VS Code Insiders

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

Installing via Smithery

NOTE: This will run Code Runner MCP Server in a remote Container environment hosted by Smithery.

To install Code Runner MCP Server for Claude Desktop automatically via Smithery:

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

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

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!

相关推荐

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • https://zenepic.net
  • Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • https://reddgr.com
  • Delivers concise Python code and interprets non-English comments

  • 林乔安妮
  • A fashion stylist GPT offering outfit suggestions for various scenarios.

  • 1Panel-dev
  • 💬 MaxKB is a ready-to-use AI chatbot that integrates Retrieval-Augmented Generation (RAG) pipelines, supports robust workflows, and provides advanced MCP tool-use capabilities.

  • GLips
  • MCP server to provide Figma layout information to AI coding agents like Cursor

  • Dhravya
  • Collection of apple-native tools for the model context protocol.

  • Mintplex-Labs
  • The all-in-one Desktop & Docker AI application with built-in RAG, AI agents, No-code agent builder, MCP compatibility, and more.

  • open-webui
  • A simple, secure MCP-to-OpenAPI proxy server

  • adafruit
  • Python code to use the MCP3008 analog to digital converter with a Raspberry Pi or BeagleBone black.

  • idosal
  • Put an end to hallucinations! GitMCP is a free, open-source, remote MCP server for any GitHub project

  • patchy631
  • In-depth tutorials on LLMs, RAGs and real-world AI agent applications.

    Reviews

    3 (1)
    Avatar
    user_sARzNBlt
    2025-04-17

    As a loyal user of mcp-server-code-runner, I highly recommend this application for anyone requiring efficient code execution on a server. Developed by formulahendry, this tool simplifies and streamlines server-side code running tasks. The clear start URL and welcoming info provide easy onboarding for new users. Check it out at https://github.com/formulahendry/mcp-server-code-runner!