Cinch

io.github.yusufkadry由 GitHub 帳號 yusufkadry 發布v0.1.1更新於 Oct 24, 2026

Run AI-generated code safely. gVisor-isolated Python/JS sandboxes for any MCP client. Pay per run.

概覽

AI 產生的概覽

讓助理在遠端 gVisor 隔離沙箱中執行簡短的 Python 或 JavaScript 程式,並取回標準輸出、標準錯誤、結束碼與執行時間。

可以做什麼
只提供一個工具 execute_code,用來執行自成一體的 Python 或 JavaScript 程式,並回傳標準輸出、標準錯誤、結束碼與執行時間。每次呼叫都會在 Cinch 的基礎設施上取得一個乾淨、用過即丟的沙箱,無法存取你的機器、檔案系統或本機網路。環境刻意保持精簡:Python 3.12 與 Node 20、僅標準函式庫、無網路、根目錄唯讀、可寫的 /tmp 很小、256 MB 記憶體、0.5 核 CPU、10 秒上限。呼叫之間不會保留狀態。
適用情境
適合希望助理真正執行它撰寫的程式並看到實際輸出的情境,而不是把程式碼交給你自行執行。適用於只需標準函式庫的小型自成一體計算、解析或演算法驗證。不適合需要第三方套件、網路存取、大量記憶體或長時間執行的任務。
執行需求
需要本機 Node.js 執行環境(Node 18 或更新版本),因為它透過 npx 以 stdio 程序方式執行。需要在 CINCH_API_KEY 環境變數中提供從 cinch.codes 取得的 Cinch API 金鑰。需要連線至 Cinch API 端點的網路,可用 CINCH_BASE_URL 覆寫;可用 CINCH_TIMEOUT_MS 設定用戶端逾時。僅支援桌面版 MCP 用戶端。
安裝前請注意
需要密鑰 CINCH_API_KEY,它在用戶端設定的 env 區塊中傳遞,應避免放入共用檔案。執行按次計費,餘額用盡會停止執行;額度不足的回應會被明確提示且不重試。程式碼及其輸出會傳送到 Cinch 的伺服器,因此不要提交敏感資料。每個輸出串流超過 20,000 字元會被截斷。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Cinch,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

@cinch-codes/mcp

MCP server for Cinch. Gives your AI assistant a real sandbox to run code in.

Without it, an assistant writes code and you run it yourself. With it, the assistant runs the code and reads the actual output — inside a gVisor-isolated container on Cinch's infrastructure, with no access to your machine, filesystem, or local network.

Pay per execution. No subscription floor.

Setup

Get an API key at cinch.codes, then add the server to your MCP client.

Claude Desktop — claude_desktop_config.json:

json
{  "mcpServers": {    "cinch": {      "command": "npx",      "args": ["-y", "@cinch-codes/mcp"],      "env": {        "CINCH_API_KEY": "cinch_live_..."      }    }  }}

Claude Desktop on Windows — same file, but Windows can't spawn npx directly, so wrap it with cmd /c:

json
{  "mcpServers": {    "cinch": {      "command": "cmd",      "args": ["/c", "npx", "-y", "@cinch-codes/mcp"],      "env": {        "CINCH_API_KEY": "cinch_live_..."      }    }  }}

Claude Code (macOS/Linux):

bash
claude mcp add --scope user cinch -e CINCH_API_KEY=cinch_live_... -- npx -y @cinch-codes/mcp

Claude Code (Windows):

cmd
claude mcp add --scope user cinch -e CINCH_API_KEY=cinch_live_... -- cmd /c npx -y @cinch-codes/mcp

Cursor — .cursor/mcp.json, same shape as the Claude Desktop config above.

Restart the client. That's it — no install step, npx fetches it on first run.

What it exposes

execute_code

Runs a self-contained Python or JavaScript program and returns stdout, stderr, exit code, and duration.

ParameterTypeDefaultDescription
codestring—The complete program to run. Must print to stdout to return anything.
languagepython | javascriptpythonRuntime to execute in.

Each call gets a clean sandbox. State does not persist between calls, so every snippet needs to stand on its own.

The sandbox environment

Deliberately minimal. Worth knowing before you wonder why an import failed:

RuntimesPython 3.12, Node 20
PackagesStandard library only. No pip or npm packages are installed, and none can be installed at runtime.
NetworkNone. HTTP, DNS, and package installs all fail.
FilesystemRoot is read-only. /tmp is writable (64 MB) and destroyed when the run ends.
Memory256 MB
CPU0.5 cores
Time limit10 seconds
IsolationgVisor (runsc), all capabilities dropped, no-new-privileges, non-root user, 64-process cap

The tool description tells the model all of this up front, so it writes stdlib-only code instead of reaching for numpy and failing on the first call.

Configuration

VariableRequiredDefaultDescription
CINCH_API_KEYyes—Your Cinch API key.
CINCH_TIMEOUT_MSno20000Client-side timeout in ms. The API caps execution at 10s regardless.
CINCH_BASE_URLnohttps://api.cinch.codesOverride the API endpoint.

Troubleshooting

Windows: "Failed to connect" in claude mcp list — you're missing the cmd /c wrapper. Windows resolves npx to a batch script that can't be spawned directly; re-add the server using the Windows command above.

Windows: npm error ENOENT ... AppData\Roaming\npm — some Node installs never create npm's global folder, and npx refuses to run without it. Create it once and retry:

cmd
mkdir %APPDATA%\npm

Server exits immediately with "CINCH_API_KEY is not set" — the env var didn't reach the server. In Claude Code, put -e CINCH_API_KEY=... before the server name in claude mcp add. In config files, check the env block is inside the cinch entry.

Debugging any connection failure — run the server directly to see the real error instead of a generic status:

bash
CINCH_API_KEY=cinch_live_... npx -y @cinch-codes/mcp   # macOS/Linux
cmd
set CINCH_API_KEY=cinch_live_... && cmd /c npx -y @cinch-codes/mcp   # Windows

Correct behavior is cinch-mcp ... ready followed by silence — an MCP server waits for a client. Anything else printed is the actual failure.

Why sandboxed execution

Code written by a model is untrusted code — nothing reviewed it before it ran. Executing it directly on your machine means handing it your filesystem, your network, and your credentials. Cinch runs it somewhere else entirely, in a disposable container with kernel-level isolation, and sends back only the output.

Notes

  • Requires Node 18 or newer.
  • Output is capped at 20,000 characters per stream to protect your context window; anything beyond that is truncated with a marker.
  • Runs that time out or exit non-zero are returned as tool errors, so the assistant knows the code failed and can correct it.
  • Out-of-credit responses are surfaced clearly and instruct the assistant not to retry, so a drained balance does not turn into a retry loop.

Links

MIT

來源:README.md,提交 2309d48

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.1最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。