MCP Catalogs
首页deno-mcp-template screenshot

deno-mcp-template

by phughesmcr·30·综合分 46

全面的 TypeScript 模板,用于构建 Deno 的生产级 MCP 服务器,支持多种分发格式。

developer-toolsops-infraai-llm
4
Forks
9
活跃 Issue
1 个月前
最近提交
2 天前
收录于

概述

Deno MCP 服务器模板是一个完整的起点,用于在 TypeScript 中构建生产级 MCP 服务器。它开箱即用地提供带 STDIO 和 HTTP 传输、安全中间件、持久状态、沙箱执行和 CI/CD 工作流程的完整工作服务器。该模板支持多种分发格式,包括 JSR 包、原生二进制文件、DXT 扩展和 Deno Deploy 上的云部署,使您能够通过单一代码库在任何地方分发 MCP 服务器。

试试问 AI

装完之后,这里有 5 个你可以让 AI 做的事:

:快速构建具有已实现安全性和基础设施的 MCP 服务器原型
:创建需要作为二进制文件、包或云托管服务分发的 MCP 服务器
:构建具有沙箱执行功能以处理不受信任代码的 MCP 服务器
:支持哪些分发格式?
:如何处理我的 MCP 服务器的身份验证?

什么时候选它

如果你想使用 TypeScript 和 Deno 构建 MCP 服务器,特别是需要多种分发方式和内置的基础设施(如持久化状态和沙箱执行),请选择此模板。

什么时候不要选它

如果你不使用 TypeScript/Deno,或者需要模板未提供的更专业功能(如除 bearer 令牌外的自定义身份验证系统),请不要选择此模板。

此 server 暴露的工具

从 README 抽取出 11 个工具
  • elicit-input

    Elicits input from users through a two-step form process

  • elicit-form-wizard

    Creates a two-step form wizard for complex data collection

  • url-elicitation-demo

    Demonstrates URL-mode elicitation with streamable HTTP and session handling

  • fetch-website-info

    Fetches information from a website with optional MCP Apps UI

  • increment-counter

    Increments a persistent counter value stored in Deno KV

  • log-message

    Logs a message to the system with structured logging

  • notify-list-changed

    Notifies subscribers when a list has been modified

  • poem

    Generates a sample poem using the sampling functionality

  • execute-code

    Executes code in a sandboxed environment using Deno's microVM

  • delayed-echo

    Demonstrates experimental task workflows with delayed echo functionality

  • guided-poem

    Creates a guided poem generation using elicitation and sampling pipeline

可对比工具

n8n-mcp-serverserverless-stackmcp-server-template

安装

安装

  1. 安装 Deno(如果需要):
curl -fsSL https://deno.land/install.sh | sh
  1. 从模板创建项目:
gh repo create my-mcp-server --template phughesmcr/deno-mcp-template
cd my-mcp-server
  1. 运行设置(重命名占位符,然后自毁):
deno task setup
  1. 启动服务器:
deno task start

Claude Desktop 配置

添加到您的 Claude Desktop config.json:

{
  "mcpServers": {
    "my-mcp-server": {
      "command": "deno",
      "args": ["run", "-A", "/absolute/path/to/main.ts"]
    }
  }
}

FAQ

支持哪些分发格式?
该模板支持从单一代码库分发 JSR 包、原生二进制文件、DXT 扩展以及 Deno Deploy 上的云部署。
如何处理我的 MCP 服务器的身份验证?
设置 MCP_HTTP_BEARER_TOKEN 环境变量(或 --http-bearer-token 标志)来要求客户端发送 Authorization: Bearer 或 x-api-key 头。

deno-mcp-template 对比

GitHub →

最后更新于 · 由 README + GitHub 公开数据自动生成。