MRP计算器MCP服务器
概述
该 MCP 服务器提供物料需求计划 (MRP) 计算工具。它遵循模型上下文协议 (MCP) 向系统公开其功能。
特征
工具
该服务器提供以下 MCP 工具:
计算订单需求
根据以下因素计算何时订购以及订购数量:
配置
可以通过 MCP 设置文件配置服务器:
{
"mcpServers": {
"mrp": {
"command": "node",
"args": ["/path/to/mrp-calculator/dist/index.js"],
"env": {}
}
}
}
发展
- 用 TypeScript 编写
- 使用 MCP SDK 实现服务器
- 包括验证测试用例
项目结构
mrp-calculator/
├── src/
│ ├── index.ts # Main server implementation
│ ├── calculator.ts # MRP calculation logic
│ ├── types.ts # TypeScript type definitions
│ └── validator.ts # Input validation
├── package.json
├── tsconfig.json
└── README.md
构建和运行
# Install dependencies
npm install
# Build the server
npm run build
# Run the server
node dist/index.js
版本控制
此仓库使用 Git 进行版本控制。重要文件会被跟踪,而构建文件和依赖项则会通过 .gitignore 文件忽略。