Skip to main content
Glama
ccpp-tools-mcp

ccpp-tools-mcp

by jinhyunan

ccpp-tools-mcp

ci License: Apache-2.0 Python 3.12+

Deterministic, standards-traceable engineering calculations for combined-cycle power plant (CCPP) balance-of-plant design — exposed as an MCP server.

LLM agents are excellent at orchestrating an engineering workflow in natural language and terrible at arithmetic. This server splits the work accordingly: any MCP client (Claude Desktop, Claude mobile, Claude Code, Cursor, or an internal agent) drives the conversation, while every number comes from a pure, tested Python function that returns its evidence — the governing standard, the equation evaluated, the assumptions you must own, and the warnings you must not ignore.

"Verify this fuel-oil transfer system: 60 m³/h diesel at 40 °C,
 180 m discharge run rising 18 m, flooded suction, NPSHr 4 m…"

        Claude (orchestration, no arithmetic)
          │ tank_capacity        → 3,240 m³ working → 2 × 1,800 m³
          │ fluid_props_liquid   → ρ 819.8 kg/m³, μ 1.97 mPa·s  [ASTM D341]
          │ pipe_size_select     → NPS 4 SCH 40, 2.03 m/s ✓ (1–3 band)
          │ dp_segment_liquid    → Re 8.6e4, f 0.0205, 9.76 m    [Crane TP-410]
          │ pump_tdh             → TDH 28.8 m → rate at 32 m
          │ pump_npsha           → NPSHa 13.0 m vs NPSHr 4.0 ✓
          └ valve_cv_liquid      → Cv 11.9, not choked           [ISA 75.01]

The full conversation, produced by a real Claude client calling this server end to end, is preserved verbatim in docs/cases/case-01-transcript.md, and an interactive overview lets you step through the tool chain response by response.

Why trust the numbers

Every calculation is held by two independent legs (docs/verification.md):

  1. Golden tests from the governing documents. The IAPWS-IF97 water/steam implementation is written from the release itself (regions 1/2/4 + R12-08 viscosity, stdlib only) and locked by the release's own computer-program verification tables at 8–9 significant figures.

  2. Cross-validation against independent implementations. ~1,800 swept assertions compare the runtime core against fluids and iapws — which are test-only dependencies. The runtime has zero third-party calculation code, so the comparison is never circular.

The harness has already earned its keep: it caught a wall-thickness transcription error (NPS 18 SCH 80, 23.88 → 23.83 mm) and rejected five golden values written from memory instead of the document. Both incidents are kept in the verification log on purpose.

Related MCP server: eq-reference-mcp

Quick start

uvx ccpp-tools-mcp                 # stdio (once published to PyPI)
# or from a checkout:
uv run ccpp-tools-mcp              # stdio
uv run ccpp-tools-mcp --transport streamable-http --port 8899   # HTTP

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "ccpp-tools": {
      "command": "uvx",
      "args": ["ccpp-tools-mcp"]
    }
  }
}

Claude Code:

claude mcp add ccpp-tools -- uvx ccpp-tools-mcp

Claude mobile / web: run the HTTP transport, expose it (e.g. cloudflared tunnel --url http://localhost:8899), and add https://<your-tunnel>/mcp as a custom connector.

Then paste the demo prompt from docs/cases/case-01-fuel-oil-transfer.md and watch the tool chain run.

Tools (v1)

Tool

What it computes

Standard basis

fluid_props_liquid

ρ, ν/μ, Pv, SG for petroleum liquids (preset or custom 2-point fit)

API gravity / ASTM D341

fluid_props_steam

water/steam v, h, s, cp, μ; saturation states

IAPWS-IF97 / R12-08 (own implementation)

tank_capacity

working/nominal volume, residence time

volume balance (ahead of API 650/620)

pipe_size_select

smallest NPS/SCH meeting a velocity limit

ASME B36.10M + continuity

pipe_wall_thickness

pressure-design wall vs selected schedule

ASME B31.1 §104.1.2

dp_segment_liquid

Darcy friction + Crane fitting losses, Re/velocity flags

Crane TP-410 / Colebrook-White

list_crane_fittings

accepted fitting keys and their K basis

Crane TP-410

pump_tdh

total dynamic head balance

Hydraulic Institute

pump_npsha

NPSH available + margin vs NPSHr

HI 9.6.1 concepts

pump_power

hydraulic / shaft power

ρgQH

valve_cv_liquid

required Cv/Kv + choked-flow check

ISA 75.01 / IEC 60534-2-1

The response envelope

Every tool returns the same contract — a number you can defend:

{
  "result":     { "npsha_m": 12.99, "margin_m": 8.99 },
  "method":     { "standard": "Hydraulic Institute (HI 9.6.1 concepts)",
                  "equation": "NPSHa = (P_surface,abs - Pv)/(rho g) + z_static - h_f,suction" },
  "assumptions": [ "atmospheric pressure 101.325 kPa(a)",
                   "vapor pressure 0.5 kPa(a) at pumping temperature" ],
  "warnings":   [],
  "validity":   "ok"
}

Warnings are load-bearing: an undersized line answers with the number and a velocity flag; a deep-turndown case flags the laminar–turbulent transition; a near-saturation valve sizing reports choked flow. The orchestrating agent is expected to surface every warning to the user — the Case 01 transcript shows that happening.

Architecture

flowchart LR
    subgraph clients [MCP clients]
        A[Claude Desktop / mobile]
        B[Claude Code / Cursor]
        C[internal plant agent]:::private
    end
    subgraph server [ccpp-tools-mcp]
        E[slim envelope<br/>result + method + assumptions + warnings]
        subgraph core [stdlib-only calculation core]
            P[pipe: B36.10M · B31.1]
            H[hydro: Colebrook · Crane K]
            Q[equipment: pump · tank · ISA 75.01]
            F[props: ASTM D341 · IAPWS-IF97]
        end
    end
    subgraph oracles [test-only oracles]
        O1[fluids]
        O2[iapws]
        O3[official verification tables]
    end
    A & B & C -->|stdio / streamable-http| E --> core
    core -.->|cross-validated in CI| oracles
    classDef private stroke-dasharray: 5 5,stroke:#888,color:#888;

The internal orchestrating agent shown dashed is a private, out-of-scope deployment; everything demonstrated here runs on generic public MCP clients.

Scope and honest limits

  • Decision support, not engineering of record. Results carry their assumptions; the responsible engineer owns criterion selection, margins, and code compliance.

  • v1 is liquid-service only; compressible dP, heat-exchanger rating, and parallel-flow distribution arrive in v1.1 with their own validated cases.

  • IF-97 regions 3 (near-critical) and 5 are deliberately not implemented — out-of-range inputs raise instead of extrapolating.

  • The bundled diesel preset is a representative ASTM D975 sample, not project fuel data, and says so in every response.

  • Full gap list: docs/verification.md.

Development

uv sync --dev
git config core.hooksPath .githooks   # forbidden-token pre-commit gate
uv run pytest -q -m "not cross"       # unit + golden
uv run pytest -q -m cross tests/cross # sweeps vs fluids / iapws
uv run ruff check . && uv run mypy    # lint + strict types

License

Apache-2.0. Crane TP-410, ASME, ISA, HI, ASTM, and IAPWS are referenced as public standards; bring your own licensed copies for engineering use.

Available Tools

11 tools
dp_segment_liquidB

Darcy-Weisbach + Crane K pressure drop for one liquid pipe segment.

Inputs: nps_in (required), length_m (required), flow_m3_h (required), density_kg_m3 (required), +5 more. Returns: Uniform tool response: result + evidence.

fluid_props_liquidA

Petroleum-liquid density/viscosity/vapor pressure at a temperature.

Uses a named preset (currently 'diesel_no2', a representative ASTM D975 sample) or a custom fluid via api_gravity + two viscosity points [[T_degC, cSt], [T_degC, cSt]] (ASTM D341 fit) + vapor_pressure_kpa.

Inputs: temperature_c (required), preset, api_gravity, viscosity_points, +1 more. Returns: Uniform tool response: result + evidence.

fluid_props_steamA

Water/steam properties (own IAPWS-IF97 implementation).

Give both pressure and temperature for a single-phase state; only one of them for saturation properties at that pressure or temperature.

Inputs: temperature_c, pressure_bar_a. Returns: Uniform tool response: result + evidence.

list_crane_fittingsA

List fitting keys accepted by dp_segment_liquid and their K basis.

Inputs: no named parameters. Returns: Uniform tool response: result + evidence.

pipe_size_selectC

Select the smallest ASME B36.10M pipe meeting a velocity limit.

Inputs: flow_m3_h (required), max_velocity_m_s (required), schedule_name, min_velocity_m_s. Returns: Uniform tool response: result + evidence.

pipe_wall_thicknessC

ASME B31.1 pressure-design wall check against a selected schedule.

Inputs: nps_in (required), schedule_name (required), design_pressure_mpa (required), allowable_stress_mpa (required), +4 more. Returns: Uniform tool response: result + evidence.

pump_npshaC

NPSH available at the pump; margin check when NPSHr is supplied.

Inputs: density_kg_m3 (required), vapor_pressure_kpa (required), static_suction_head_m (required), npshr_m, +3 more. Returns: Uniform tool response: result + evidence.

pump_powerB

Hydraulic power, and shaft power when an efficiency is supplied.

Inputs: flow_m3_h (required), total_head_m (required), density_kg_m3 (required), pump_efficiency. Returns: Uniform tool response: result + evidence.

pump_tdhC

Pump total dynamic head from static lift, line losses, and pressures.

Inputs: static_head_m (required), density_kg_m3, suction_loss_m, discharge_loss_m, +2 more. Returns: Uniform tool response: result + evidence.

tank_capacityC

Storage-tank working/nominal volume and residence time from autonomy.

Inputs: autonomy_h (required), consumption_m3_h (required), working_fraction. Returns: Uniform tool response: result + evidence.

valve_cv_liquidA

ISA 75.01 required Cv/Kv for turbulent liquid flow (Fp = 1).

Supply inlet/vapor/critical pressures to enable the choked-flow check (for water use critical_pressure_bar_a = 220.64).

Inputs: dp_bar (required), flow_m3_h (required), specific_gravity (required), fl, +3 more. Returns: Uniform tool response: result + evidence.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 11 tools

    Disambiguation5/5

    Each tool targets a distinct calculation or resource: fluid properties (liquid vs steam), tank sizing, pipe sizing/wall thickness/pressure drop, pump TDH/NPSHA/power, and valve Cv. No two tools overlap in purpose; even fluid_props_liquid and fluid_props_steam cover different fluids.

    Naming Consistency4/5

    Tool names mostly follow a consistent object_attribute pattern (e.g., fluid_props_liquid, pipe_wall_thickness, pump_tdh). The one deviation is list_crane_fittings, which starts with a verb rather than a noun, but it is still clear and matches the underscore-separated lowercase style.

    Tool Count5/5

    With 11 tools, the set is well-scoped for a chemical/process engineering domain. Each tool covers a distinct design step, and the count is within the ideal 3-15 range without feeling sparse or bloated.

    Completeness4/5

    The toolset covers a complete liquid piping and pump design workflow: fluid properties, tank capacity, pipe sizing, wall thickness, pressure drop, pump head/NPSH/power, and valve Cv. Minor gaps exist for gas/compressible flow calculations, but the domain appears intentionally liquid-focused.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      A collection of MCP servers for chemical engineering and chemistry applications, enabling AI assistants to perform thermodynamic calculations, equation of state modeling, and phase equilibrium computations.
      5
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      MCP server for searching, browsing, solving, and interpolating engineering equations and reference tables. Provides access to 3,388 engineering equations across 10 subjects and 94 reference tables.
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      MCP server providing embedded engineering calculators and code generators as tools for AI agents, enabling precise, deterministic embedded math and C code generation.
      29
      74 npm
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      This MCP server enables AI clients to calculate the boiling temperature of water at a given absolute pressure using the IAPWS-IF97 standard, separating natural-language reasoning from authoritative scientific computation.
      1
      MIT