FM

formulahendry/mcp-server-code-runner

部署与 DevOps

本页由 AI 翻译,技术细节请以原文为准。 查看原文

242 stars 33 forks 质量 75 趋势 18MIT

formulahendry/mcp-server-code-runner 是从 https://github.com/formulahendry/mcp-server-code-runner. 导入的一个 MCP 服务器候选。

概览

formulahendry/mcp-server-code-runner 是从 https://github.com/formulahendry/mcp-server-code-runner. 导入的一个 MCP 服务器候选。

概述(AI 翻译)

MCP 服务器用于运行代码片段并展示结果。

它支持运行多种编程语言: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 脚本、R、AppleScript、Elixir、Clojure、Racket、Scheme、AutoHotkey、AutoIt、Kotlin 脚本、Dart、Haskell、Ni、Lisp、Kit、V、SCSS、Sass。完整列表可在此处查看constants.ts。

布置

VS Code 的 NPX

使用以下按钮在VS Code中安装Code Runner MCP服务器:

-VS_Code-0098FF) -VS_Code_Insiders-24bfa5)

或者,你可以在 settings.json 中添加配置:

npx for Claude Desktop

claude_desktop_config.json 中的配置:

Docker

以 VS Code 为例。使用以下按钮在 VS Code 中安装 Code Runner MCP 服务器:

-VS_Code-0098FF) -VS_Code_Insiders-24bfa5)

或者,你可以在 settings.json 中添加配置:

Widnows的NPX问题

在Windows上,MCP服务器可能无法与npx连接。

你可以试试以下两个变通方法:

用bunx

  1. 安装包子。
  2. 在配置中,将npx改为bunx。

使用cmd

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

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:

在 GitHub 查看完整 README

安装

npx -y mcp-server-code-runner@latest
新手?先看 mcpskill.org 教程 →

配置

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