
PFC - ITASCA Discrete Element Simulation
io.github.yusong652由 GitHub 账号 yusong652 发布v0.2.5更新于 Oct 28, 2026
Give AI agents full access to ITASCA PFC - documentation, simulation, and plot capture.
概览
把 AI 助手接入 ITASCA 岩土力学模拟软件(PFC、FLAC、3DEC、MPoint、MassFlow),可查阅文档、运行模拟并执行代码。
- 可以做什么
- 浏览并搜索各引擎、各版本的命令、Python API 与参考文档
- 在交互式 REPL 中执行代码,模拟运行期间也可使用
- 提交长时间模拟任务、监控进度、中断任务并查看任务历史
- 获取 GUI 中的操作,例如已运行的单元格、命令行输入以及打开的图表或数据文件
- 适用场景
- 适合已在使用 ITASCA 岩土力学引擎、希望由助手查询命令、编写并运行模拟脚本,或在不中断运行中模型的情况下查看进度的场景。
- 运行要求
- 本机需安装 ITASCA 引擎(PFC、FLAC、3DEC、MPoint 或 MassFlow,建议 9.0 以上,部分旧版本亦支持)、用于 uvx 的 uv,以及支持 MCP 的客户端。需在引擎的 IPython 控制台中启动桥接插件;桥接启动时会检查 PyPI 并自动升级。
安装
在 SourceWeft 中
- 打开 控制台中的 PFC - ITASCA Discrete Element Simulation,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
itasca-mcp
[CI] [PyPI] [Downloads] [GitHub stars] [License: MIT] [Python 3.10+]
itasca>model new ;now, with LLM.
itasca-mcp connects AI agents to ITASCA's geomechanics simulation software — PFC, FLAC, 3DEC, MPoint, and MassFlow — through the Model Context Protocol. Browse documentation, run simulations, and execute code, all through natural conversation.
itasca>model solve ;LLM solves.
Tools (7)
2 documentation tools — browse by path and search by keywords across the selected engine's commands, Python API, FISH intrinsics, and reference docs. No bridge required.
5 execution tools — interactive REPL, task submission, progress monitoring, interruption, and history. Requires bridge.
Example Prompts
- "Run a biaxial compression test on a dense specimen and plot the stress–strain curve"
- "Build a slope model in FLAC3D and find the factor of safety"
- "Model a tunnel excavation in jointed rock with 3DEC and check block displacements around the opening"
- "Simulate a landslide runout with MPoint and report the final deposit profile"
- "The simulation is still running, check the current unbalanced force without stopping it"
- "Look up the
plotcommands in the docs, then plot the contact force chains of the current model" - "The command I just typed in the console doesn't seem right, take a look"
First-time Setup
Prerequisites
- An ITASCA engine installed — PFC, FLAC, 3DEC, MPoint, or MassFlow. 9.0+ recommended; PFC 6.0 / 7.0, FLAC 7.0, and 3DEC 7.0 are also supported.
- uv installed (for
uvx) - An AI agent — Claude Code, Codex CLI, Gemini CLI, or any MCP-capable client
Agentic Setup (Recommended)
Copy this to your AI agent and let it self-configure:
Manual Setup
1. Register the MCP server with your agent.
Most agents register it with a single command:
Or fill in the MCP config file manually:
2. Start the bridge from inside the ITASCA engine:
Download addon.py, then use either of these two flows inside the engine GUI (PFC, FLAC, 3DEC, ...):
- Copy the file contents into the engine's IPython console and run them
- Or download the file and execute it in the engine GUI
Verify
Restart your AI agent and ask it to call itasca_execute_code to verify the connection.
Daily Startup
Once first-time setup is done, each new engine session only needs the bridge re-started — run this in the engine's IPython console and you're back online:
start() checks PyPI for a newer bridge release and self-upgrades before starting. The MCP client config persists.
Features
- Multi-engine, multi-version corpus - command, Python API, and reference docs for PFC, FLAC, 3DEC, MPoint, and MassFlow across engine versions (PFC: 6.0/7.0/9.0, FLAC: 7.0/9.0, 3DEC: 7.0/9.0), selected via the
softwareandversionparameters - Documentation agents can navigate - agents browse the engine command tree to discover capabilities and boundaries, reducing hallucinated commands, with plot item reference docs supplementing the official documentation
- Live REPL alongside running tasks - execute code while a simulation is running: check model state and intermediate results without stopping the task; also useful for quick iteration before writing a full script
- Task lifecycle management - submit long-running simulations, monitor progress, interrupt running tasks, and browse task history
- Sees what you do in the GUI - cells you run in the engine's IPython pane, commands you enter at its prompt, the plots and data files you open, close or switch to, the items you add to a plot, the data files you execute from the editor, and the edits you save to a data file (as a diff) all reach the agent on its next call, so you can work in the GUI and with the agent at the same time
- Works inside your project - the scripts and data files the agent runs appear in the Project pane's Data Files, and a file it changes while you have it open in the editor is reloaded right away
- Agent-started bridge - an AI agent can start the bridge itself through the engine's
console.exe - 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.
[itasca-mcp MCP server]Contributing
PRs and issues are welcome! See CONTRIBUTING.md for where changes land and how the documentation corpus is structured, and the Developer Guide for the source install.
License
MIT - see LICENSE.
来源:README.md,提交 9f3b633
工具
0版本历史
1- v0.2.5最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分