vCFD
Voice-driven CFD MCP server that enables natural language setup, execution, and analysis of OpenFOAM simulations, with results exportable to ParaView.
README
vCFD
Voice-driven CFD: Grok Voice + MCP + OpenFOAM + ParaView.
Speak natural language commands; a Grok voice agent calls vCFD MCP tools that set up and run OpenFOAM cases, then summarize results and export data for ParaView on your Mac.
JARVIS for CFD (pragmatic edition): full-duplex speech → tool calls → async solvers → spoken engineering summaries. Not movie magic—solid async job handling and careful tool design.
Architecture
Human (speech)
↕ Speech-to-Speech
Grok Voice / Voice Agent Builder
↓ Remote MCP (HTTP/SSE + auth)
vCFD MCP Server (Python / FastMCP)
↓ subprocess or Docker
OpenFOAM cases & solvers
↓ foamToVTK / case zip
ParaView (Mac)
vCFD does not modify OpenFOAM. It launches OpenFOAM executables and edits case dictionaries. OpenFOAM remains a separate GPLv3 runtime (see NOTICE).
Quick start (Mac Silicon)
Requirements
- Python 3.12+ and uv
- Optional: Docker (for real OpenFOAM; mock mode works offline)
- Optional: ParaView (visualization)
- Grok Build for agentic development / local MCP
Install
git clone https://github.com/gpu7/vCFD.git
cd vCFD
uv sync
Run tests (mock OpenFOAM)
uv run pytest -q
Run MCP server (stdio)
export VCFD_OPENFOAM_MODE=mock # or docker | native
./scripts/dev_stdio.sh
Attach to Grok Build
grok mcp add vcfd -- uv run --directory /path/to/vCFD vcfd-mcp
Or configure in ~/.grok/config.toml:
[mcp_servers.vcfd]
command = "uv"
args = ["run", "--directory", "/path/to/vCFD", "vcfd-mcp"]
env = { VCFD_OPENFOAM_MODE = "mock" }
enabled = true
First case: Hagen–Poiseuille pipe
Through MCP tools (or voice):
create_case(name="pipe1", template="hagen_poiseuille")set_pipe_parameters(case_name="pipe1", radius=0.05, bulk_velocity=0.1)generate_mesh(case_name="pipe1")→check_mesh(...)start_solver(case_name="pipe1")→get_job_status(job_id=...)summarize_results/compare_to_analyticalexport_for_paraview→ open zip/VTK in ParaView
OpenFOAM modes
| Mode | Env | Use when |
|---|---|---|
mock |
VCFD_OPENFOAM_MODE=mock |
Unit tests, no OF install |
docker |
VCFD_OPENFOAM_MODE=docker |
Mac or EC2 with Docker |
native |
VCFD_OPENFOAM_MODE=native |
Ubuntu with OF packages |
See .env.example for all settings.
Voice agent (Grok Voice Agent Builder)
- Deploy public MCP (EC2:
./deploy/aws/launch-ec2.sh). - Follow
prompts/voice_agent_builder.md— console steps + MCP fields. - System prompt:
prompts/voice_agent_system.md. - Code / paste helpers:
voice/session.example.json,scripts/voice_session_snippet.py --from-latest.
./deploy/aws/launch-ec2.sh
uv run python scripts/voice_session_snippet.py --from-latest
# Paste URL + Bearer token into Voice Agent Builder remote MCP
AWS EC2
Automated launch scripts (AWS CLI on your Mac):
./deploy/aws/launch-ec2.sh --dry-run # plan only
./deploy/aws/launch-ec2.sh # launch Ubuntu + Docker + Caddy + MCP
./deploy/aws/status.sh
./deploy/aws/teardown.sh
Details: deploy/aws/README.md.
Project layout
src/vcfd/ # MCP server, OpenFOAM runner, analytics
cases/templates/ # OpenFOAM case templates (not OF source)
tests/ # pytest
deploy/ # Docker, systemd, AWS notes
prompts/ # Voice agent system prompt
scripts/ # dev helpers
License
- vCFD code: MIT
- OpenFOAM: GPLv3 (external dependency — not distributed as part of this repo’s source)
You may charge for applications or services built with vCFD as an external controller of OpenFOAM. Do not link or redistribute modified OpenFOAM without complying with GPLv3.
Status
- Mock OpenFOAM pipeline: tested (
uv run pytest) - Real OpenFOAM via Docker (
opencfd/openfoam-default:2506, arm64-capable): mesh +simpleFoam+ ParaView export verified on Mac Silicon - Grok Build project MCP:
.grok/config.toml(grok mcp list) - Next: Voice Agent Builder / remote HTTP MCP on EC2, richer field sampling, more templates
Docker end-to-end
# Requires Docker Desktop running and image pull once:
docker pull opencfd/openfoam-default:2506
./scripts/e2e_docker.sh
Results land under cases/workspace/ (gitignored). Open the .foam or VTK/ export in ParaView.
Grok Build MCP
Project config is already set (docker mode):
grok mcp list
# tools available after restart / new session in this directory
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.