PyMemSim-MCP

PyMemSim-MCP

Exposes membrane simulation capabilities through an MCP server, enabling gas hollow-fiber membrane simulations with dynamic thermodynamic model sources.

Category
Visit Server

README

PyMemSim-MCP

PyPI Downloads PyPI Python Version License MCP

PyMemSim-MCP exposes PyMemSim membrane simulation capabilities through an MCP server.

Overview ๐ŸŒ

PyMemSim-MCP is a next-generation framework that brings the Model Context Protocol into chemical engineering modeling and simulation, specifically for membrane-based separation systems.

Built on top of PyMemSim, this package introduces a model-source-driven architecture in which thermodynamic data, transport properties, and governing equations are defined externally in a structured, machine-readable format (e.g., YAML). These model sources are dynamically constructed using tools such as PyThermoLinkDB and PyThermoDB, and then supplied, alongside conventional inputs like temperature, pressure, and composition, to simulation workflows.

Unlike traditional tightly coupled simulation tools, PyMemSim-MCP decouples data, equations, and numerical solvers, enabling:

  • โœ… Consistent and unit-safe thermodynamic definitions across simulations
  • ๐Ÿ”— Flexible integration with multiple modeling packages and workflows
  • โš™๏ธ Solver-agnostic execution of mass and heat balance equations
  • ๐Ÿ” Transparent and interpretable simulation pipelines

A key innovation of PyMemSim-MCP is its compatibility with agentic workflows, where specialized agents can:

  • ๐Ÿง  Extract and structure thermodynamic data from unstructured sources into validated model sources
  • ๐Ÿค– Interact with MCP-enabled endpoints to perform simulations, sensitivity analysis, and optimization

This approach addresses critical gaps in current LLM-integrated engineering tools, where inconsistencies in data formats, units, and equations often lead to unreliable results. By enforcing a unified scientific contract, PyMemSim-MCP allows LLMs to control both conventional inputs and structured model sources before executing physics-based computations, significantly improving robustness and reproducibility.

PyMemSim-MCP is particularly suited for:

  • ๐Ÿงช Membrane process modeling (e.g., hollow fiber modules, gas separation)
  • ๐Ÿค AI-assisted simulation workflows
  • ๐Ÿš€ Rapid prototyping and validation of process models
  • ๐ŸŽ“ Educational and research applications in computational chemical engineering

Overall, PyMemSim-MCP represents a step toward trustworthy AI-driven simulation environments, where domain knowledge, data, and numerical methods are seamlessly integrated under a standardized and extensible framework.

Requirements ๐Ÿ“‹

  • Python >=3.11
  • pip (or uv)

Install the package ๐Ÿ“ฆ

pip install pymemsim-mcp

This installs the CLI entrypoint:

  • pymemsim-mcp

Start / Activate the MCP Server โ–ถ๏ธ

The server entrypoint is:

  • module: python -m pymemsim_mcp.server
  • script: pymemsim-mcp

Both support the same options.

Case A: STDIO transport (recommended for MCP desktop/agent clients) ๐Ÿงต

pymemsim-mcp --mode stdio

Equivalent:

python -m pymemsim_mcp.server --mode stdio

Case B: HTTP transport (for network-accessible clients) ๐ŸŒ

pymemsim-mcp --mode http --host 127.0.0.1 --port 8000 --path /mcp

Equivalent:

python -m pymemsim_mcp.server --mode http --host 127.0.0.1 --port 8000 --path /mcp

CLI Options โŒจ๏ธ

  • --mode: stdio or http (default: stdio)
  • --host: HTTP bind host (default: 127.0.0.1)
  • --port: HTTP bind port (default: 8000)
  • --path: HTTP endpoint path (default: /mcp)

MCP Client Configuration Examples ๐Ÿ”Œ

STDIO client config (generic)

{
  "mcpServers": {
    "pymemsim": {
      "command": "pymemsim-mcp",
      "args": ["--mode", "stdio"]
    }
  }
}

HTTP client config (generic)

{
  "mcpServers": {
    "pymemsim": {
      "url": "http://127.0.0.1:8000/mcp"
    }
  }
}

Available Tool ๐Ÿงฉ

  • simulate_gas_hfm: build thermo model source from reference content and run gas hollow-fiber membrane simulation.

Development Quick Check โœ…

python -m py_compile pymemsim_mcp/server.py
python -m py_compile pymemsim_mcp/interface/gas_hfm.py

Troubleshooting ๐Ÿฉบ

  • pymemsim-mcp: command not found

    • Run pip install -e . in the active environment.
    • Confirm environment is activated.
  • Port already in use (HTTP mode)

    • Change port, for example: --port 8010.
  • Import errors

    • Reinstall dependencies: pip install -e ..

โ“ FAQ

For any questions, contact me on LinkedIn.

๐Ÿ“„ License

This project is licensed under the Apache License 2.0. See the LICENSE file for details.

๐Ÿ‘จโ€๐Ÿ’ป Authors

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured