itasca-mcp
pfc3d>model new ;now, with LLM.
itasca-mcp connects AI agents to ITASCA PFC — Itasca's discrete element method (DEM) code — through the Model Context Protocol. Browse documentation, run simulations, and execute code, all through natural conversation.
pfc3d>model solve ;LLM solves.
Tools (10)
5 documentation tools — browse and search PFC commands, Python API, and reference docs. No bridge required.
5 execution tools — interactive REPL, task submission, progress monitoring, interruption, and history. Requires bridge.
First-time Setup
Prerequisites
- ITASCA PFC 6.0, 7.0, or 9.0 installed
- uv installed (for
uvx)
Agentic Setup (Recommended)
Copy this to your AI agent and let it self-configure:
Fetch and follow this bootstrap guide end-to-end:
https://raw.githubusercontent.com/yusong652/itasca-mcp/main/docs/agentic/itasca-mcp-bootstrap.md
Manual Setup
1. Register the MCP server in your client config:
{
"mcpServers": {
"itasca-mcp": {
"command": "uvx",
"args": ["itasca-mcp"]
}
}
}
2. Start the bridge from inside PFC:
Download addon.py, then use either of these two flows inside PFC:
- Copy the file contents into the PFC IPython console and run them
- Or download the file and execute it in PFC GUI
Verify
Restart your AI agent (Claude Code, Codex CLI, Gemini CLI, etc.) and ask it to call itasca_execute_code to verify the connection.
Daily Startup
Once first-time setup is done, each new PFC session only needs the bridge re-started — run this in PFC's IPython console and you're back online:
import itasca_mcp_bridge
itasca_mcp_bridge.start()
start() checks PyPI for a newer bridge release and self-upgrades before starting. The MCP client config persists.
Features
- Multi-version PFC support - command docs for PFC 6.0, 7.0, and 9.0 via the
versionparameter - Hierarchical documentation browsing - agents navigate the PFC command tree to discover capabilities and boundaries, reducing hallucinated commands
- Enhanced plot documentation - plot items reference docs supplementing the official documentation
- Interactive REPL - rapid iteration before committing to full scripts; agents can quickly test and refine code
- Task lifecycle management - submit long-running simulations, monitor progress, interrupt running tasks, and browse task history
- Multi-client compatible - works with Claude Code, Codex CLI, Gemini CLI, GitHub Copilot CLI, OpenCode, toyoura-nagisa, and other MCP clients
Troubleshooting
See Troubleshooting in the bootstrap guide.
Development
See Developer Guide: Install and Run from Source.
Contributing
PRs and issues are welcome! See the Developer Guide to get started.
License
MIT - see LICENSE.
Metadata
Release files for pfc-mcp 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pfc_mcp-0.5.1.tar.gz | 1.4 MB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pfc_mcp-0.5.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.4 MB
Release files / pfc_mcp-0.5.1.tar.gz
| Download URL | pfc_mcp-0.5.1.tar.gz |
|---|---|
| Size | 1.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9d460eeb40edbb1a5d34d10422420e58a2c90583d2675a1298738c2a74711325
|
|
BLAKE2b-256 checksum How to use checksums |
3855dddd6df5462c4bc590a802469d49417cf2492bc07ea8e8a1781cd298aeea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 27, 2026.
Transparency logRelease files / pfc_mcp-0.5.1-py3-none-any.whl
| Download URL | pfc_mcp-0.5.1-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2acfd88bff7a51bc34c84608cb1ed5d4a6c92d07e6dbf63a08422e93c14ef5a2
|
|
BLAKE2b-256 checksum How to use checksums |
ec2e77038469a1c566bcb2b81b5e3d56a5b3a2ff56d28981ae23b3f25c70b299
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 27, 2026.
Transparency logSecurity for pfc-mcp 0.5.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for pfc_mcp-0.5.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 27, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.