Back to MCP directory
publicPublicdnsLocal runtime

MRP Calculator

MRP计算服务MCP服务器

article

README

🚀 MRP 计算器 MCP 服务器

本 MCP 服务器提供了物料需求计划 (MRP) 计算工具,遵循模型上下文协议 (MCP),可将自身功能暴露给系统,助力企业高效规划物料需求。

🚀 快速开始

构建和运行

# 安装依赖项
npm install

# 构建服务器
npm run build

# 运行服务器
node dist/index.js

✨ 主要特性

  • 交货计划计算
  • 订单需求确定
  • MRP 周期计算

📦 安装指南

服务器可通过 MCP 设置文件进行配置,如下所示:

{
  "mcpServers": {
    "mrp": {
      "command": "node",
      "args": ["/path/to/mrp-calculator/dist/index.js"],
      "env": {}
    }
  }
}

💻 使用示例

基础用法

服务器通过以下 MCP 工具提供功能:

calculate_order_need

根据以下条件计算何时以及如何下订单:

  • 当前库存水平
  • 预测周期
  • 交货计划
  • 订单约束

📚 详细文档

开发

  • 使用 TypeScript 编写
  • 使用 MCP SDK 实现服务器
  • 包含用于验证的测试用例

项目结构

mrp-calculator/
├── src/
│   ├── index.ts          # 服务器主实现文件
│   ├── calculator.ts     # MRP 计算逻辑
│   ├── types.ts          # TypeScript 类型定义
│   └── validator.ts      # 输入验证
├── package.json
├── tsconfig.json
└── README.md

🔧 技术细节

此仓库使用 Git 进行版本控制。重要文件被跟踪,而构建 artifact 和依赖项通过 .gitignore 忽略。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client