pfc-mcp (GitHub repository name yusong652/itasca-mcp) is an MCP (Model Context Protocol) server used to connect AI agents to ITASCA's geomechanics simulation software, including PFC, FLAC, 3DEC, MPoint, and MassFlow. It lets users browse documentation, run simulations, and execute code through natural conversation.
Main capabilities
- Documentation tools (5): browse and search the commands, Python API, and reference documentation of the selected engine, usable without a bridge. The documentation corpus covers multiple engines and multiple versions, including PFC 6.0/7.0/9.0, FLAC 7.0/9.0, and 3DEC 7.0/9.0, and can be selected via software and version parameters. The documentation agent can navigate the engine command tree to discover capabilities and boundaries, reducing hallucinated commands, and there is plotting-item reference documentation as a supplement to the official documentation.
- Execution tools (5): provide an interactive REPL, task submission, progress monitoring, interruption, and history, and require a bridge.
Featured functions
- Real-time REPL in parallel with running tasks: code can be executed while a simulation is running, inspecting model state and intermediate results without stopping the task, and it is also suitable for rapid iteration before writing a complete script.
- Task lifecycle management: submit long-running simulations, monitor progress, interrupt running tasks, and browse task history.
- GUI-aware operation: cells run in the engine's IPython panel, instructions entered at the prompt, plots and data files opened/closed/switched, items added to plots, and data files executed from the editor are all captured the next time the agent is invoked, so you can work in both the GUI and the agent at the same time.
- Agent-initiated bridge: the AI agent can start the bridge itself through the engine's console.exe.
- Multi-client compatibility: can be used with Claude Code, Codex CLI, Gemini CLI, GitHub Copilot CLI, OpenCode, toyoura-nagisa, and other MCP-compatible clients.
Example prompts
- "Perform a biaxial compression test on a dense specimen and plot the stress-strain curve"
- "Build a slope model in FLAC3D and determine the factor of safety"
- "Use 3DEC to model tunnel excavation in jointed rock mass and check block displacement around the opening"
- "Use MPoint Simulate landslide sliding and report the final deposition profile"
- "The simulation is still running; check the current unbalanced force without stopping it"
- "Look up the plotting commands in the documentation, then plot the contact force chain of the current model"
- "The command I just entered in the console seems incorrect; take a look"
First-time installation requirements
- One of the ITASCA engines is installed: PFC, FLAC, 3DEC, MPoint, or MassFlow. 9.0+ is recommended; PFC 6.0/7.0, FLAC 7.0, and 3DEC 7.0 are also supported.
- uv is installed (for uvx).
- An AI agent: Claude Code, Codex CLI, Gemini CLI, or any MCP-compatible client.
Installation steps (agent-assisted installation, recommended)
- Register the MCP server in the agent. Most agents register it with a single command, or the MCP configuration file can be filled in manually.
- Start the bridge inside the ITASCA engine: download addon.py, then in the engine GUI (PFC, FLAC, 3DEC, etc.) use either of the following procedures: copy the file contents into the engine's IPython console and run them; or download the file and execute it in the engine GUI.
- Restart the AI agent and ask it to call itasca_execute_code to verify the connection.
After the first-time installation is complete, each new engine session only requires restarting the bridge: run the corresponding command in the engine's IPython console to restore the connection. start() checks PyPI for a newer bridge version before starting and automatically upgrades. The MCP client configuration is retained.
For troubleshooting, see the Troubleshooting section in the getting-started guide; for installing and running from source, see Developer Guide: Install and Run from Source. PRs and issues are welcome; see CONTRIBUTING.md for where changes should land and the structure of the documentation corpus. The project is under the MIT license; see LICENSE for details.
Limitations: the original text does not provide complete registration commands, the contents of the MCP configuration file, the specific code in addon.py, the specific commands for restarting the bridge, and other details; this information is not currently provided.