Deno Sandbox MCP Server

Deno Sandbox MCP Server

By bewt85 GitHub

An MCP server that allows you to run TypeScript and JavaScript code securely on your local machine using the Deno® sandbox. This server provides a controlled environment for executing code with explicit permission controls. This project is not affiliated with Deno Land LLC in any way.

deno typescript
Overview

What is Deno Sandbox MCP Server?

Deno Sandbox MCP Server is a secure environment for executing TypeScript and JavaScript code on your local machine using the Deno® sandbox, allowing for explicit permission controls.

How to use Deno Sandbox MCP Server?

To use the server, clone the repository, install dependencies, and configure it with your desired permissions. You can run code snippets directly in the sandbox environment.

Key features of Deno Sandbox MCP Server?

  • Execute TypeScript/JavaScript code securely in a Deno® sandbox.
  • Granular permission control via command-line flags.
  • Clear error messages for permission issues.
  • Resource listing available permissions.

Use cases of Deno Sandbox MCP Server?

  1. Running secure scripts without risking system integrity.
  2. Testing TypeScript/JavaScript code in a controlled environment.
  3. Learning and experimenting with Deno® features safely.

FAQ from Deno Sandbox MCP Server?

  • Is this project affiliated with Deno Land LLC?

No, this project is not affiliated with Deno Land LLC; it is an independent project.

  • How do I install the Deno Sandbox MCP Server?

You can install it by cloning the repository and running npm install.

  • What permissions can I control?

You can control permissions for network access, file system access, and more, depending on your needs.

Content

Deno Sandbox MCP Server

An MCP server that allows you to run TypeScript and JavaScript code securely on your local machine using the Deno® sandbox. This server provides a controlled environment for executing code with explicit permission controls.

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.

Features

  • Execute TypeScript/JavaScript code in a secure Deno® sandbox
  • Granular permission control via command-line flags
  • Clear error messages for permission issues
  • Resource that lists available permissions

Usage with Claude Desktop

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

{
  "mcpServers": {
    "denoSandbox": {
      "command": "node",
      "args": [
        "/absolute/path/to/deno-mcp/dist/index.js",
        "--allow-net=icanhazip.com"
      ]
    }
  }
}

Permission Examples and Tradeoffs

  1. Network Access

    • Permissive: --allow-net
      • Allows all network access
      • Useful for web scraping, API calls
      • Tradeoff: Code can access any website or API
    • Restricted: --allow-net=api.github.com,example.com
      • Allows network access only to specific domains
      • Safer while still enabling useful functionality
      • Tradeoff: Must know domains in advance
  2. File System

    • Permissive: --allow-read --allow-write
      • Full file system access
      • Useful for data processing applications
      • Tradeoff: High security risk, can read/modify any files
    • Restricted: --allow-read=/tmp --allow-write=/tmp
      • Limited to specific directories
      • Good for processing isolated files
      • Tradeoff: Limited functionality, but much safer

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

Security Considerations

This server runs code with precisely the permissions specified when starting the server. No additional permissions will be granted at runtime.

Remember that any code executed has access to the permissions you've provided, so be careful about what permissions you enable. Remember malicious people can use prompt injection to trick your prefered language model into running bad things on your computer.

Installation

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

# Install dependencies
npm install

Development

Build the TypeScript code:

npm run build

Test with the MCP Inspector:

npx @modelcontextprotocol/inspector node dist/index.js --allow-net

Example Tests

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);
    

License

MIT

No tools information available.

The open-source multi-agent chat interface that lets you manage multiple agents in one dynamic conversation and add MCP servers for deep research

python typescript
View Details

MCP Tools Usage From LangChain ReAct Agent / Example in TypeScript

nodejs typescript
View Details

MCP Client Implementation Using LangChain ReAct Agent / TypeScript

nodejs typescript
View Details

Adapters for integrating Model Context Protocol (MCP) tools with LangChain.js applications, supporting both stdio and SSE transports.

javascript typescript
View Details

Adapters for integrating Model Context Protocol (MCP) tools with LangChain.js applications, supporting both stdio and SSE transports.

javascript typescript
View Details

-

mcp-server typescript
View Details

【Every star you give feeds a hungry developer's motivation!⭐️】A Model Context Protocol (MCP) server implementation that provides Google Jobs search capabilities via SerpAPI integration. Features multi-language support, comprehensive search parameters, and smart error handling.

nodejs typescript
View Details