openfoam-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., "@openfoam-mcpSet up a simpleFoam case for a pipe flow with y+ of 30."
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.
OpenFOAM MCP by iLab — a CFD co-pilot for any MCP client
openfoam-mcp is a Model Context Protocol
server that turns an AI assistant (Claude Desktop, and any other MCP client)
into an OpenFOAM setup and debugging co-pilot. It scaffolds runnable cases,
edits dictionaries safely, sizes your near-wall mesh, computes inlet turbulence
values, and reads solver logs to tell you whether a run converged or blew up —
all without you leaving the chat.
Most of the tools are pure Python and need no OpenFOAM installation, so they
work anywhere. The few that call OpenFOAM utilities (e.g. blockMesh,
checkMesh) detect the environment and degrade gracefully when it is absent.
Validated end-to-end on real OpenFOAM (ESI v1912). Generated cases run through
blockMeshand the solvers — simpleFoam converges, all four mesh presets produce valid meshes, and the real logs are read back correctly by the residual and mesh-quality parsers. SeeVALIDATION.md.
OpenFOAM version support
scaffold_case takes an openfoam_flavor:
classic(default) —application <solver>;withtransportProperties. Validated on ESI v1912; works on ESI v2006+ and Foundation v8–v10.foundation-v12—application foamRun;+solver incompressibleFluid;withphysicalProperties, for OpenFOAM Foundation v11/v12. RunfoamRuninstead of the solver name.
Why it's useful
Setting up a CFD case is fiddly bookkeeping: the right y+, matching boundary
patches between the mesh and every 0/ field, consistent turbulence fields for
the chosen model, a stable Courant number, and reading pages of residual output
to see if it converged. This server does that bookkeeping through natural
language.
Make the hard part simple
Two tools do the work most people find fiddly:
recommend_setup— tell it your goal in plain words ("flow through a pipe", "drag on a car") and it returns the solver, turbulence model, targety+, mesh preset, per-patch boundary conditions and a numbered plan — asking you for only the numbers it still needs.generate_blockmesh— auto-writes a valid, boundary-layer-gradedblockMeshDictfrom a geometry preset. Give it your target first-cell height and it computes the wall grading for you. No hand-writing vertices or blocks.
Tools (20)
Tool | What it does |
| Start here. Goal to solver, model, mesh preset, BCs, plan (asks for missing inputs). |
| Auto blockMesh with wall grading auto-sized to your y+ (presets: channel, flatplate, step, box). |
| List the blockMesh geometry presets. |
| List scaffold-able solver templates (simpleFoam, pimpleFoam, icoFoam). |
| Reynolds number, laminar/turbulent verdict, turbulence-model recommendation. |
| First-cell height for a target |
| Inverse: predicted |
| Inlet |
| Transient time step from a target Courant number. |
| Colebrook-White friction factor + Darcy-Weisbach pressure drop / head loss. |
| Convective |
| Write a runnable case tree ( |
| Read a dictionary file or a single entry (via |
| Set a dictionary keyword (nested via |
| Set/insert a patch's |
| STL watertight/manifold check, bbox, area, volume, snappyHexMesh prep. |
| Parse a |
| Validate a case: files present, turbulence fields consistent, patches match mesh. |
| Parse a solver log into per-field residual drop + convergence verdict. |
| Run a whitelisted OpenFOAM utility inside a case (if installed). |
Install & run
The server ships as a PyPI package with a console entry point, so the usual
zero-install runner is uvx:
uvx openfoam-mcpor install it into an environment:
pip install openfoam-mcp
openfoam-mcpClaude Desktop configuration
Add this to claude_desktop_config.json
(macOS: ~/Library/Application Support/Claude/,
Windows: %APPDATA%\Claude\):
{
"mcpServers": {
"openfoam": {
"command": "uvx",
"args": ["openfoam-mcp"]
}
}
}Restart Claude Desktop; the OpenFOAM tools appear under the tools menu.
Example prompts
"I have air at 30 m/s over a 0.5 m chord. What Reynolds number is that, and what first-cell height do I need for y+ = 1?"
"Scaffold a steady simpleFoam case in ./duct at 12 m/s and check it."
"Set
endTimeto 3000 in ./duct/system/controlDict.""Read ./duct/log.simpleFoam and tell me if it converged."
Solver templates
Template | Physics | Typical use |
| Steady incompressible RANS (k-ω SST) | Ducts, external aero, general steady flow |
| Transient incompressible RANS (k-ω SST) | Vortex shedding, unsteady flows |
| Transient incompressible laminar | Low-Re teaching cases (cavity, low-Re pipe) |
Templates follow the OpenFOAM foundation v9–v12 / ESI v2306+ tutorial style
(transportProperties + momentumTransport). The generated box mesh has
patches inlet, outlet, walls, frontAndBack.
Development
pip install -e ".[dev]"
pytestLicense
MIT © 2026 iLab (Tanawat Manokieng)
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for AI dialogue using various LLM models via AceDataCloud
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
MCP Server for Slima - AI Writing IDE for Novel Authors with AI Beta Reader.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/kimlnw/openfoam-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server