Skip to main content
Glama
sinagilassi

PyThermoCalcDB-NASA-MCP

by sinagilassi

🧪 PyThermoCalcDB-NASA-MCP

PyPI Downloads PyPI Python Version License MCP

PyThermoCalcDB-NASA-MCP 是一个模型上下文协议(Model Context Protocol)服务器,用于从代理和 MCP 兼容客户端运行选定的 pythermocalcdb-nasa 热力学计算。

🌐 概述

MCP 包是一个接口和编排层。它验证结构化请求,构建 ModelSource,调用确定性的 pythermocalcdb-nasa 函数,并返回 JSON 安全的结果。它本身不实现科学计算。

默认数据源工作流使用 pythermocalcdb-nasa 内置的 NASA-9 SQLite 数据库。如果某个组件在本地不可用,MCP 服务器会返回一个结构化的失败信息。外部数据搜索不是此 MCP 服务器的职责;其他代理或调用方应准备完整的 pyThermoDB REFERENCE 内容,并使用 source: "reference" 调用工具。

使用此包可以:

  • 计算单个组件的 H_TS_TG_TCp_T

  • 计算反应的 dH_rxn_STDdS_rxn_STDdG_rxn_STDKeqKeq_vh_shortcut

  • 验证外部准备的 pyThermoDB YAML 参考内容。

Related MCP server: MoziChem-MCP

📦 安装

pip install pythermocalcdb-nasa-mcp

本地开发:

uv sync

▶️ 运行

默认传输协议为 STDIO:

pythermocalcdb-nasa-mcp --mode stdio

也支持 HTTP 传输:

pythermocalcdb-nasa-mcp --mode http --host 127.0.0.1 --port 8000 --path /mcp

从本地检出运行:

uv run pythermocalcdb-nasa-mcp --mode stdio

🔌 MCP 客户端配置

🧵 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

您可以使用官方的 MCP Inspector 测试服务器。

直接从本地检出进行 STDIO 测试:

npx @modelcontextprotocol/inspector uv run pythermocalcdb-nasa-mcp --mode stdio

进行 HTTP 测试时,先启动服务器:

uv run pythermocalcdb-nasa-mcp --mode http --host 127.0.0.1 --port 8000 --path /mcp

然后将 Inspector 连接到:

http://127.0.0.1:8000/mcp

📚 MCP 资源

  • pythermocalcdb-nasa://references/nasa-requirements

    • 数据源策略、NASA 符号、单位、温度范围和代理边界。

  • pythermocalcdb-nasa://workflows/species-properties

    • 用于 H_TS_TG_TCp_T 的工作流。

  • pythermocalcdb-nasa://workflows/reaction-properties

    • 用于 dH_rxn_STDdS_rxn_STDdG_rxn_STDKeqKeq_vh_shortcut 的工作流。

  • pythermocalcdb-nasa://guidance/agent-checklist

    • 用于可靠数据库优先和参考支持调用的检查清单。

🧰 MCP 工具

🔥 物种工具:

  • calc_H_T

  • calc_S_T

  • calc_G_T

  • calc_Cp_T

⚗️ 反应工具:

  • calc_dH_rxn_STD

  • calc_dS_rxn_STD

  • calc_dG_rxn_STD

  • calc_Keq

  • calc_Keq_vh_shortcut

🛠️ 实用工具:

  • check_yaml_reference

📝 输入模型说明

计算工具接收一个名为 request 的 Pydantic 参数。它们使用 pythermodb_settings 中的共享领域模型,包括 ComponentTemperatureComponentKey

🗄️ 数据库支持的物种请求:

{
  "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"
  }
}

📄 参考支持的物种请求:

{
  "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"
  }
}

🗄️ 数据库支持的反应请求:

{
  "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"
  }
}

当需要 van't Hoff 捷径估算时,使用相同的反应请求形状调用 calc_Keq_vh_shortcut。它返回一个无量纲的平衡常数。

响应遵循如下约定:

{
  "success": true,
  "message": "H_T completed successfully.",
  "results": {
    "operation": "H_T",
    "value": 0.0,
    "unit": "J/mol"
  },
  "analysis": {
    "source": "database"
  },
  "warnings": []
}

✅ 最佳实践

  • 对于支持 gls 相的 NASA-9 数据,优先使用 source: "database"

  • 仅当有完整的外部准备的 reference_content 时,才使用 source: "reference"

  • 不要要求此 MCP 服务器搜索外部科学数据。

  • 温度输入保持开尔文单位。

  • 确保反应中的每个物种同时出现在反应方程式和 components 中。

  • 使用数据库源时,设置 nasa_type: "nasa9"

  • 在报告结果之前,检查 successmessagewarnings

🧪 开发快速检查

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/request_payloads.py 中找到。

📄 许可证

本项目采用 Apache License 2.0 许可证。详见 LICENSE

👤 作者

Install Server
A
license - permissive license
A
quality
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    Enables AI assistants to perform complex chemical engineering calculations including thermodynamic modeling, equation of state calculations, phase equilibrium computations, and vapor-liquid equilibrium analysis. Built on the MoziChem framework to bridge AI language models with specialized chemical engineering tools.
    6
    4
    MIT
  • A
    license
    -
    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.
    MIT

View all related MCP servers

Related MCP Connectors

  • Science MCP — free science data APIs

  • Materials MCP — computed (DFT) materials structures & thermodynamic properties.

  • AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.

View all MCP Connectors

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/sinagilassi/PyThermoCalcDB-NASA-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server