基本MCP服务器
演示工具、资源和提示的最小模型上下文协议(MCP)服务器。
内置于 Smithery软件开发工具包
先决条件
- Smithery API密钥:请在 smithery.ai/account/pai-keys
入门指南
- 安装依赖项:
npm install- 启动开发服务器:
npm run dev试试 hello 工具, history://hello-world 资源,或 greet 提示。
发展
您的代码组织如下:
src/index.ts-带工具、资源和提示的MCP服务器smithery.yaml-运行时间规范
编辑 src/index.ts 添加您自己的工具、资源和提示。
构建
npm run build在中创建捆绑服务器 .smithery/
部署
准备好部署了吗?将代码推送到GitHub并部署到Smithery:
- 在以下位置创建新存储库
- 初始化git并推送到GitHub:
git add .
git commit -m "Initial commit"
git remote add origin https://github.com/YOUR_USERNAME/YOUR_REPO.git
git push -u origin main- 将您的服务器部署到Smithery 史密斯·艾/新
