OpenFOAM
LLM-powered OpenFOAM MCP server for intelligent CFD education with Socratic questioning and expert error resolution
What is OpenFOAM?
OpenFOAM is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to llm-powered openfoam mcp server for intelligent cfd education with socratic questioning and expert error resolution
LLM-powered OpenFOAM MCP server for intelligent CFD education with Socratic questioning and expert error resolution
This server falls under the Data Science & ML category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- LLM-powered OpenFOAM MCP server for intelligent CFD educatio
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx openfoamConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use OpenFOAM
The OpenFOAM MCP Server is a C++-native MCP server that connects AI assistants directly to OpenFOAM 12, the leading open-source computational fluid dynamics (CFD) platform, enabling intelligent simulation guidance through Socratic questioning, automated mesh quality assessment, error diagnosis using five-whys methodology, and specialized analysis tools for rotating detonation engines (RDE). It exposes 12 registered tools covering the full CFD workflow from STL geometry preprocessing through mesh generation, solver execution, and results analysis — making it the first AI-powered tutor and automation layer for OpenFOAM practitioners.
Prerequisites
- OpenFOAM 12 installed at /opt/openfoam12 (or equivalent path with env vars adjusted)
- CMake 3.16+ and a C++17 compiler (GCC recommended) for building the server
- Linux environment (the server uses OpenFOAM's Linux-native libraries)
- Claude Code CLI or another MCP-compatible client
- Basic familiarity with CFD concepts and OpenFOAM case structure
Clone and build the server
Clone the repository and build the C++ MCP server binary using CMake. The build process links against OpenFOAM 12 libraries.
git clone https://github.com/webworn/openfoam-mcp-server.git
cd openfoam-mcp-server
mkdir build && cd build
cmake ..
make -j$(nproc)Set OpenFOAM 12 environment variables
Export the required environment variables so the server can locate OpenFOAM libraries and binaries. Source your OpenFOAM installation profile if available.
export WM_PROJECT_DIR=/opt/openfoam12
export FOAM_INST_DIR=/opt/openfoam12
export FOAM_LIBBIN=/opt/openfoam12/platforms/linux64GccDPInt32Opt/lib
export FOAM_APPBIN=/opt/openfoam12/platforms/linux64GccDPInt32Opt/bin
export LD_LIBRARY_PATH=/opt/openfoam12/platforms/linux64GccDPInt32Opt/lib/dummy:$FOAM_LIBBIN:$LD_LIBRARY_PATHAdd the server to your MCP client configuration
Configure your MCP client (e.g., Claude Code) to launch the built binary with the required OpenFOAM environment variables passed through.
Verify the connection with Claude Code
Add the server via Claude Code's mcp command and verify it appears in the server list.
claude mcp add-json openfoam-mcp-server '{"command": "/path/to/openfoam-mcp-server/build/openfoam-mcp-server-test", "args": [], "env": {"WM_PROJECT_DIR": "/opt/openfoam12", "FOAM_INST_DIR": "/opt/openfoam12"}}'
claude mcp listStart a CFD assistance session
Use the start_cfd_assistance tool to initiate an educational CFD conversation. The server will use Socratic questioning to guide your understanding of the simulation.
OpenFOAM Examples
Client configuration
Claude Code MCP config for the OpenFOAM server with required environment variables.
{
"mcpServers": {
"openfoam-mcp-server": {
"command": "/path/to/openfoam-mcp-server/build/openfoam-mcp-server-test",
"args": [],
"env": {
"WM_PROJECT_DIR": "/opt/openfoam12",
"FOAM_INST_DIR": "/opt/openfoam12",
"FOAM_LIBBIN": "/opt/openfoam12/platforms/linux64GccDPInt32Opt/lib",
"FOAM_APPBIN": "/opt/openfoam12/platforms/linux64GccDPInt32Opt/bin",
"FOAM_ETC": "/opt/openfoam12/etc",
"LD_LIBRARY_PATH": "/opt/openfoam12/platforms/linux64GccDPInt32Opt/lib/dummy:/opt/openfoam12/platforms/linux64GccDPInt32Opt/lib"
}
}
}
}Prompts to try
Example prompts covering CFD education, simulation analysis, and error resolution.
- "Analyze water flow in a 0.1m diameter pipe at 2 m/s — what turbulence model should I use?"
- "My heat transfer simulation residuals are oscillating — help me diagnose the root cause"
- "Assess the mesh quality of my current case and recommend improvements for the solver"
- "Analyze this STL file for snappyHexMesh preprocessing and identify any geometry issues"
- "I'm simulating turbulent flow with k-omega SST — guide me through selecting appropriate boundary conditions"
- "Calculate RDE thrust and Isp efficiency for my 3D annular geometry"Troubleshooting OpenFOAM
Build fails with missing OpenFOAM headers or libraries
Ensure OpenFOAM 12 is properly installed at /opt/openfoam12 and that all environment variables (WM_PROJECT_DIR, FOAM_LIBBIN, etc.) are exported before running cmake and make. Source the OpenFOAM bashrc with 'source /opt/openfoam12/etc/bashrc' if available.
Server binary starts but OpenFOAM operations fail at runtime
The README notes the server is approximately 75% operational with solver integration still in progress. Core educational features (CFD guidance, mesh quality, RDE analysis) work. Advanced heat transfer and multiphase solver integrations may be incomplete — check the project's GitHub issues for the latest status.
LD_LIBRARY_PATH errors when launching the binary
The dummy library path must come before the main lib path in LD_LIBRARY_PATH. Use the exact order: '/opt/openfoam12/platforms/linux64GccDPInt32Opt/lib/dummy:/opt/openfoam12/platforms/linux64GccDPInt32Opt/lib'. Add this to the env block in your MCP client configuration.
Frequently Asked Questions about OpenFOAM
What is OpenFOAM?
OpenFOAM is a Model Context Protocol (MCP) server that llm-powered openfoam mcp server for intelligent cfd education with socratic questioning and expert error resolution It connects AI assistants to external tools and data sources through a standardized interface.
How do I install OpenFOAM?
Follow the installation instructions on the OpenFOAM GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with OpenFOAM?
OpenFOAM works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is OpenFOAM free to use?
Yes, OpenFOAM is open source and available under the NOASSERTION license. You can use it freely in both personal and commercial projects.
OpenFOAM Alternatives — Similar Data Science & ML Servers
Looking for alternatives to OpenFOAM? Here are other popular data science & ml servers you can use with Claude, Cursor, and VS Code.
Ultrarag
★ 5.6kA Low-Code MCP Framework for Building Complex and Innovative RAG Pipelines
RocketRide
★ 3.1k📇 🏠 - MCP server that exposes RocketRide AI pipelines as t
Aix Db
★ 2.1kAix-DB 基于 LangChain/LangGraph 框架,结合 MCP Skills 多智能体协作架构,实现自然语言到数据洞察的端到端转换。
NeMo Data Designer
★ 1.9k🎨 NeMo Data Designer: Generate high-quality synthetic data from scratch or from seed data.
PaperBanana
★ 1.7kOpen source implementation and extension of Google Research’s PaperBanana for automated academic figures, diagrams, and research visuals, expanded to new domains like slide generation.
MiniMax
★ 1.5kBridges MiniMax AI capabilities to the Model Context Protocol, enabling AI agents to perform image understanding, text-to-image generation, and speech synthesis. It provides a standardized interface for accessing MiniMax's core tools via JSON-RPC.
Browse More Data Science & ML MCP Servers
Explore all data science & ml servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up OpenFOAM in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use OpenFOAM?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.