calcscript
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
calcscript
Engineering calculators for oil and gas: thermo, flow, pipes, valves, heat exchangers, economics. calcscript is a local forwarding client for the hosted MCP service at engscript.com: it answers tools/list on your own machine from the captured tool definitions and forwards every call to the service, returning the answers exactly as they come back.
The tools
MIXTURE— Primary thermodynamic property calculator. Required:HC,mole,P,T.CARBON— Calculate thermodynamic properties of hydrocarbon mixture. Required:HC,mole,P,T.STEAM— Calculate thermodynamic and transport properties of steam based on IAPWS Required:P,T.PSYCHROMETRIC— Psychrometric properties of moist air Required:BP,DB.FUELGAS— Calculate MW, LHV and HHV of fuel gas from composition Required:HC,mole.FLUEGAS— Calculate enthalpy of flue gas from composition Required:HC,mole,Tb,Tg.EMISSIONFACTOR— Calculate CO2 emission conversion factor from gas composition Required:HC,mole.REFRIGERANT— Calculate refrigerant thermodynamic properties using CoolProp. Required:Fluid.PTV— Calculate gas molar volume using equation of state Required:P,T.MtoV— Convert mass flow rate to volumetric flow rate at standard condition Required:M,MW.VtoM— Convert volumetric flow rate to mass flow rate at standard condition and normal condition Sm3/hr, Nm3/hr, SCFH Required:V,MW.Pmean— Calculate mean pressure between inlet and outlet Required:Fluid,P1,P2.PIPEFF— Calculate Darcy friction factor based on Reynolds number and pipe roughness Required:Piping,D,Re.STEAMLEAK— Calculate steam leak mass flow and flow condition (CHOKED / SUBCRITICAL) based on upstream and downstream conditions Required:P1,P2,T1,T2,h.STEAMPH— Calculate mass flow from pin-hole on the steam piping Required:P,T,h.PIPEINSUL— Calculate optimal pipe insulation thickness to limit outer surface temperature (burn protection) and minimise heat loss. Required:NPS,Tf,Ta,Tmax,kins,ha.PIPESTEAM— Calculate steam pipe sizing: pipe diameter, velocity, pressure drop Required:P,T,M,L.PIPEWATER— Calculate water pipe sizing: pipe diameter, velocity, pressure drop Required:P,T,M,L.PIPEAIR— Calculate compressed air pipe sizing: pipe diameter, velocity, pressure drop Required:P,T,M,L.PIPENITROGEN— Calculate nitrogen pipe sizing: pipe diameter, velocity, pressure drop Required:P,T,M,L.PIPEFLOWGAS— Calculate isothermal gas pipe flow: density, volumetric flow rate, mass flow rate from pressure drop Required:P1,P2,T,L,D,MW.PIPEFLOWLIQ— Calculate liquid pipe flow: volumetric flow rate and mass flow rate from pressure drop Required:P1,P2,L,D,rho.CVGAS— Calculate gas control valve Cv and Kv from flow conditions Required:Q,P1,P2,T1,MW,k.CVLIQ— Calculate liquid control valve Cv and Kv from flow conditions Required:Q,P1,P2,rho.CVSTEAM— Calculate steam control valve Cv and Kv from flow conditions Required:M,P1,P2,rho.ORIFICEGAS— Gas orifice sizing / differential pressure / flow rate calculation based on ISO 5167 orifice. Required:M,dP,D2,P1,D1,rho,mu.ORIFICELIQ— Liquid orifice sizing / differential pressure / flow rate calculation based on ISO 5167 orifice. Required:M,dP,D2,P1,D1,rho,mu.VENTURIGAS— Gas Venturi tube sizing / differential pressure / flow rate calculation based on ISO 5167 Venturi meter (as cast convergent venturi tube). Required:M,dP,D2,P1,D1,rho,mu.VENTURILIQ— Liquid Venturi tube sizing / differential pressure / flow rate calculation based on ISO 5167 Venturi meter (as cast convergent venturi tube). Required:M,dP,D2,P1,D1,rho,mu.PSVGAS— Calculate required PSV (pressure safety valve) relief area for gas/vapor service per API 520 Required:M,P1,P2,T1,MW.PSVSTEAM— Calculate required PSV (pressure safety valve) relief area for steam service per API 520 Required:M,P1,T1.PSVLIQ— Calculate required PSV (pressure safety valve) relief area for liquid service per API 520 Required:M,P1,P2,rho.PUMPBHP— Calculate pump brake horsepower Required:rho,Q,P1,P2,Eff.COMPPOLYEFF— Calculate polytropic efficiency of compressor Required:Pi,Po,Ti,To,k.TBNEFF— Calculate steam turbine isentropic efficiency Required:Pi,Ti,Po,To.STGEFF— Calculate multistage steam turbine isentropic efficiency Required:M1,P1,T1,P2,T2,E.HTRINOUTEFF— Calculate fired heater heat duty and efficiency from inlet/outlet conditions and composition Required:HC,mole,Mfuel,Tfuel,Tair,exO2,Trad,Tstk.HTRLOSSEFF— Calculate fired heater loss efficiency from ambient temperature, stack gas temperature and excess oxygen Required:Type,Tg,Ta,exO2.HEXRF— Heat exchanger fouling resistance back-calculation from shell/tube-side operating conditions. Required:Unknown,D_shll,D_tube,D_wall,P_tube,S_baffle,N_tube,L_tube,N_shllseri,N_shllpara,N_shllpass,N_tubepass,A_hex,R_shll,R_tube,F,k_hex,T_shll,rho_shll,Cp_shll,mu_shll,k_shll,T_tube,rho_tube,Cp_tube,mu_tube,k_tube,V_shll,T1_shll,T2_shll,V_tube,T1_tube,T2_tube.LMTD— Calculate LMTD of heat exchanger Required:Thi,Tho,Tci,Tco.STEAMFLASH— Calculate flash steam flow from pressure reduction Required:Mc,Pc,Ps.DESUPERHEATER— Calculate boiler feed water flow and total flow from pressure and temperature reduction through desuperheater. Required:Min,Pin,Tin,Pout,Tout,Pbfw,Tbfw.HPADEPRESS— Calculate depressurization gas volume and hold time for high pressure air storage vessel Required:V1,P1,P2,Q2.GN2DEPRESS— Calculate depressurization gas volume and hold time for gaseous nitrogen storage vessel Required:V1,P1,P2,Q2.LN2DEPRESS— Calculate depressurization gas volumn abd hold time and saturation temperature for liquid nitrogen storage vessel Required:V1,P1,P2,Q2.STMDEPRESS— Calculate depressurization steam volumn and hold time for steam accumulator Required:V1,P1,P2,M2.CTWREVAPOR— Cooling tower evaporation rate: mass removal rate (MR) and heat removal rate (QR) Required:INPUT.CTWRLG— Cooling tower L/G ratio calculation Required:INPUT.CTWRNTU— Cooling tower NTU and characteristic C value calculation Required:INPUT.CTWRCAPA— Cooling tower capacity evaluation Required:INPUT.CTWRCAPADSNTST— Cooling tower capacity evaluation: design vs test Required:INPUT.DVR— Data Validation and Reconciliation Required:MEASURED,ACCURACY,EQUATION.advDVR— Advanced Data Validation and Reconciliation including gross error detection and elimation Required:MEASURED,ACCURACY,EQUATION.BALANCE— General mass/energy balance solver using GEKKO Required:VARIABLE,EQUATION.PINCHMANUAL— Pinch analysis (minimum utilities, pinch temperatures, composite curves, grand composite curve) and heat exchanger network design by manual tick-off heuristic Required:INPUT.PINCHSOLVER— Pinch analysis (minimum utilities, pinch temperatures, composite curves, grand composite curve) and heat exchanger network design by optimization solver Required:INPUT.FORMULA— Generic formula calculator with unit conversion and IF-THEN-ELSE Required:INPUT,FORMULA,OUTPUT.SOLVE— Solve nonlinear equations with unknown variables using fsolve Required:INPUT,FORMULA,OUTPUT.ECONOMIC— Economic analysis: NPV, IRR, Simple Payback, Profitability Index, EAC Required:CF.advECONOMIC— Advanced Economic analysis with inflation, depreciation, and tax: NPV, IRR, Simple Payback, Profitability Index, NCF Required:INPUT.
Related MCP server: CalcsLive MCP Server
Install and run
As an MCP server via npm:
npx -y @reneturcios/calcscript mcpMCP client configuration:
{
"mcpServers": {
"calcscript": {
"command": "npx",
"args": ["-y", "@reneturcios/calcscript", "mcp"]
}
}
}As a container:
docker run -i ghcr.io/cloudcorprecords/calcscript
docker run --rm ghcr.io/cloudcorprecords/calcscript MIXTURE '<json-args>'CLI
One binary serves both the command line and the MCP server. Each tool is a subcommand taking a single JSON string with that tool's arguments:
calcscript MIXTURE '{"HC":["a","b"],"mole":[1,2],"P":{},"T":{}}'
calcscript CARBON '{"HC":["a","b"],"mole":[1,2],"P":{},"T":{}}'
calcscript --versionExit codes: 0 when the forwarded call succeeds, 1 when the upstream result is an error, and 2 for usage problems such as an unknown subcommand or a malformed JSON argument.
Configuration
CALCSCRIPT_MCP_URL— Overrides the upstream endpoint. The default is the pinned hosted endpoint,https://engscript.com/mcp. (The override variable is a reconstruction added by this rebuild.)
The upstream registry record declares no headers on its remote, so calcscript sends no authentication header of any kind — the calls are keyless.
Upstream failures — a JSON-RPC error from the service, a non-2xx response, an unreadable body, or a request that fails outright — are reported to the caller as an error result whose text starts with calcscript error:.
How forwarding works
The first forwarded call opens a session: an initialize request (protocol version 2025-03-26), followed by a notifications/initialized notification, then the tools/call itself. If the service answers the initialize request with an Mcp-Session-Id header, that value is carried on every later request, and the open session is reused for the rest of the process. Replies are accepted either as plain JSON or as server-sent events. Successful results pass through verbatim, including any isError flag and any extra fields the service includes. The full captured surface is 60 tools.
Development
npm install
npm run build # tsc -> dist/ (dist/cli.js is the bin)
npm test # tsx --test test/*.test.ts — stubbed upstream, no network
npm run dev # run the CLI from sourceThe test suite checks the served tool list against the captured fixture, exercises the session handshake and its reuse, asserts that no Authorization header is sent under any environment, and verifies that arguments go upstream untouched and results come back untouched.
License
MIT — see LICENSE. Copyright (c) 2026 Rene Turcios.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Engineering calculation MCP server for oil and gas engineering applications.
AI-callable calculators and engineering models with real formulas. No hallucinated math.
BusCalc 1.8.0 exposes 33 public tool families: 26 calculations and seven attributed data lookups. Calculate business pricing, finance, uncertainty, lease economics and emergency dispatch margins. Look up metals, energy, exchange rates, weather, BLS, USDA, Census and selected emergency sources, including NOAA gauges and USGS flood-impact points. Calculations include unsigned replayable receipts. Lookup results include source and observation dates where available. Road and outage coverage varies by location. The public Streamable HTTP endpoint is https://buscalc.com/api/mcp. Direct access is anonymous and rate limited. Full guide: https://buscalc.com/for-ai/
Paid Structural Engineering Calculators API via x402. Unpaid tool calls return 402.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to perform petroleum engineering calculations including PVT analysis, well performance modeling, and reservoir simulation support using industry-standard correlations and field units.4550GPL 3.0
- AlicenseAqualityDmaintenanceEnables AI agents to perform unit-aware engineering calculations with automatic unit conversion, dependency resolution, and access to 500+ units across 75+ categories through the CalcsLive calculation engine.38 npmMIT
- AlicenseBqualityBmaintenanceEnables users to connect their chat client to calculation tools for subsurface geological models, perform model checks and scenarios on exported Petrel/RMS data, and inspect reports and 3D scenes through a local viewer.401Apache 2.0
- AlicenseNot gradedqualityBmaintenanceProvides MCP tools for pipe flow and sizing, valve sizing, fluid properties, and bounded parameter sweeps with assumptions and limits returned as structured evidence. Enables AI engineering clients to run hydraulic calculations locally over stdio without accounts or private packages, while explanations and reporting stay with the calling model.8MIT