Skip to main content
Glama

pybme-mcp

Python 3.10+ License: MIT

一个 Model Context Protocol (MCP) 服务器,封装了 pyBME —— 使 LLM 智能体能够通过自然语言意图而非代码执行贝叶斯最大熵(BME)地统计分析。

功能概述

该服务器提供了 7 个工具6 个资源4 个提示词,构成了一个不确定性推理流水线:

ingest_external_scenario_evidence → inspect_modeling_context
       → fit_uncertainty_model → run_uncertainty_update
       → explain_uncertainty_drivers
       → compare_operator_approaches
       → design_next_observation_or_scenario

工具

工具

用途

ingest_external_scenario_evidence

导入硬/软观测数据和网络拓扑

inspect_modeling_context

检测问题类型并推荐模型族

fit_uncertainty_model

通过交叉验证拟合空间或网络协方差模型

run_uncertainty_update

在估计目标处运行 BME 预测

explain_uncertainty_drivers

识别特定位置不确定性的驱动因素

compare_operator_approaches

比较欧几里得、图论与物理信息驱动算子

design_next_observation_or_scenario

按方差缩减程度对候选传感器位置进行排序

支持的模型族

  • spatial — 欧几里得协方差(指数、高斯、球形等)

  • space_time — 可分离时空协方差

  • graph_laplacian — 网络拓扑上的图扩散核

  • physics_informed_network — 物理一致性网络协方差

  • spectral_hodge — 流网络的谱霍奇分解

Related MCP server: ladybug-tools-mcp

安装

首先安装 pyBME(尚未发布至 PyPI):

pip install git+https://github.com/wiesnerfriedman/pybme.git

然后安装 MCP 服务器:

pip install git+https://github.com/wiesnerfriedman/pybme-mcp.git

或者从本地克隆安装:

git clone https://github.com/wiesnerfriedman/pybme-mcp.git
cd pybme-mcp
pip install -e ".[dev]"

配置

Claude Desktop

添加到 claude_desktop_config.json

{
  "mcpServers": {
    "pybme": {
      "command": "pybme-mcp"
    }
  }
}

VS Code (Copilot)

添加到 .vscode/mcp.json

{
  "servers": {
    "pybme": {
      "type": "stdio",
      "command": "pybme-mcp"
    }
  }
}

使用方法

配置完成后,您可以向智能体询问如下问题:

  • “为我的 PM2.5 观测数据拟合一个不确定性模型”

  • “在这个雨水管网系统上运行一次网络感知 BME 更新”

  • “比较欧几里得算子与图拉普拉斯算子”

  • “为了最大程度降低不确定性,我应该在哪里放置下一个传感器?”

请参阅 examples/mcp_agent_demo.ipynb 获取完整工具链的分步演示。

开发

git clone https://github.com/wiesnerfriedman/pybme-mcp.git
cd pybme-mcp
pip install -e ".[dev]"
pytest

布局

pybme-mcp/
├── docs/
│   ├── pybme-openswmm-integration.md
│   └── v1-mcp-spec.md
├── examples/
│   └── mcp_agent_demo.ipynb
├── pyproject.toml
├── src/pybme_mcp/
│   ├── __init__.py
│   ├── __main__.py
│   ├── registry.py
│   ├── schemas.py
│   ├── serialisation.py
│   ├── server.py
│   └── services/
│       ├── catalog.py
│       ├── comparison.py
│       ├── context.py
│       ├── explanation.py
│       ├── fitting.py
│       ├── hodge.py
│       ├── ingest.py
│       ├── scenario_design.py
│       └── update.py
└── tests/
    ├── conftest.py
    ├── test_ingest.py
    └── test_integration.py

许可证

MIT

A
license - permissive license
-
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    -
    quality
    D
    maintenance
    A Model Calling Protocol server that enables LLMs to perform rigorous Bayesian analysis and probabilistic reasoning, including inference, model comparison, and predictive modeling with uncertainty quantification.
    4
    MIT
  • A
    license
    -
    quality
    A
    maintenance
    Enables natural-language interaction with Ladybug Tools for building performance simulation, 3D modeling, and data visualization, allowing agents to perform complex environmental analysis tasks without CAD software.
    3
    GPL 3.0

View all related MCP servers

Related MCP Connectors

  • Deterministic reasoning stack for AI agents: simulate, decide & compute, plus cross-domain tools.

  • Analytical memory for AI agents: a real Postgres queried in plain English over MCP. One command.

  • Agent-to-agent reasoning-as-a-service: chain-of-thought, analysis, and decision support.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wiesnerfriedman/pybme-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server