Skip to content
Back to search

mcp-server-code-runner

Code Runner MCP Server

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/formulahendry--mcp-server-code-runner/badge.svg)](/listings/formulahendry--mcp-server-code-runner)

HTML

<a href="/listings/formulahendry--mcp-server-code-runner"><img src="/api/listings/formulahendry--mcp-server-code-runner/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

npx for VS Code

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

[![Install in VS Code](https://img.shields.io/badge/Install_MCP_Server_(npx)-VS_Code-0098FF)](https://vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522mcp-server-code-runner%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522-y%2522%252C%2522mcp-server-code-runner%2540latest%2522%255D%257D) [![Install in VS Code Insiders](https://img.shields.io/badge/Install_MCP_Server_(npx)-VS_Code_Insiders-24bfa5)](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522mcp-server-code-runner%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522-y%2522%252C%2522mcp-server-code-runner%2540latest%2522%255D%257D)

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](https://img.shields.io/badge/Install_MCP_Server_(Docker)-VS_Code-0098FF)](https://vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522mcp-server-code-runner%2522%252C%2522command%2522%253A%2522docker%2522%252C%2522args%2522%253A%255B%2522run%2522%252C%2522--rm%2522%252C%2522-i%2522%252C%2522formulahendry%252Fmcp-server-code-runner%2522%255D%257D) [![Install in VS Code Insiders](https://img.shields.io/badge/Install_MCP_Server_(Docker)-VS_Code_Insiders-24bfa5)](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522mcp-server-code-runner%2522%252C%2522command%2522%253A%2522docker%2522%252C%2522args%2522%253A%255B%2522run%2522%252C%2522--rm%2522%252C%2522-i%2522%252C%2522formulahendry%252Fmcp-server-code-runner%2522%255D%257D)

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`](https://github.com/modelcontextprotocol/servers/issues/40).

You could try below two workarounds:

use bunx

1. Install [Bun](https://bun.sh/docs/installation). 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"
        ],
      }
    }
  }
}

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 141 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Code Runner MCP Server
  2. [![NPM Downloads](https://img.shields.io/npm/d18m/mcp-server-code-runner)](https://www.npmjs.com/package/mcp-server-code-runner) [![smithery badge](https://smithery.ai/badge/@formulahendry/mcp-server-code-runner)](https://smithery.ai/server/@formulahendry/mcp-server-code-runner) [![Docker Pulls](https://img.shields.io/docker/pulls/formulahendry/mcp-server-code-runner)](https://hub.docker.com/r/formulahendry/mcp-server-code-runner)
  3. MCP Server for running code snippet and show the result.
  4. 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](https://github.com/formulahendry/mcp-server-code-runner/blob/main/src/constants.ts).
  5. <a href="https://glama.ai/mcp/servers/d3mluq4vy9">
  6. <img width="380" height="200" src="https://glama.ai/mcp/servers/d3mluq4vy9/badge" alt="mcp-server-code-runner MCP server" />
  7. </a>
  8. ## Setup
  9. ### npx for VS Code
  10. Install the Code Runner MCP server in VS Code using below buttons:
  11. [![Install in VS Code](https://img.shields.io/badge/Install_MCP_Server_(npx)-VS_Code-0098FF)](https://vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522mcp-server-code-runner%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522-y%2522%252C%2522mcp-server-code-runner%2540latest%2522%255D%257D) [![Install in VS Code Insiders](https://img.shields.io/badge/Install_MCP_Server_(npx)-VS_Code_Insiders-24bfa5)](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522mcp-server-code-runner%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522-y%2522%252C%2522mcp-server-code-runner%2540latest%2522%255D%257D)
  12. Alternatively, you can add configuration in `settings.json`:
  13. ```json
  14. {
  15. "mcp": {
  16. "inputs": [],
  17. "servers": {
  18. "mcp-server-code-runner": {
  19. "command": "npx",
  20. "args": [
  21. "-y",
  22. "mcp-server-code-runner@latest"
  23. ],
  24. }
  25. }
  26. }
  27. }
  28. ```
  29. ### npx for Claude Desktop
  30. Configuration in `claude_desktop_config.json`:
  31. ```json
  32. {
  33. "mcpServers": {
  34. "mcp-server-code-runner": {
  35. "command": "npx",
  36. "args": [
  37. "-y",
  38. "mcp-server-code-runner@latest"
  39. ],
  40. }
  41. }
  42. }
  43. ```
  44. ### Docker
  45. Use VS Code as example. Install the Code Runner MCP server in VS Code using below buttons:
  46. [![Install in VS Code](https://img.shields.io/badge/Install_MCP_Server_(Docker)-VS_Code-0098FF)](https://vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522mcp-server-code-runner%2522%252C%2522command%2522%253A%2522docker%2522%252C%2522args%2522%253A%255B%2522run%2522%252C%2522--rm%2522%252C%2522-i%2522%252C%2522formulahendry%252Fmcp-server-code-runner%2522%255D%257D) [![Install in VS Code Insiders](https://img.shields.io/badge/Install_MCP_Server_(Docker)-VS_Code_Insiders-24bfa5)](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522mcp-server-code-runner%2522%252C%2522command%2522%253A%2522docker%2522%252C%2522args%2522%253A%255B%2522run%2522%252C%2522--rm%2522%252C%2522-i%2522%252C%2522formulahendry%252Fmcp-server-code-runner%2522%255D%257D)
  47. Alternatively, you can add configuration in `settings.json`:
  48. ```json
  49. {
  50. "mcp": {
  51. "inputs": [],
  52. "servers": {
  53. "mcp-server-code-runner": {
  54. "command": "docker",
  55. "args": [
  56. "run",
  57. "--rm",
  58. "-i",
  59. "formulahendry/mcp-server-code-runner"
  60. ]
  61. }
  62. }
  63. }
  64. }
  65. ```
  66. ### npx issue on Widnows
  67. On Windows, [MCP servers may fail to connect with `npx`](https://github.com/modelcontextprotocol/servers/issues/40).
  68. You could try below two workarounds:
  69. #### use bunx
  70. 1. Install [Bun](https://bun.sh/docs/installation).
  71. 2. In configuration, change `npx` with `bunx`.
  72. #### use cmd
  73. Below is VS Code configuration in `settings.json`:
  74. ```json
  75. {
  76. "mcp": {
  77. "inputs": [],
  78. "servers": {
  79. "mcp-server-code-runner": {
  80. "command": "cmd",
  81. "args": [
  82. "/c",
  83. "npx",
  84. "-y",
  85. "mcp-server-code-runner@latest"
  86. ],
  87. }
  88. }
  89. }
  90. }
  91. ```
  92. ## Run with [Streamable HTTP Transport](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http)
  93. ```shell
  94. npm install -g mcp-server-code-runner@latest
  95. mcp-server-code-runner --transport http
  96. ```
  97. ## Usage
  98. 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.
  99. Try below prompts in the application which has configured Code Runner MCP Server:
  100. * `Run the JavaScript Code: console.log(5+6)`
  101. * `Where is temporary folder in my OS? Use run-code tool`
  102. * `How many CPUs do I have in my machine? Use run-code tool`
  103. ![](./images/usage-confirm.png)
  104. ![](./images/usage-result.png)
  105. ## Build your own MCP Server
  106. Want to build your own MCP Server? Try [Yeoman Generator for MCP Server](https://www.npmjs.com/package/generator-mcp) to create your MCP Server project!

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.