PyThermoCalcDB-NASA-MCP
Enables thermodynamic property calculations (H, S, G, Cp, reaction equilibrium) using NASA-9 polynomial data through natural language or MCP-compatible clients.
README
๐งช PyThermoCalcDB-NASA-MCP
PyThermoCalcDB-NASA-MCP is a Model Context Protocol server for running selected
pythermocalcdb-nasa thermodynamic calculations from agents and MCP-compatible
clients.
๐ Overview
The MCP package is an interface and orchestration layer. It validates structured
requests, builds a ModelSource, calls deterministic pythermocalcdb-nasa
functions, and returns JSON-safe results. It does not implement the scientific
calculation itself.
The default source workflow uses the embedded NASA-9 SQLite database included by
pythermocalcdb-nasa. If a component is unavailable locally, the MCP server
returns a structured failure. External data search is not this MCP server's
responsibility; another agent or caller should prepare complete pyThermoDB
REFERENCE content and call the tool with source: "reference".
Use this package to:
- Calculate
H_T,S_T,G_T, andCp_Tfor one component. - Calculate
dH_rxn_STD,dS_rxn_STD,dG_rxn_STD,Keq, andKeq_vh_shortcutfor reactions. - Validate externally prepared pyThermoDB YAML reference content.
๐ฆ Installation
pip install pythermocalcdb-nasa-mcp
For local development:
uv sync
โถ๏ธ Running
STDIO is the default transport:
pythermocalcdb-nasa-mcp --mode stdio
HTTP transport is also supported:
pythermocalcdb-nasa-mcp --mode http --host 127.0.0.1 --port 8000 --path /mcp
From a local checkout:
uv run pythermocalcdb-nasa-mcp --mode stdio
๐ MCP Client Configuration
๐งต STDIO:
{
"mcpServers": {
"pythermocalcdb-nasa": {
"command": "pythermocalcdb-nasa-mcp",
"args": ["--mode", "stdio"]
}
}
}
๐ HTTP:
{
"mcpServers": {
"pythermocalcdb-nasa": {
"url": "http://127.0.0.1:8000/mcp"
}
}
}
๐ต๏ธ MCP Inspector
You can test the server with the official MCP Inspector.
For direct STDIO testing from a local checkout:
npx @modelcontextprotocol/inspector uv run pythermocalcdb-nasa-mcp --mode stdio
For HTTP testing, start the server first:
uv run pythermocalcdb-nasa-mcp --mode http --host 127.0.0.1 --port 8000 --path /mcp
Then connect Inspector to:
http://127.0.0.1:8000/mcp
๐ MCP Resources
pythermocalcdb-nasa://references/nasa-requirements- Source policy, NASA symbols, units, temperature ranges, and agent boundaries.
pythermocalcdb-nasa://workflows/species-properties- Workflow for
H_T,S_T,G_T, andCp_T.
- Workflow for
pythermocalcdb-nasa://workflows/reaction-properties- Workflow for
dH_rxn_STD,dS_rxn_STD,dG_rxn_STD,Keq, andKeq_vh_shortcut.
- Workflow for
pythermocalcdb-nasa://guidance/agent-checklist- Checklist for reliable database-first and reference-backed calls.
๐งฐ MCP Tools
๐ฅ Species tools:
calc_H_Tcalc_S_Tcalc_G_Tcalc_Cp_T
โ๏ธ Reaction tools:
calc_dH_rxn_STDcalc_dS_rxn_STDcalc_dG_rxn_STDcalc_Keqcalc_Keq_vh_shortcut
๐ ๏ธ Utility tool:
check_yaml_reference
๐ Input Model Notes
Calculation tools receive one Pydantic argument named request. They use shared
domain models from pythermodb_settings, including Component, Temperature,
and ComponentKey.
๐๏ธ Database-backed species request:
{
"request": {
"component": {
"name": "carbon dioxide",
"formula": "CO2",
"state": "g"
},
"temperature": {
"value": 300.0,
"unit": "K"
},
"source": "database",
"component_key": "Name-Formula",
"nasa_type": "nasa9",
"basis": "molar"
}
}
๐ Reference-backed species request:
{
"request": {
"component": {
"name": "component name from prepared reference",
"formula": "Formula",
"state": "g"
},
"temperature": {
"value": 300.0,
"unit": "K"
},
"source": "reference",
"reference_content": "REFERENCES:\n ...",
"component_key": "Name-Formula",
"nasa_type": "nasa9",
"basis": "molar"
}
}
๐๏ธ Database-backed reaction request:
{
"request": {
"name": "Water-Gas Shift Reaction",
"reaction": "CO(g) + H2O(g) => CO2(g) + H2(g)",
"components": [
{"name": "carbon monoxide", "formula": "CO", "state": "g"},
{"name": "dihydrogen monoxide", "formula": "H2O", "state": "g"},
{"name": "carbon dioxide", "formula": "CO2", "state": "g"},
{"name": "dihydrogen", "formula": "H2", "state": "g"}
],
"temperature": {
"value": 398.15,
"unit": "K"
},
"source": "database",
"component_key": "Name-Formula",
"nasa_type": "nasa9"
}
}
Use the same reaction request shape with calc_Keq_vh_shortcut when a van't
Hoff shortcut estimate is requested. It returns a dimensionless equilibrium
constant.
Responses follow this contract:
{
"success": true,
"message": "H_T completed successfully.",
"results": {
"operation": "H_T",
"value": 0.0,
"unit": "J/mol"
},
"analysis": {
"source": "database"
},
"warnings": []
}
โ Best Practices
- Use
source: "database"first for NASA-9 data in supportedg,l, andsphases. - Use
source: "reference"only with complete externally preparedreference_content. - Do not ask this MCP server to search external scientific data.
- Keep temperature inputs in Kelvin.
- Make sure every reaction species appears in both the reaction equation and
components. - Use
nasa_type: "nasa9"with the database source. - Check
success,message, andwarningsbefore reporting results.
๐งช Development Quick Check
python -m py_compile pythermocalcdb_nasa_mcp/server.py
python -m py_compile pythermocalcdb_nasa_mcp/interface/core.py
python -m py_compile pythermocalcdb_nasa_mcp/models/nasa.py
python -m unittest discover tests
๐ Examples
Example payload shapes are available in examples/request_payloads.py.
๐ License
This project is licensed under the Apache License 2.0. See LICENSE.
๐ค Author
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.