
deno-mcp-template
by phughesmcr·★ 30·综合分 46
全面的 TypeScript 模板,用于构建 Deno 的生产级 MCP 服务器,支持多种分发格式。
概述
Deno MCP 服务器模板是一个完整的起点,用于在 TypeScript 中构建生产级 MCP 服务器。它开箱即用地提供带 STDIO 和 HTTP 传输、安全中间件、持久状态、沙箱执行和 CI/CD 工作流程的完整工作服务器。该模板支持多种分发格式,包括 JSR 包、原生二进制文件、DXT 扩展和 Deno Deploy 上的云部署,使您能够通过单一代码库在任何地方分发 MCP 服务器。
试试问 AI
装完之后,这里有 5 个你可以让 AI 做的事:
什么时候选它
如果你想使用 TypeScript 和 Deno 构建 MCP 服务器,特别是需要多种分发方式和内置的基础设施(如持久化状态和沙箱执行),请选择此模板。
什么时候不要选它
如果你不使用 TypeScript/Deno,或者需要模板未提供的更专业功能(如除 bearer 令牌外的自定义身份验证系统),请不要选择此模板。
此 server 暴露的工具
从 README 抽取出 11 个工具elicit-inputElicits input from users through a two-step form process
elicit-form-wizardCreates a two-step form wizard for complex data collection
url-elicitation-demoDemonstrates URL-mode elicitation with streamable HTTP and session handling
fetch-website-infoFetches information from a website with optional MCP Apps UI
increment-counterIncrements a persistent counter value stored in Deno KV
log-messageLogs a message to the system with structured logging
notify-list-changedNotifies subscribers when a list has been modified
poemGenerates a sample poem using the sampling functionality
execute-codeExecutes code in a sandboxed environment using Deno's microVM
delayed-echoDemonstrates experimental task workflows with delayed echo functionality
guided-poemCreates a guided poem generation using elicitation and sampling pipeline
可对比工具
安装
安装
- 安装 Deno(如果需要):
curl -fsSL https://deno.land/install.sh | sh- 从模板创建项目:
gh repo create my-mcp-server --template phughesmcr/deno-mcp-template
cd my-mcp-server- 运行设置(重命名占位符,然后自毁):
deno task setup- 启动服务器:
deno task startClaude 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 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。