Skip to main content
Glama

Manufacturing MCP

制造设备数据探索与故障风险分析的 MCP(Model Context Protocol)基于 AI Agent 项目。

数据集

本项目使用 AI4I 2020 Predictive Maintenance Dataset。这是模拟真实工业现场预测性维护数据而生成的合成数据集,由 10,000 条设备运行观测值和 14 列组成。没有缺失值。

每条观测值中包含 产品等级、空气温度和工艺温度、转速、扭矩、刀具磨损时间等,同时记录了 设备是否故障 及 故障类型。因此可用于以下预测性维护场景:

  • 设备状态监控(Monitoring)

  • 故障风险分类(Classification)

  • 异常条件检测(Anomaly Detection)

主要列

各列的含义和单位请参见 数据集列文档。

数据样本

以下是原始 CSV 的前 3 条观测值。

UDI

Product ID

Type

Air temperature [K]

Process temperature [K]

Rotational speed [rpm]

Torque [Nm]

Tool wear [min]

Machine failure

TWF

HDF

PWF

OSF

RNF

1

M14860

M

298.1

308.6

1551

42.8

0

0

0

0

0

0

0

2

L47181

L

298.2

308.7

1408

46.3

3

0

0

0

0

0

0

3

L47182

L

298.1

308.5

1498

49.4

5

0

0

0

0

0

0

Related MCP server: Equipment Health MCP Server

开发环境配置

本项目使用 Python 3.12 或更高版本。在 WSL Ubuntu 24.04 的项目根目录下激活虚拟环境并安装开发依赖。

source mcp/bin/activate
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"

参考 .env.example 编写本地 .env 文件。包含实际 API Key 的 .env 不会纳入 Git。

cp -n .env.example .env
chmod 600 .env

代码变更后运行测试、lint 和格式检查。

pytest
ruff check .
ruff format --check .

当前 Python 包位于 src/manufacturing_mcp,测试位于 tests。应用程序配置通过 src/manufacturing_mcp/config.py 从环境变量和 .env 文件中加载。

运行 PostgreSQL

使用 Docker Compose 在后台运行 PostgreSQL 容器。

docker compose up -d postgres
docker compose ps

如果 postgres 服务的状态为 healthy,则代表正常。若需直接访问 PostgreSQL,请使用以下命令。

docker compose exec postgres sh -c 'psql -U "$POSTGRES_USER" -d "$POSTGRES_DB"'

连接结束后请输入 \q 退出。停止容器时,请使用以下命令。

docker compose down

PostgreSQL 数据保存在 postgres_data Docker 卷中,因此即使停止或重新创建容器,数据也会被保留。

来源与版权

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      An AI agent system that monitors manufacturing equipment health using the Model Context Protocol (MCP). Enables answering natural language questions about equipment status, maintenance, and anomalies through MCP tools.
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to analyze plant-floor data using OEE, Pareto, SPC, and yield-loss calculations, providing continuous-improvement insights from manufacturing data.
      1
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables engineers and plant managers to interact with manufacturing systems using natural language, providing machine health analysis, KPI dashboards, predictive maintenance, and automated workflow execution via MCP.
      -