MCP cover image
See in Github
2025-03-15

1

Github Watches

1

Github Forks

1

Github Stars

Deno MCP Server

A Model Context Protocol (MCP) server for executing Deno TypeScript/JavaScript code. This server allows LLMs like Claude to run Deno code securely with configurable permissions.

Features

  • Execute Deno TypeScript or JavaScript code
  • Configure permissions (net, read, write, env, run, etc.)
  • Enable/disable unstable features
  • Get Deno version information

Prerequisites

Before using this MCP server, ensure you have:

Installation

  1. Clone this repository:
git clone https://github.com/Timtech4u/deno-mcp.git
cd deno-mcp
  1. Install dependencies:
npm install
  1. Build the project:
npm run build

Configuration

For Claude Desktop

  1. Open your Claude Desktop configuration file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  2. Add the Deno MCP server configuration:

{
  "mcpServers": {
    "deno": {
      "command": "node",
      "args": [
        "/absolute/path/to/deno-mcp/dist/index.js"
      ],
      "disabled": false,
      "autoApprove": [
        "execute_deno_code",
        "check_deno_version"
      ]
    }
  }
}
  1. Replace /absolute/path/to/deno-mcp with the actual path where you cloned the repository.

  2. Restart Claude Desktop.

For Cline

  1. Open your Cline MCP settings file:

    • macOS: ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
    • Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
  2. Add the Deno MCP server configuration:

{
  "mcpServers": {
    "deno": {
      "command": "node",
      "args": [
        "/absolute/path/to/deno-mcp/dist/index.js"
      ],
      "disabled": false,
      "autoApprove": [
        "execute_deno_code",
        "check_deno_version"
      ]
    }
  }
}
  1. Replace /absolute/path/to/deno-mcp with the actual path where you cloned the repository.

  2. Restart Cline or reload the window.

How to Use

Once configured, you can ask Claude to run Deno code in various ways. Here are some examples:

Basic Usage

You can run simple Deno code without any special permissions:

Can you run this Deno code for me?

console.log("Hello from Deno!");
console.log("Version:", Deno.version);
console.log("Current directory:", Deno.cwd());

With Network Permissions

To make HTTP requests, you need to grant network permissions:

Run this Deno code with network permissions:

async function fetchData() {
  const response = await fetch("https://jsonplaceholder.typicode.com/todos/1");
  const data = await response.json();
  console.log("Fetched data:", data);
}

await fetchData();

With File System Permissions

To read or write files, you need to grant file system permissions:

Run this Deno code with file system permissions:

const text = "Hello, Deno File System!";
await Deno.writeTextFile("./hello.txt", text);
console.log("File written successfully");

const content = await Deno.readTextFile("./hello.txt");
console.log("File content:", content);

With Multiple Permissions

You can combine multiple permissions:

Run this Deno code with network and file system permissions:

const response = await fetch("https://jsonplaceholder.typicode.com/todos/1");
const data = await response.json();
await Deno.writeTextFile("./todo.json", JSON.stringify(data, null, 2));
console.log("Todo data saved to file");

Using Deno Standard Library

You can use Deno's standard library:

Run this Deno code with network permissions:

import { serve } from "https://deno.land/std@0.192.0/http/server.ts";

const handler = (req) => new Response("Hello, Deno Server!");
console.log("HTTP server running on http://localhost:8000");
serve(handler, { port: 8000 });

Available Tools

execute_deno_code

Executes Deno TypeScript/JavaScript code.

Parameters:

  • code (string, required): The Deno code to execute
  • permissions (array of strings, optional): List of permissions to grant (e.g., "net", "read", "write", "env", "run", etc.)
  • unstable (boolean, optional): Whether to enable unstable features
  • typescript (boolean, optional): Whether the code is TypeScript (true) or JavaScript (false)

Example usage through Claude:

Can you run this Deno code with permissions for network and file system access?

const response = await fetch("https://api.github.com/users/denoland");
const data = await response.json();
await Deno.writeTextFile("./deno-github.json", JSON.stringify(data, null, 2));
console.log("GitHub data for Deno saved to file");

check_deno_version

Returns information about the installed Deno version.

Example usage through Claude:

Can you check what version of Deno I have installed?

Troubleshooting

Deno Not Found

If you see an error like "Deno is not installed", make sure Deno is installed and available in your system PATH.

Permission Errors

If your code fails with permission errors, make sure you're requesting the appropriate permissions:

  • Network requests: "net"
  • File system: "read" and/or "write"
  • Environment variables: "env"
  • Running subprocesses: "run"

Timeout Errors

The server has a 30-second timeout for code execution. If your code takes longer than that, it will be terminated.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Bora Yalcin
  • Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • Contraband Interactive
  • Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.

  • rustassistant.com
  • Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • apappascs
  • Discover the most comprehensive and up-to-date collection of MCP servers in the market. This repository serves as a centralized hub, offering an extensive catalog of open-source and proprietary MCP servers, complete with features, documentation links, and contributors.

  • Mintplex-Labs
  • The all-in-one Desktop & Docker AI application with built-in RAG, AI agents, No-code agent builder, MCP compatibility, and more.

  • modelcontextprotocol
  • Model Context Protocol Servers

  • ShrimpingIt
  • Micropython I2C-based manipulation of the MCP series GPIO expander, derived from Adafruit_MCP230xx

  • OffchainLabs
  • Go implementation of Ethereum proof of stake

  • n8n-io
  • Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

  • WangRongsheng
  • 🧑‍🚀 全世界最好的LLM资料总结(Agent框架、辅助编程、数据处理、模型训练、模型推理、o1 模型、MCP、小语言模型、视觉语言模型) | Summary of the world's best LLM resources.

    Reviews

    2 (1)
    Avatar
    user_UH9rX1iR
    2025-04-17

    As a dedicated user of the deno-mcp-server crafted by Timtech4u, I can confidently say it's a robust and efficient solution for any server needs. The performance and simplicity it offers are unparalleled, making it a breeze for developers to implement. Highly recommend checking it out at https://github.com/Timtech4u/deno-mcp-server!