Run JavaScript/Python code in a secure sandbox with support for **any package import**.
Overview
Use Cases:
- Let AI quickly test if an npm/python package meets your requirements!
- Use AI to run code for logic verification, reducing hallucinations!
- Have AI write and execute testable functions for you! ...and so much more!
Core Capabilities:
- Secure Sandbox: Code runs in an isolated environment with strict limitations on file system, network, and environment variable access, preventing malicious code from affecting the host environment.
- Multi-language Support: Execute JavaScript/TypeScript and Python code snippets with ease!
- Import Any Package: Dynamically import and use external libraries in your code (specific support depends on the chosen runtime).
Please note: First-time package imports require installation time, so please be patient! Subsequent runs will use cached packages, skipping the installation step. Inspired by https://ai.pydantic.dev/mcp/run-python/ project, we've reimplemented it with simplified package installation and added JavaScript support! 🚀✨ Project repository: https://github.com/mcpc-tech/mcpc/tree/main/packages/code-runner-mcp - Issues and PRs welcome!
Server Config
{
"mcpServers": {
"code-runner": {
"command": "npx",
"args": [
"-y",
"deno",
"run",
"--allow-all",
"jsr:@mcpc/code-runner-mcp/bin"
],
"env": {
"DENO_PERMISSION_ARGS": "--allow-net"
},
"transportType": "stdio"
}
}
}