TD

timtech4u/deno-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

6 stars 3 forks 质量 57 趋势 14

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.

概览

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. - Execute Deno TypeScript or JavaScript code - Configure permissions (net, read, write, env, run, etc.) - Enable/disable unstable features - Get Deno version information Before using this MCP server, ensure you have: 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: 3. Replace /absolute/path/to/deno-mcp with the actual path where you cloned the repository. 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.

README

以下为原文 README 节选,完整内容请查看原文。

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);
}
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "deno": { "command": "node", "args": [ "/absolute/path/to/deno-mcp/dist/index.js" ], "disabled": false, "autoApprove": [ "execute_deno_code", "check_deno_version" ] } } }