pybme-mcp
Enables LLM agents to perform Bayesian Maximum Entropy geostatistical analysis through natural language rather than code, supporting spatial, network, and physics-informed uncertainty modeling.
README
pybme-mcp
A Model Context Protocol (MCP) server that wraps pyBME — enabling LLM agents to perform Bayesian Maximum Entropy geostatistical analysis through natural-language intent rather than code.
What it does
The server exposes 7 tools, 6 resources, and 4 prompts that form an uncertainty-reasoning pipeline:
ingest_external_scenario_evidence → inspect_modeling_context
→ fit_uncertainty_model → run_uncertainty_update
→ explain_uncertainty_drivers
→ compare_operator_approaches
→ design_next_observation_or_scenario
Tools
| Tool | Purpose |
|---|---|
ingest_external_scenario_evidence |
Import hard/soft observations and network topology |
inspect_modeling_context |
Detect problem type and recommend model families |
fit_uncertainty_model |
Fit spatial or network covariance models with cross-validation |
run_uncertainty_update |
Run BME prediction at estimation targets |
explain_uncertainty_drivers |
Identify what drives uncertainty at specific locations |
compare_operator_approaches |
Compare Euclidean vs graph vs physics-informed operators |
design_next_observation_or_scenario |
Rank candidate sensor placements by variance reduction |
Supported model families
- spatial — Euclidean covariance (exponential, gaussian, spherical, …)
- space_time — Separable space-time covariance
- graph_laplacian — Graph-diffusion kernel on network topology
- physics_informed_network — Physically consistent network covariance
- spectral_hodge — Spectral Hodge decomposition for flow networks
Install
Install pyBME first (not yet on PyPI):
pip install git+https://github.com/wiesnerfriedman/pybme.git
Then install the MCP server:
pip install git+https://github.com/wiesnerfriedman/pybme-mcp.git
Or from a local clone:
git clone https://github.com/wiesnerfriedman/pybme-mcp.git
cd pybme-mcp
pip install -e ".[dev]"
Configuration
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"pybme": {
"command": "pybme-mcp"
}
}
}
VS Code (Copilot)
Add to .vscode/mcp.json:
{
"servers": {
"pybme": {
"type": "stdio",
"command": "pybme-mcp"
}
}
}
Usage
Once configured, ask your agent things like:
- "Fit an uncertainty model to my PM2.5 observations"
- "Run a network-aware BME update on this stormwater network"
- "Compare Euclidean vs graph Laplacian operators"
- "Where should I place the next sensor to reduce uncertainty the most?"
See examples/mcp_agent_demo.ipynb for a step-by-step walkthrough of the full tool chain.
Development
git clone https://github.com/wiesnerfriedman/pybme-mcp.git
cd pybme-mcp
pip install -e ".[dev]"
pytest
Layout
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
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.