Sponsored by Deepsite.site

Node.js Code Sandbox

创建者
Alfonso Grazianoa year ago
Node.js server implementing the Model Context Protocol (MCP) for running arbitrary JavaScript in ephemeral Docker containers with on‑the‑fly npm dependency installation.
概览

What is Node.js Code Sandbox?

Node.js Code Sandbox is a server that implements the Model Context Protocol (MCP) for executing arbitrary JavaScript code in isolated Docker containers, allowing for on-the-fly npm dependency installation.

How to use Node.js Code Sandbox?

To use the Node.js Code Sandbox, ensure Docker is installed and running on your machine. Connect the server to a client (like Claude Desktop) and run JavaScript scripts by sending commands to the server.

Key features of Node.js Code Sandbox?

  • Start and manage isolated Node.js sandbox containers.
  • Execute arbitrary shell commands inside containers.
  • Install specified npm dependencies per job.
  • Run ES module JavaScript snippets and capture stdout.
  • Cleanly tear down containers after execution.
  • Detached Mode: Keep the container alive for long-running processes.

Use cases of Node.js Code Sandbox?

  1. Running quick JavaScript experiments in a safe environment.
  2. Testing and executing scripts that require specific npm packages.
  3. Developing and debugging Node.js applications in isolated containers.

FAQ from Node.js Code Sandbox?

  • What are the prerequisites for using this server?

Docker must be installed and running on your machine.

  • Can I run long-lived services with this server?

Yes! You can use Detached Mode to keep containers alive for long-running services.

  • How do I save files generated by my scripts?

Files can be saved during script execution and will be returned automatically.

服务器配置

{
  "mcpServers": {
    "js-sandbox": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-v",
        "/var/run/docker.sock:/var/run/docker.sock",
        "-v",
        "$HOME/Desktop/sandbox-output:/root",
        "-e",
        "FILES_DIR=$HOME/Desktop/sandbox-output",
        "alfonsograziano/node-code-sandbox-mcp"
      ]
    }
  }
}
推荐的 MCP Server
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Amap Maps高德地图官方 MCP Server
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Playwright McpPlaywright MCP server
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Serper MCP ServerA Serper MCP Server
WindsurfThe new purpose-built IDE to harness magic
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
CursorThe AI Code Editor
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
ChatWiseThe second fastest AI chatbot™
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
DeepChatYour AI Partner on Desktop
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
Tavily Mcp
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code