运维智能体使用mcp配置
- Python 83.1%
- Shell 16.9%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| core | ||
| database | ||
| mcp_server | ||
| .env.example | ||
| .gitignore | ||
| .python-version | ||
| debug.sh | ||
| DEVELOP.md | ||
| pyproject.toml | ||
| README.md | ||
| start-bg.sh | ||
| start.sh | ||
| uv.lock | ||
bingjun-devops
能碳平台数据采集运维 MCP:按项目名切库、抽样水/电表、查采集、写 AMC 告警。
架构对齐 bingjun_energy_os(@register_tool + FastMCP bridge)。
快速开始
cd bingjun-devops
cp .env.example .env # 填写 AMC / 项目库连接
uv sync
# 在 AMC 库执行 database/*.sql
./start.sh mcp
MCP 工具
| 工具 | 说明 |
|---|---|
query_sample_devices |
项目名 → 映射切库 → 抽样电表/水表 |
query_device_collection_data |
按 device_name 模糊匹配设备 + 时间窗查采集(不用 device_id) |
insert_collection_ops_alert |
告警写入 AMC(severe/general) |
query_collection_ops_alerts |
查询告警 |
多数据源
- Hermes 传
project_name - 读 AMC 表
agent_project_db_mapping得database_name - 用
.env的project_data_source(host/user/password)+ 动态库名连业务库 - 告警写回 AMC(
amc_data_source)
建表
SQL 在项目根目录 database/:
agent_project_db_mapping.sqlagent_collection_ops_alert.sql