Engineering MCP Server
Provides git-based persistence for engineering models, enabling version control and automatic commits of model data.
Generates interactive Plotly visualizations of engineering models, allowing users to explore P&IDs and flowsheets in HTML format.
Exports engineering models to Proteus XML format for use with Proteus diagramming tools, enabling production-quality rendering.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Engineering MCP ServerCreate a P&ID with a pump, tank, and control valve."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Engineering MCP Server
⚠️ DEVELOPMENT STATUS: This project is under active development and is not yet production-ready. APIs, interfaces, and functionality may change without notice. Use at your own risk for evaluation and testing purposes only. Not recommended for production deployments.
Structured P&ID and Flowsheet Generation for LLM Agents
The Engineering MCP Server exposes pyDEXPI (DEXPI P&IDs) and SFILES2 (BFD/PFD flowsheets) through Anthropic's Model Context Protocol so language-model agents can create, modify, analyze, and persist process-engineering diagrams entirely in machine-readable formats.
This repository prioritizes data fidelity over drawing aesthetics: the authoritative artifacts are JSON/SFILES models tracked in git, with optional Plotly-based HTML visualizations and GraphML exports generated from the same state.
Current Capabilities
Complete pyDEXPI Coverage (Phase 2) – All 272 pyDEXPI classes are now accessible: 159 equipment types, 79 piping types, and 34 instrumentation types. Both SFILES aliases (e.g.,
pump,heat_exchanger) and DEXPI class names (e.g.,CentrifugalPump,PlateHeatExchanger) are accepted. Seedocs/EQUIPMENT_CATALOG.mdfor the complete catalog anddocs/USER_MIGRATION_GUIDE.mdfor usage guidance.Symbol Mapping (Phase 3) – 308/805 symbols mapped (38.3% coverage) with DEXPI class mappings from NOAKA/DISC symbol libraries.
Proteus XML 4.2 Export – Comprehensive pyDEXPI → Proteus XML exporter with complete attribute coverage. Exports equipment, piping (with CenterLine geometry), instrumentation (with actuating functions and signal connectors), nozzle connection points, and GenericAttributes. Features "fail loudly" validation with clear error messages. See
docs/proteus_export_gap_analysis.mdfor implementation details. 45/45 tests passing with XSD validation and round-trip fidelity verified.DEXPI P&ID tooling – 14 MCP tools for creating models, adding equipment/piping/instrumentation, importing/exporting, and inserting inline valves (
src/tools/dexpi_tools.py).SFILES BFD/PFD tooling – 12 MCP tools for flowsheet construction, stream management, canonicalization, regex validation, and conversions from/to DEXPI (
src/tools/sfiles_tools.py).Git-native persistence – Project tools (
project_init/save/load/list) wrapsrc/persistence/project_persistence.py, storing JSON/SFILES plus metadata, GraphML, and Plotly HTML in per-model folders with automatic commits.Template deployment –
template_list,template_get_schema, andarea_deployexpose four YAML templates (library/patterns/*.yaml): pump_basic, pump_station_n_plus_1, tank_farm, and heat_exchanger_with_integration.Validation & analytics – Schema introspection (
schema_*), validation (validate_model,validate_round_trip), graph analytics (graph_*), search (search_*,query_model_statistics), and batch automation (model_batch_apply,rules_apply,graph_connect).Visualization outputs – Project saves produce Plotly-based interactive HTML files (with SVG/PDF exports via Plotly's toolbar) and GraphML topology exports. GraphicBuilder integration provides production-quality PNG rendering from Proteus/DEXPI XML (validated with official DEXPI TrainingTestCases). There is no standalone dashboard service; visual review happens through the generated HTML files.
Phase 4 Tool Consolidation – 7 unified tools (
model_create,model_load,model_save,model_combine,model_tx_begin,model_tx_apply,model_tx_commit) provide ACID transaction support alongside 71 domain-specific tools (78 total). Seedocs/FEATURE_PARITY_MATRIX.mdfor the migration guide.
MCP Tool Catalog (as registered in src/server.py)
DEXPI Tools
dexpi_create_pid, dexpi_add_equipment, dexpi_add_piping, dexpi_add_instrumentation, dexpi_add_control_loop, dexpi_connect_components, dexpi_validate_model, dexpi_export_json, dexpi_export_graphml, dexpi_import_json, dexpi_import_proteus_xml, dexpi_add_valve, dexpi_add_valve_between_components, dexpi_insert_valve_in_segment, dexpi_convert_from_sfiles.
SFILES Tools
sfiles_create_flowsheet, sfiles_add_unit, sfiles_add_stream, sfiles_to_string, sfiles_from_string, sfiles_export_networkx, sfiles_export_graphml, sfiles_add_control, sfiles_parse_and_validate, sfiles_canonical_form, sfiles_pattern_helper, sfiles_convert_from_dexpi, sfiles_visualize.
Project & Persistence Tools
project_init, project_save, project_load, project_list.
Validation & Schema Tools
validate_model, validate_round_trip, plus schema_list_classes, schema_describe_class, schema_find_class, schema_get_hierarchy.
Graph, Search, Batch, and Template Tools
Graph analytics:
graph_analyze_topology,graph_find_paths,graph_detect_patterns,graph_calculate_metrics,graph_compare_models.Search & statistics:
search_by_tag,search_by_type,search_by_attributes,search_connected,query_model_statistics,search_by_stream,search_instances.Batch/automation:
model_batch_apply,rules_apply,graph_connect.Templates:
template_list,template_get_schema,area_deploy.
Visualization Tools (Weeks 5-6)
visualize_model- Generate HTML (Plotly), PNG (GraphicBuilder), or GraphML from DEXPI/SFILES models with auto model-type detection and intelligent renderer selectionvisualize_list_renderers- List available renderers with capabilities and health status
Layout Tools (NEW - Week 8+)
layout_compute- Compute automatic layout using ELK algorithm (layered, orthogonal routing)layout_get- Retrieve stored layout with positions, edges, portslayout_update- Update layout with etag-based optimistic concurrency controllayout_validate- Validate layout schema and model consistencylayout_list- List layouts, optionally filtered by modellayout_save_to_file/layout_load_from_file- Persist layouts to project fileslayout_delete- Remove layout from store
Phase 4 Update: The unified tools (
model_create,model_load,model_save,model_combine,model_tx_begin,model_tx_apply,model_tx_commit) provide ACID transaction support. Legacy atomic tools remain available for backward compatibility. Seedocs/FEATURE_PARITY_MATRIX.mdfor migration guidance.
Layout System Update (Dec 2025): Complete Layout Layer with ELK integration. Persistent Node.js worker for efficient layout computation, etag-based concurrency control, file persistence alongside models. See
docs/LAYOUT_SYSTEM.mdfor details.
Architecture Overview
Component | Purpose |
| Registers MCP handlers and routes tool calls to category handlers. |
| Tool implementations grouped by domain (DEXPI, SFILES, project, validation, schema, graph, search, batch, templates, visualization). |
| MCP visualization tools with RendererRouter integration (Weeks 5-6). |
| MCP layout tools for ELK-based automatic positioning (Week 8+). |
| Persistent ELK worker integration for layout computation. |
| Saves/loads models, writes metadata, GraphML, and Plotly HTML artifacts, and performs git commits. |
| Parametric template engine and YAML catalog (4 templates). |
| ACID transaction infrastructure for |
| Pytest suites covering graph export, template tooling, and TransactionManager behavior. |
Dependencies
Core Libraries (Pinned Versions)
This project depends on two research libraries from the Process Intelligence Research group:
Library | Version | Commit SHA | Notes |
pyDEXPI | v1.1.0 (Sept 2025) |
| DEXPI P&ID model library - stable equipment/piping APIs |
SFILES2 | June 2025 |
| Flowsheet notation library - includes stream params on edges fix |
These versions are pinned in pyproject.toml to ensure reproducible builds. If you need to upgrade:
Test with the new commit locally
Update the SHA in
pyproject.tomlUpdate this table
Run full test suite (
pytest tests/)
Known Upstream Issues:
SFILES2 #12:
merge_HI_nodes/split_HI_nodesbugs affect heat integration scenarios (workaround: guards in conversion code)SFILES2 #10: MultiDiGraph support incomplete (affects parallel edges)
pyDEXPI:
ProteusSerializer.save()is NotImplementedError (affects nozzle metadata export)
Installation & Quick Start
Clone & set up environment (see SETUP.md for full instructions):
git clone https://github.com/yourusername/engineering-mcp-server.git cd engineering-mcp-server python3 -m venv .venv && source .venv/bin/activate pip install -r requirements.txtValidate core imports:
python -c "from src.tools.dexpi_tools import DexpiTools; from src.tools.sfiles_tools import SfilesTools; print('OK')"Run the MCP server:
python -m src.serverAdd to an MCP client (e.g.,
.mcp.jsonfor Claude Code or Codex CLI) pointing topython -m src.server.
Example MCP Workflow
Create a DEXPI P&ID using
dexpi_create_pid.Add equipment and piping via
dexpi_add_equipment,dexpi_add_piping, anddexpi_connect_components(or batch viamodel_batch_apply).Validate with
validate_modelorvalidate_round_trip.Save to a git project:
project_initto scaffoldpid/,pfd/,bfd/directories.project_saveto persist JSON, metadata, GraphML, and Plotly HTML (commits automatically).
Inspect outputs by opening the generated
<model>.htmlor<model>.graphmlfiles in your browser/tooling of choice.
A similar flow applies to SFILES models using the sfiles_* tools and conversions between representations.
Visualization & Data Exports
Visualization Philosophy
This system provides two complementary visualization approaches serving different purposes:
Plotly HTML (Topology Analysis)
Purpose: Fast topology visualization for connectivity analysis and debugging
What it shows: Network graph with nodes (equipment) and edges (connections)
Layout: Spring/force-directed layout (automatic positioning)
Symbols: No symbols - abstract nodes only
Speed: <1 second generation time
Use case: Development iteration, flow analysis, bottleneck detection
Generated: Automatically during
project_save
GraphicBuilder (Engineering Documentation)
Purpose: Production-quality P&ID rendering for engineering deliverables
What it shows: Proper P&ID with ISA-compliant symbols, spatial layout, annotations
Layout: Proteus XML positioning (requires layout data)
Symbols: Uses all 701 NOAKADEXPI symbols (from Phase 3 mapping work)
Speed: 2-15 seconds depending on complexity
Use case: Final documentation, compliance, client deliverables
Generated: On-demand via GraphicBuilder Docker service
Current Status: PNG rendering validated with DEXPI TrainingTestCases (SVG/PDF pending Java API integration)
Both approaches are complementary - Plotly for rapid iteration, GraphicBuilder for final outputs.
Data Export Formats
Output | How it's produced | Notes |
HTML (Plotly) | Generated during | Interactive hover details, Plotly toolbar can export PNG/SVG locally. |
PNG (GraphicBuilder) | GraphicBuilder Docker service ( | Validated with official DEXPI TrainingTestCases. Requires Proteus XML export (planned). |
GraphML |
| Suitable for NetworkX or external graph tooling. |
JSON/SFILES | Primary storage formats; accessible via import/export tools | Git-friendly text files. |
Symbol Library Status: 308/805 symbols mapped (38.3% coverage) from NOAKA/DISC libraries. These mappings are used by GraphicBuilder and future symbol-based renderers. Plotly visualizations do not use symbols.
Templates
library/patterns/ currently contains four YAML templates surfaced through template_* tools:
pump_basic.yamlpump_station_n_plus_1.yamltank_farm.yamlheat_exchanger_with_integration.yaml
Each template exposes typed parameters (see template_get_schema) and can be instantiated into DEXPI or SFILES models via area_deploy.
Development Status
For the complete development roadmap including completed phases and planned work, see ROADMAP.md.
Recent Highlights
Phase 8: ROADMAP Audit & Quick Wins (January 2026): Added
sfiles_visualize,model_combine, andsearch_instancestools. Layout-rendering integration withuse_layout/layout_idparams. Full deprecation warnings oncatalog.py. Seedocs/completed-plans/2026-01-22-phase8-roadmap-audit.md.Codex Deep Review (January 2026): Core conversion fixes including SFILES2 native parsing, proper piping connections, and pyDEXPI API corrections. See
docs/completed-plans/2026-01-22-codex-deep-review.md.Layout System (December 2025): Complete ELK-based automatic layout with 8 MCP tools, optimistic concurrency, and file persistence. See
docs/LAYOUT_SYSTEM.md.Tool Consolidation (Phase 4): 7 unified tools with ACID transaction support alongside 71 domain-specific tools. See
docs/FEATURE_PARITY_MATRIX.md.
Key Documentation
Document | Purpose |
Development progress and plans | |
Installation guide | |
Complete equipment catalog | |
Migration from legacy tools | |
Usage examples |
License
Released under the GNU Affero General Public License v3.0 (AGPL-3.0). See LICENSE for details.
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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/puran-water/dexpi-sfiles-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server