Skip to main content
Glama

JavaScript Sandbox MCP Server

by garc33

js-sandbox MCP 服务器

提供安全 JavaScript 执行环境的模型上下文协议服务器。

特征

工具

  • execute_js - 在隔离环境中执行 JavaScript 代码
    • 参数:
      • code (必需):要执行的 JavaScript 代码
      • timeout (可选):最大执行时间(以毫秒为单位)(100-30000ms)
      • memory (可选):内存限制(以字节为单位)(1MB-100MB)
    • 返回代码执行的结果

安全

  • 在受控环境中隔离代码执行
  • 可配置的执行时间和内存限制
  • 防范恶意代码

发展

安装依赖项:

npm install

构建服务器:

npm run build

具有自动重建的开发模式:

npm run watch

安装

要与 Claude Desktop 一起使用,请添加服务器配置:

MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

{ "mcpServers": { "js-sandbox": { "command": "/path/to/js-sandbox/build/index.js" } } }

调试

由于 MCP 服务器通过 stdio 进行通信,调试起来可能比较困难。我们推荐使用MCP Inspector ,其运行方式如下:

npm run inspector

检查器将提供一个 URL 来访问浏览器中的调试工具。

Install Server
A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

local-only server

The server can only run on the client's local machine because it depends on local resources.

提供安全、隔离的 JavaScript 执行环境,具有可配置的时间和内存限制,以安全地运行 Claude 的代码。

  1. 特征
    1. 工具
    2. 安全
  2. 发展
    1. 安装
      1. 调试

    Related MCP Servers

    • -
      security
      A
      license
      -
      quality
      The sessionless code interpreter. Securely run AI-generated code in stateful sandboxes that run forever.
      Last updated -
      65
      176
      Rust
      MIT License
    • -
      security
      F
      license
      -
      quality
      A TypeScript application that allows Claude to safely execute bash commands with security safeguards including whitelisted commands, directories, and comprehensive logging.
      Last updated -
      TypeScript
      • Linux
    • -
      security
      F
      license
      -
      quality
      A TypeScript application that allows Claude to safely execute bash commands with security safeguards, providing a secure interface through the Model Context Protocol.
      Last updated -
      TypeScript
      • Linux
    • A
      security
      F
      license
      A
      quality
      A secure JavaScript REPL server that enables executing code snippets in a sandboxed environment with memory protection, timeout handling, and comprehensive error reporting.
      Last updated -
      2
      150
      7
      JavaScript
      • Linux
      • Apple

    View all related MCP servers

    MCP directory API

    We provide all the information about MCP servers via our MCP API.

    curl -X GET 'https://glama.ai/api/mcp/v1/servers/garc33/js-sandbox-mcp-server'

    If you have feedback or need assistance with the MCP directory API, please join our Discord server