local-only server
The server can only run on the client’s local machine because it depends on local resources.
Integrations
Allows running AutoHotkey code snippets with result display
Supports execution of AutoIt code snippets and shows results
Enables running Clojure code snippets and displays execution results
Code Runner MCP 服务器
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 。完整列表可以在这里的constants.ts中查看。
设置
VS Code 的 npx
使用以下按钮在 VS Code 中安装 Code Runner MCP 服务器:
或者,您可以在settings.json
中添加配置:
克劳德桌面版的 npx
claude_desktop_config.json
中的配置:
Docker
以 VS Code 为例,使用以下按钮在 VS Code 中安装 Code Runner MCP 服务器:
或者,您可以在settings.json
中添加配置:
通过 Smithery 安装
***注意:***这将在 Smithery 托管的远程容器环境中运行 Code Runner MCP Server。
要通过Smithery自动为 Claude Desktop 安装 Code Runner MCP Server:
Widnows 上的 npx 问题
在 Windows 上, MCP 服务器可能无法连接npx
。
您可以尝试以下两种解决方法:
使用bunx
- 安装Bun 。
- 在配置中,将
npx
更改为bunx
。
使用 cmd
以下是settings.json
中的 VS Code 配置:
用法
在使用 Code Runner MCP Server 之前,请确保您要运行的编程语言的解释器或编译器已在PATH
环境变量中设置。
在已配置 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
构建您自己的 MCP 服务器
想要构建自己的 MCP 服务器吗?试试Yeoman Generator for MCP 服务器,创建你的 MCP 服务器项目!
You must be authenticated.
Tools
MCP 服务器用于运行代码片段并显示结果。