Deno Sandbox MCP Server

Deno Sandbox MCP Server

mcp-deno-sandbox•bybewt85

An MCP server that runs TypeScript, JavaScript, and Python code in a local Deno-based sandbox with explicit permission controls.

License: MIT•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Executes TypeScript and JavaScript inside a Deno sandbox that relies on the same technology Chrome uses to isolate malicious websites.
  • •Runs Python inside the same Deno environment using Pyodide.
  • •Lets users control sandbox permissions for reading files, writing files, denying specific files, and accessing websites or IP addresses.
  • •Exposes a resource describing the permissions available in the sandbox.

BEST FOR

  • •Letting a language model test code it writes without trusting it with unrestricted system access.
  • •Constraining generated code to specific folders or trusted websites.
  • •Running JavaScript or Python in a controlled environment with permission limits.

ABOUT MCP-DENO-SANDBOX

Deno Sandbox MCP Server is cataloged as an MCP server attributed to bewt85. An MCP server that runs TypeScript, JavaScript, and Python code in a local Deno-based sandbox with explicit permission controls. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Deno Sandbox MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

How does the sandbox limit what generated code can do?

Permissions are passed to the Deno runtime, letting you restrict file reads and writes, deny access to specific files, and limit network access to chosen websites or IP addresses.

What are the security tradeoffs of enabling broad permissions?

The project warns that the sandbox is undermined by blanket FFI or execution permissions and by allowing write access to the file managing server permissions.

Can Python code write files in the sandbox?

Python cannot use open for writing for some reason, though reading works; the tool description includes a workaround using js.fs.writeFileSync.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 84ec190513e6 · 采集于 2026-11-13 10:06:53 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

Deno Sandbox MCP Server

npm version

An MCP server that allows you to run TypeScript, JavaScript, and Python code in a sandbox on your local machine using the Deno® sandbox. This server provides a controlled environment for executing code with explicit permission controls (i.e. which websites it can visit, which files it can read).

Note: This project is not affiliated with Deno Land LLC in any way. I'm just a fan of the Deno® runtime. "Deno" is a registered trademark of Deno Land LLC.

Screenshot of a cowsay cow saying hello

How and why

LLMs are great at writing code and it helps if the LLM can run the code itself to test it. The problem is that they cannot be trusted not to do damage, especially if a malicious human can trick the LLM using prompt injection. For example you innocently ask a LLM to summarise an email and someone wrote you an email telling your LLM to run code to delete all your files and send all your bitcoin to them.

A sandbox enforces limitations on what the code written by your LLM can do. For example we might say it can only change files in a specific folder, or contact specific trusted websites.

Each operating system has different ways of creating sandboxes. Some are more secure, some are easier to setup. This project strikes a balance between the two.

Our sandbox uses Deno which in turn uses the same technology Chrome uses to stop malicious websites damaging your computer. This lets you run Typescript and Javascript and relies on very little of my code.

Some hard working people have also made Pyodide which lets you run Python inside a web browser. We use that to let you run Python inside the same Deno environment.

You control permissions by passing arguments which are given directly to the Deno runtime. You can configure which:

  • files can be read (e.g. your codebase)
  • which files can we written
  • deny access to specific files (e.g. ssh keys)
  • which websites or IP addresses can be accessed

Non Features

I would like to keep this codebase simpler to read than alternatives so people can audit it themselves. Simplicity is an important security feature; the more people who understand it, the more who can spot a bug.

I have also chosen to sacrifice some performance by not reusing pyodide environments. This creates a small overhead but it makes the implementation easier to reason about.

Inspiration

Usage with Claude Desktop

This MCP should work with a range of MCP clients.

You either need Node.js or Deno installed. You don't need both.

To use this MCP server with Claude Desktop, add it to your claude_desktop_config.json in:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

If you have Deno installed

{
  "mcpServers": {
    "denoSandbox": {
      "command": "deno",
      "args": [
        "run",
        "npm:mcp-deno-sandbox",
        "--allow-net=icanhazip.com,example.com",
      ]
    }
  }
}

If you have Node.js installed then Deno will be installed automatically

{
  "mcpServers": {
    "denoSandbox": {
      "command": "npx",
      "args": [
        "mcp-deno-sandbox",
        "--allow-net=icanhazip.com,example.com"
      ]
    }
  }
}

You can help your LLM by encouraging it to use these tools. There is also a resource which defines the permissions available in the sandbox. You can suggest that your LLM checks what permissions it has if it keeps getting permission denied errors.

Permission Examples

You need to set the permissions at runtime; if you change them you need to restart the server.

The permissions are the same as the Deno® permissions and are just passed through.

Examples

  1. Network Access

    • Permissive: --allow-net
      • Allows all network access
    • Restricted: --allow-net=api.github.com,example.com
      • Allows network access only to specific domains
  2. File System

    • Permissive: --allow-read --allow-write
      • Full file system access
      • Tradeoff: Rogue LLMs can access your dotfiles and anything else you can (including the file it can edit to give itself more permissions)
    • Restricted: --allow-read=/tmp --allow-write=/tmp
      • Limited to specific directories
      • Good for processing isolated files

For a complete list of permissions and detailed documentation, see Deno® Security.

Security Considerations

This server runs code using the permissions specified when starting the server. These permissions are passed through to the Deno® runtime.

Be careful about what permissions you enable. The sandbox is completely undermined by:

  • giving blanket FFI or execution permissions
  • allowing write access to the file which manages the server permissions (e.g. claude_desktop_config.json)

You should also think carefully about read permissions to sensitive dotfiles you have (e.g. with credentials for AWS, NPM, OpenAI); especially if you have granted network access.

Remember malicious people can use prompt injection to trick your prefered language model into running bad things on your computer. Maybe they can hide some invisible text in a PDF which you cannot read or in the middle of a long document you ask it to summarise.

Deno® has some additional suggestions if you would like even more isolation for untrusted code.

Known Issues

Python

  • you cannot use open(PATH, 'w') to write files for some reason. It works for reading files, I don't know what writing doesn't work. I included a hint how to get around this in the tool description. You can also point out to your LLM that it can run import js; js.fs.writeFileSync(PATH, CONTENT). This runs in the same Deno sanbox but is a little bit more annoying.
  • If you give -A, -R, or -W permissions, it is hard to tell which files should be mounted into the pyodide environment. For now, I just guess your home directory and /tmp. You can also specify other directories explicitly and these will be mounted.
  • I am not sure if this mounting will work correctly on Windows.

Development

# Clone the repository
git clone https://github.com/bewt85/mcp-deno-sandbox.git
cd mcp-deno-sandbox

# Install dependencies
npm install

Check the code formatting and types:

npm run checks

Fix some issues automatically:

npm run fix

Test with the MCP Inspector:

npx @modelcontextprotocol/inspector ./node_modules/.bin/ts-node src/index.ts

Try these examples in the inspector:

  1. Basic arithmetic (works without permissions):

    console.log(1 + 2);
    
  2. Network access (requires --allow-net):

    fetch('https://icanhazip.com').then(response => response.text()).then(ip => console.log(`Your IP is: ${ip.trim()}`));
    
  3. File system access (requires --allow-read):

    const text = Deno.readTextFileSync('/path/to/file.txt');
    console.log(text);
    

Contributing

I don't have a lot of spare time so I will not be able to engage with most feature requests / contributions. It is probably better to fork the repository if you would like to add something. Apologies.

Releases

When you want to do a release:

  • update the version in package.json to X.Y.Z
  • merge your changes
  • make a release in GitHub vX.Y.Z
  • wait for it to be automatically deployed to NPM

License

MIT

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Deno Sandbox MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-deno-sandbox)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools