mcp-template-node
by Rethunk-AI·★ 1·综合分 37
Node.js MCP 服务器 TypeScript 模板,附带笔记管理示例。
概述
这是一个结构良好的 Node.js/TypeScript MCP 服务器模板,展示了如何构建完整的 MCP 实现。它包含一个功能齐全的笔记管理系统,具有 CRUD 操作,展示了 MCP 工具、资源和提示的正确实现。模板遵循 TypeScript 最佳实践,具有严格的类型检查、全面的错误处理,并使用 Vitest 包含单元测试。
试试问 AI
装完之后,这里有 5 个你可以让 AI 做的事:
什么时候选它
希望使用 Node.js/TypeScript 创建 MCP server 并且需要包含完整示例和测试基础设施的开发者。
什么时候不要选它
您需要生产就绪的持久存储(此模板使用内存存储)或正在寻找不同语言的模板。
此 server 暴露的工具
从 README 抽取出 5 个工具Create NoteCreates a new note with title and content.
List NotesLists all available notes with their IDs and titles.
Get NoteRetrieves a specific note by ID.
Update NoteUpdates an existing note's title, content, or tags.
Delete NoteDeletes a note by ID.
可对比工具
安装
安装步骤
- 克隆仓库:
``bash git clone https://github.com/Rethunk-Tech/mcp-template-node.git cd mcp-template-node ``
- 安装依赖:
``bash yarn install ``
- 构建并运行服务器:
``bash yarn build yarn start ``
对于 Claude Desktop 集成,将其添加到你的 claude_desktop_config.json:
{
"mcpServers": {
"mcp-template-node": {
"command": "node",
"args": ["path/to/mcp-template-node/build/index.js"]
}
}
}FAQ
- 这个模板提供了什么?
- 这个模板提供了一个完整的 TypeScript MCP 服务器起点,附带笔记管理示例,展示了如何实现 MCP 工具、资源和提示。
- 这个模板适合生产环境使用吗?
- 这主要是一个模板/示例项目。虽然实现结构良好且经过测试,但您需要根据自己的具体生产需求进行调整。
mcp-template-node 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。