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.

已验证STDIO仅桌面知识与记忆开发者工具

概览

AI 生成的概览

把 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 并自动升级。
安装前请注意
执行类工具会在你授权的引擎中运行代码和提交模拟,可能改动或删除模型数据并消耗计算资源。桥接在启动时会从 PyPI 自动升级并运行新代码。GUI 中的操作(包括命令和打开的文件)会传给助手。

安装

在 SourceWeft 中

  1. 打开 控制台中的 PFC - ITASCA Discrete Element Simulation,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

[itasca-mcp]

itasca-mcp

English | 简体中文

[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.

[itasca-mcp demo]

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 plot commands 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:

text
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 with your agent.

Most agents register it with a single command:

bash
# Claude Codeclaude mcp add itasca-mcp -- uvx itasca-mcp
# Codex / Codex-clicodex mcp add itasca-mcp -- uvx itasca-mcp
# Gemini CLIgemini mcp add itasca-mcp uvx itasca-mcp

Or fill in the MCP config file manually:

json
{  "mcpServers": {    "itasca-mcp": {      "command": "uvx",      "args": ["itasca-mcp"]    }  }}

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
[addon.py demo]

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:

python
import itasca_mcp_bridgeitasca_mcp_bridge.start()

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 software and version parameters
  • 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
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.2.5最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分