关于 MCP Server Starter
MCP Server Starter 是面向开发者的 TypeScript MCP 服务模板,提供工具生成脚本和基于 Bun 的开发流程。
主要功能
- 01TypeScript MCP 服务模板
- 02使用 Bun 测试与开发
- 03工具脚手架脚本
- 04Biome 代码检查与格式化
- 05自动版本管理
适用场景
- 01启动 TypeScript MCP 服务项目
- 02生成工具文件与参数架构
- 03使用 Bun 测试和构建服务
MCP 相关
模板提供 MCP 工具结构和服务入口。构建的服务可配置给 Claude Desktop 使用。
配置
本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。
暂未收录安装方式
我们还没有获取到这个服务的安装包或远程地址,请按项目 README 中的说明安装。
工具
还没有获取到工具列表
本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。
详细介绍
MCP 服务入门模板
用于使用 TypeScript 构建 Model Context Protocol(MCP)服务的生产就绪入门模板。
🚀 快速开始
- 克隆仓库
- 安装依赖:
bun install
✨ 主要功能
- 使用 Bun 加快测试和开发
- 使用 Biome 进行代码检查和格式化
- 使用 standard-version 自动管理版本
- 清晰、易维护的项目结构
📂 项目结构
mcp-starter/
├── src/
│ ├── tools/ # MCP tools implementation
│ ├── utils/ # Shared utilities
│ ├── main.ts # Server entry point
│ └── types.ts # Shared type definitions
├── tests/ # Test files
├── biome.json # Linting configuration
├── tsconfig.json # TypeScript configuration
└── package.json # Project dependencies
⚙️ 配置
创建新工具
项目提供了一个用于创建新 MCP 工具的脚本:
bun run scripts/create-tool.ts <tool-name>
此脚本将:
- 在
src/tools/<tool-name>下创建新的工具目录 - 生成基本工具结构,包括:
- index.ts(主要实现)
- schema.ts(工具参数的 JSON schema)
- test.ts(测试文件)
- 更新工具索引文件,以导出新工具
示例:
bun run scripts/create-tool.ts weather
🛠️ 开发
- 运行测试:
bun test - 格式化代码:
bun run format - 检查代码:
bun run lint - 构建项目:
bun run build
要将开发中的 MCP 服务添加到 Claude Desktop:
- 构建项目:
bun run build - 添加到 Claude Desktop 配置:
// You only need the argument if you need to pass arguments to your server { "mcpServers": { "your-server-name": { "command": "node", "args": ["/path/to/your/project/dist/main.js", "some_argument"] } } }
📜 版本管理
本项目使用 standard-version 自动管理版本。运行 bun run release 可创建新版本。
提交消息格式
feat:新功能(升级次版本号)fix:错误修复(升级修订版本号)BREAKING CHANGE:不兼容的变更(升级主版本号)
📦 发布到 npm
- 确保已登录 npm:
npm login - 构建项目:
bun run build - 发布软件包:
npm publish
发布新版本前,请记得使用 bun run release 更新版本号。
通过 Smithery 安装
要通过 Smithery 为 Claude Desktop 自动安装 Weather MCP Server Starter:
npx -y @smithery/cli install @GreatAuk/mcp-weather --client claude
从 npm 安装(发布后)
添加到 Claude Desktop 配置:
// You only need the argument if you need to pass arguments to your server
{
"mcpServers": {
"your-server-name": {
"command": "npx",
"args": ["-y", "your-package-name", "some_argument"]
}
}
}
评论
支持 Markdown
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。