PyMemSim-MCP
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PyMemSim-MCPsimulate CO2/N2 separation in hollow fiber membrane with feed 20% CO2 at 5 bar"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
PyMemSim-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.
Related MCP server: CONTAM MCP
Requirements ๐
Python
>=3.11pip(oruv)
Install the package ๐ฆ
pip install pymemsim-mcpThis installs the CLI entrypoint:
pymemsim-mcp
Start / Activate the MCP Server โถ๏ธ
The server entrypoint is:
module:
python -m pymemsim_mcp.serverscript:
pymemsim-mcp
Both support the same options.
Case A: STDIO transport (recommended for MCP desktop/agent clients) ๐งต
pymemsim-mcp --mode stdioEquivalent:
python -m pymemsim_mcp.server --mode stdioCase B: HTTP transport (for network-accessible clients) ๐
pymemsim-mcp --mode http --host 127.0.0.1 --port 8000 --path /mcpEquivalent:
python -m pymemsim_mcp.server --mode http --host 127.0.0.1 --port 8000 --path /mcpCLI Options โจ๏ธ
--mode:stdioorhttp(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.pyTroubleshooting ๐ฉบ
pymemsim-mcp: command not foundRun
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
This server cannot be installed
Maintenance
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/PyMemSim-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server