
Code Runner
io.github.formulahendry由 GitHub 帳號 formulahendry 發布v0.1.9更新於 Oct 24, 2026
Code Runner MCP Server which can run code in various programming languages.
概覽
讓助理執行多種程式語言的程式碼片段並回傳執行結果。
- 可以做什麼
- Code Runner 提供一個 run-code 工具,用來執行程式碼片段並顯示結果。它支援大量語言,包括 JavaScript、TypeScript、Python、PHP、Ruby、Go、Lua、PowerShell、BASH/SH、C# Script、F# Script、R、Swift、Julia、Kotlin Script、Dart 與 Haskell。它可以透過 npx 或 Docker 以 stdio 在本機啟動,也支援 Streamable HTTP 傳輸。
- 適用情境
- 適合希望助理真的執行小程式、驗證計算,或透過指令碼查看本機狀況的情境,而不只是產出程式碼。較適合快速實驗與一次性片段,而非完整的專案建置。
- 執行需求
- 需要本機執行環境:npm 套件(npx)需要 Node.js,容器映像需要 Docker。想執行的每種語言都必須安裝對應的直譯器或編譯器,並加入 PATH 環境變數。未宣告需要帳號、API 金鑰或環境變數。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Code Runner,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
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:
npx for Claude Desktop
Configuration in claude_desktop_config.json:
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:
npx issue on Widnows
On Windows, MCP servers may fail to connect with npx.
You could try below two workarounds:
use bunx
- Install Bun.
- In configuration, change
npxwithbunx.
use cmd
Below is VS Code configuration in settings.json:
Run with Streamable HTTP Transport
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 toolHow 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!
來源:README.md,提交 529b5ed
工具
0版本歷史
1- v0.1.9最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分