{"_id":"@capsule-run/mcp-server","_rev":"3-3dde49c9f74ea1ae99a4f73149235578","name":"@capsule-run/mcp-server","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@capsule-run/mcp-server","version":"0.1.0","author":"","license":"Apache-2.0","_id":"@capsule-run/mcp-server@0.1.0","maintainers":[{"name":"mavdol","email":"mdiallo.av@gmail.com"}],"homepage":"https://github.com/mavdol/capsule","bugs":{"url":"https://github.com/mavdol/capsule/issues"},"bin":{"capsule-mcp-server":"dist/index.js"},"dist":{"shasum":"e77f6f0004cda468458ed0411757fbf3f94f122b","tarball":"https://registry.npmjs.org/@capsule-run/mcp-server/-/mcp-server-0.1.0.tgz","fileCount":8,"integrity":"sha512-PKDd3gc1e0xaB2W6KRM+kD159CG0Arou+H0ODSGnlerRw3HQifGpSjyJ/Y7tGTOEdLro5UxOWbnPNlDDmaNOJw==","signatures":[{"sig":"MEYCIQC6fyyy7pEcUmmd7OL83tym6nCXEGcCAFGbBskXj+LWNwIhAKawRx5CHVM8FoF06CUSCiGdC2Y4Imk8cGv3aRTgiqre","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":56456045},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"65e4bf7611b6c982317de6cee75efa2823c6e280","scripts":{"build":"npm run build:wasm && npm run build:ts","build:ts":"tsc","build:wasm":"npm run build:wasm:py && npm run build:wasm:js","build:wasm:js":"capsule build src/js_sandbox.ts --export && mv src/js_sandbox.wasm dist/sandboxes/js_sandbox.wasm","build:wasm:py":"capsule build src/python_sandbox.py --export && mv src/python_sandbox.wasm dist/sandboxes/python_sandbox.wasm"},"_npmUser":{"name":"mavdol","email":"mdiallo.av@gmail.com"},"repository":{"url":"git+https://github.com/mavdol/capsule.git","type":"git"},"_npmVersion":"10.9.4","description":"MCP server to run untrusted python/js code in wasm sandboxes","directories":{},"_nodeVersion":"22.22.0","dependencies":{"zod":"^3.24.0","@capsule-run/cli":"^0.6.3","@capsule-run/sdk":"^0.6.3","@modelcontextprotocol/sdk":"^1.12.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server_0.1.0_1772880404106_0.261003021197457","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@capsule-run/mcp-server","version":"0.1.1","author":"","license":"Apache-2.0","_id":"@capsule-run/mcp-server@0.1.1","maintainers":[{"name":"mavdol","email":"mdiallo.av@gmail.com"}],"homepage":"https://github.com/mavdol/capsule","bugs":{"url":"https://github.com/mavdol/capsule/issues"},"bin":{"capsule-mcp-server":"dist/index.js"},"dist":{"shasum":"753386b620ebfa8b5b4cea32656bb87c9d1c9540","tarball":"https://registry.npmjs.org/@capsule-run/mcp-server/-/mcp-server-0.1.1.tgz","fileCount":8,"integrity":"sha512-aVy4D9GYmgHyhPRziXwVuvZqJYaN0lE8Ja0CD5xV5+/DgCWsl1y66cVXMcLqlYwyOEvmelgZETGtw8EKejfoJg==","signatures":[{"sig":"MEUCIBN7WrO8KX81BP6g0rCzqz+kTzgf4aPNwYc2So2WYSmiAiEAzPDBSa4IntmQpYf4G3+zeTnZs1owY+IuobexAyldTmg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":56467154},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"d098975941f4fff5342981d1e5dc1bc6289de9e0","scripts":{"build":"npm run build:wasm && npm run build:ts","build:ts":"tsc","build:wasm":"npm run build:wasm:py && npm run build:wasm:js","build:wasm:js":"capsule build src/js_sandbox.ts --export && mv src/js_sandbox.wasm dist/sandboxes/js_sandbox.wasm","build:wasm:py":"capsule build src/python_sandbox.py --export && mv src/python_sandbox.wasm dist/sandboxes/python_sandbox.wasm"},"_npmUser":{"name":"mavdol","email":"mdiallo.av@gmail.com"},"repository":{"url":"git+https://github.com/mavdol/capsule.git","type":"git"},"_npmVersion":"10.9.4","description":"MCP server to run untrusted python/js code in wasm sandboxes","directories":{},"_nodeVersion":"22.22.0","dependencies":{"zod":"^3.24.0","@capsule-run/cli":"latest","@capsule-run/sdk":"latest","@modelcontextprotocol/sdk":"^1.12.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server_0.1.1_1772965175197_0.6439974487569631","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@capsule-run/mcp-server","version":"0.1.2","description":"MCP server to run untrusted python/js code in wasm sandboxes","license":"Apache-2.0","author":"","type":"module","main":"dist/index.js","bin":{"capsule-mcp-server":"dist/index.js"},"repository":{"type":"git","url":"git+https://github.com/mavdol/capsule.git"},"homepage":"https://github.com/mavdol/capsule","scripts":{"build:ts":"tsc","build:wasm:py":"capsule build src/python_sandbox.py --export && mv src/python_sandbox.wasm dist/sandboxes/python_sandbox.wasm","build:wasm:js":"capsule build src/js_sandbox.ts --export && mv src/js_sandbox.wasm dist/sandboxes/js_sandbox.wasm","build:wasm":"npm run build:wasm:py && npm run build:wasm:js","build":"npm run build:wasm && npm run build:ts"},"dependencies":{"@modelcontextprotocol/sdk":"^1.12.1","@capsule-run/sdk":"latest","@capsule-run/cli":"latest","zod":"^3.24.0"},"devDependencies":{"@types/node":"^22.0.0","typescript":"^5.7.0"},"_id":"@capsule-run/mcp-server@0.1.2","gitHead":"2b212a56d6e77acfa006393f4102af724239beb0","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/mavdol/capsule/issues"},"_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-wV5JEbyNboCT1uGSqAZP4bMjyOE5zOrPTGLD101cd6XuILGQUA6s23uH9GOt5xaTKh1KIGbuBz3drNZ/AJMEMQ==","shasum":"c42ed9bbb8dae0c67289f8f955c2d5997992cbcc","tarball":"https://registry.npmjs.org/@capsule-run/mcp-server/-/mcp-server-0.1.2.tgz","fileCount":8,"unpackedSize":56511109,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCreOZQyko+h7jWRGp7Z+kabS5e8/0P941QBpdtVntu1wIgaUwyPkjfNCOdqvFxXyeon/Gwh9Usq7PkILxD9yRUZyQ="}]},"_npmUser":{"name":"mavdol","email":"mdiallo.av@gmail.com"},"directories":{},"maintainers":[{"name":"mavdol","email":"mdiallo.av@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-server_0.1.2_1773071131964_0.08428610583005547"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-07T10:46:43.936Z","modified":"2026-03-09T15:45:32.846Z","0.1.0":"2026-03-07T10:46:44.760Z","0.1.1":"2026-03-08T10:19:35.911Z","0.1.2":"2026-03-09T15:45:32.692Z"},"bugs":{"url":"https://github.com/mavdol/capsule/issues"},"license":"Apache-2.0","homepage":"https://github.com/mavdol/capsule","repository":{"type":"git","url":"git+https://github.com/mavdol/capsule.git"},"description":"MCP server to run untrusted python/js code in wasm sandboxes","maintainers":[{"name":"mavdol","email":"mdiallo.av@gmail.com"}],"readme":"# `Capsule` MCP Server\n\n[![MCP Server Release](https://github.com/mavdol/capsule/actions/workflows/mcp-integration-release.yml/badge.svg)](https://github.com/mavdol/capsule/actions/workflows/mcp-integration-release.yml)\n\nGive your AI agent the ability to write and run Python and JavaScript code, in a secure sandbox.\n\nEvery execution happens inside its own WebAssembly sandbox with strict resource limits. No file system access, no risk to your host machine.\n\n## Tools\n\n| Tool | Description |\n|------|-------------|\n| `execute_python` | Run Python code in an isolated sandbox |\n| `execute_javascript` | Run JavaScript code in an isolated sandbox |\n\n### Example\n\nAsk your AI agent:\n\n> *\"I have monthly revenue of [12400, 15800, 14200, 18900, 21000, 19500]. What's the average and which month grew the most?\"*\n\nThe agent calls `execute_python` with:\n\n```python\nrevenue = [12400, 15800, 14200, 18900, 21000, 19500]\n\navg = sum(revenue) / len(revenue)\ngrowth = [revenue[i] - revenue[i-1] for i in range(1, len(revenue))]\nbest_month = growth.index(max(growth)) + 2  # +2 for 1-indexed and offset\n\n{\"average\": round(avg, 2), \"best_growth_month\": best_month, \"growth\": max(growth)}\n```\n\n→ `{\"average\": 16966.67, \"best_growth_month\": 4, \"growth\": 4700}`\n\n## Setup\n\nAdd to your MCP client configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"capsule\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@capsule-run/mcp-server\"]\n    }\n  }\n}\n```\n\n## How It Works\n\nThe server ships two pre-compiled WebAssembly modules: one for Python, one for JavaScript. When a tool is called, the code is executed via `capsule` inside a dedicated Wasm sandbox with:\n\n- **Isolated memory** — each execution gets its own address space\n- **CPU/Ram limits** — fuel-metered execution prevents runaway loops\n- **No host access** — no filesystem or network unless explicitly allowed\n\nLearn more about [Capsule](https://github.com/mavdol/capsule).\n\n## Limitations\n\n- **Stateless** — each execution starts from a clean sandbox. There is no shared state between calls. To chain results, pass previous outputs as inputs to the next execution.\n- **Python HTTP** — standard networking libraries are not compatible with the Wasm sandbox.\n","readmeFilename":"README.md"}