Token导航 LogoToken导航TokenDH.com
Code Runner MCP Server logo
开发工具stdio官方级别未说明来源级核验

Code Runner MCP Server

MCP Server

Code Runner MCP Server

工具数

1

提示词数

0

GitHub Stars

241

资源数

0
开发工具TypeScriptVS Code调试工具Claude DesktopClaudeVS CodeVS Code Insiders

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

formulahendry

提供方

formulahendry

最后核验

2026/5/18 03:28

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

npx 安装

详细介绍

代码运行程序MCP服务器

](https://www.npmjs.com/package/mcp-server-code-runner) ](https://smithery.ai/server/@formulahendry/mcp-server-code-runner) ](https://hub.docker.com/r/formulahendry/mcp-server-code-runner)

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 Script、R、AppleScript、Elixir、Clojure、Racket、Scheme、AutoHotkey、AutoIt、Kotlin Script、Dart、Haskell、Ni、Lisp、Kit、V、SCSS、Sass。完整列表可在此处查看 警察.

设置

npx代表VS代码

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

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

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

适用于Claude Desktop的npx

配置在 claude_desktop_config.json:

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

码头工人

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

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

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

Widnows上的npx问题

在Windows上, MCP服务器可能无法连接到 npx.

您可以尝试以下两种解决方法:

使用bunx

  1. 安装 包子.
  2. 在配置中,更改 npx 随着 bunx.

使用cmd

以下是VS代码配置 settings.json:

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

与一起跑步 可流式HTTP传输

npm install -g mcp-server-code-runner@latest
mcp-server-code-runner --transport http

用法

在使用Code Runner MCP Server之前,请确保在中设置了要运行的编程语言的解释器或编译器 PATH 环境变量。

在已配置Code Runner MCP服务器的应用程序中尝试以下提示:

  • 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

![](./images/usage-confirm.png)

![](./images/usage-result.png)

构建自己的MCP服务器

想要构建自己的MCP服务器吗?尝试 MCP服务器用约曼发电机 创建您的MCP服务器项目!

目录标签

目录标签

开发工具TypeScriptVS Code调试工具developer-tools代码运行混合部署多语言支持教学工具

支持客户端

Claude DesktopClaudeVS CodeVS Code Insiders

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Node.js

部署方式(deploymentType,部署类型)

local-only

工具数量(toolCount,工具数)

1

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiononelocal-only

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP