Skip to main content
Glama
JerryMansikkaviita

CoolpropMCP

README.md
# CoolProp MCP Server

MCP server exposing thermodynamic and transport properties of refrigerants
(and ~130 other fluids) from [CoolProp](https://coolprop.org).

All values are **SI units**: temperature K, pressure Pa (absolute),
enthalpy/internal energy J/kg, entropy J/kg/K, density kg/m³,
viscosity Pa·s, conductivity W/m/K.

## Tools

| Tool | Purpose |
|---|---|
| `get_state` | Full state point (T, P, ρ, h, s, u, quality, cp, cv, μ, λ, speed of sound, Z, Pr, phase) from any two of T/P/D/H/S/U/Q |
| `get_property` | Single property at a state — any CoolProp output key |
| `get_saturation` | Saturated liquid + vapor states, latent heat and temperature glide at given T or P |
| `get_fluid_info` | Critical point, triple point, molar mass, T/P limits, GWP, ODP, normal boiling point |
| `get_humid_air_property` | Moist air properties for HVAC (enthalpy, humidity ratio, dew point, wet bulb, …) |
| `list_fluids` | Common refrigerants, or every CoolProp fluid |
| `list_property_keys` | Valid property keys and their units |

Fluid names follow CoolProp naming and aliases: `R134a`, `R32`, `R410A`,
`R404A`, `R407C`, `R1234yf`, `R290` (propane), `R600a` (isobutane),
`R744` (CO₂), `R717` (ammonia), `R718`/`Water`, `Air`, …

## Setup

```powershell
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -r requirements.txt
```

## Tests

```powershell
.\.venv\Scripts\python.exe test_server.py   # tool logic + reference values
.\.venv\Scripts\python.exe test_e2e.py      # full MCP stdio round trip
```

## Use with Claude Code

Registered user-scoped (available in every folder) with:

```powershell
claude mcp add --scope user coolprop -- C:\Users\jerry.mansikkaviita\Desktop\CoolpropMCP\.venv\Scripts\python.exe C:\Users\jerry.mansikkaviita\Desktop\CoolpropMCP\server.py
```

## Use with Claude Desktop

Add to `%APPDATA%\Claude\claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "coolprop": {
      "command": "C:\\Users\\jerry.mansikkaviita\\Desktop\\CoolpropMCP\\.venv\\Scripts\\python.exe",
      "args": ["C:\\Users\\jerry.mansikkaviita\\Desktop\\CoolpropMCP\\server.py"]
    }
  }
}
```

## Example prompts

- "What is the enthalpy of saturated R134a vapor at −10 °C?" (remember: inputs in K/Pa)
- "Full state of R410A at 25 bar and 80 °C superheat"
- "Latent heat and glide of R407C at 5 bar"
- "GWP and critical point of R1234yf vs R134a"