ITASCA MCP Server

io.github.yusong652由 GitHub 账号 yusong652 发布v0.11.3更新于 Nov 3, 2026

用于ITASCA PFC、FLAC3D、3DEC、MPoint和MassFlow的MCP服务器:搜索文档、运行模拟、绘图。

AI 翻译由 AI 模型根据下方的原文描述翻译,可能有误。

原文描述

MCP server for ITASCA PFC, FLAC3D, 3DEC, MPoint and MassFlow: search docs, run simulations, plot.

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

概览

ITASCA 的本地 MCP 服务;无需登录;STDIO;7 个工具。

暂无 AI 概览:以下信息来自注册中心条目和服务本身。

安装

在 SourceWeft 中

  1. 打开 控制台中的 ITASCA MCP Server,将其添加到工作区。
  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, and on each call it sees the text you have selected in the editor and the files you are still editing, 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,提交 a3dedb7

工具

7

itasca_browse_doc

Itasca Browse Doc

Browse ITASCA documentation by path, like ls + cat over one documentation tree. source picks the tree: commands (Itasca command syntax and keywords), python_api (the itasca Python SDK), fish (FISH intrinsic functions: name, signature, which versions have it), reference (contact/constitutive/joint model properties, range elements, plot items). Each level lists what is below it, so start at the top of a tree when unsure and descend. Use itasca_query_doc when you only have keywords; its results are paths for this tool.

输入参数pathsource必填versionsoftware必填

itasca_query_doc

Itasca Query Doc

Search ITASCA documentation by keywords, like grep; every hit carries a path for itasca_browse_doc. Without source it searches commands, python_api, fish and reference together, so 'ball pos' shows the FISH intrinsic and the Python method side by side. With source it searches one tree and adds that tree's hints (available categories or namespaces, SDK fallback hints) when nothing matches.

输入参数limitquery必填sourceversionsoftware必填

itasca_execute_task

Itasca Execute Task

Submit a Python script file for asynchronous execution in the Itasca engine. Returns a task_id immediately; the script runs in the background. Companion tools manage the lifecycle: - itasca_check_task_status: poll output, progress, and final status - itasca_interrupt_task: cancel a running task - itasca_list_tasks: browse task history For synchronous, inline execution, use itasca_execute_code instead. While the task is cycling, itasca_execute_code shares the same __main__ namespace in the engine's main thread, so you can inspect or modify simulation state live — probe progress, tune parameters mid-run, swap callbacks, or trigger early termination via a sentinel variable. Submit with reasonable starting values and refine as the task runs. Console output from itasca.command() inside the script (table dumps, list output, command summaries) is captured into the task log alongside Python prints, visible through itasca_check_task_status. Script-writing rules: - Multi-line itasca.command("""...""") batches are normalized to one engine call per command, keeping the task interruptible mid-batch. Normalization recognizes itasca.command through its import name; call it through that name directly — rebinding via intermediate variables (`_it = itasca`) bypasses it and logs a bridge warning. - Pass each FISH definition block (`fish define` / `fish operator` / legacy bare `define`, through its terminating standalone `end`) whole, in ONE itasca.command() string; feeding one line-by-line leaves the engine blocked in interactive FISH mode until completed manually in the GUI console. Per-line loops are fine for ordinary commands. - `program call '<file>'` (.p3dat / .p2dat / .dat / ...) is supported: the bridge runs the file inline, one command per engine call, so the bridge stays reachable, the task stays interruptible, and the file's output lands in the task log command by command.

输入参数description必填entry_script必填

itasca_check_task_status

Itasca Check Task Status

Check status and paginated output for a submitted Itasca task. Output combines Python prints and Itasca console output from itasca.command() calls (table dumps, list output, command summaries) interleaved in execution order. Use skip_newest / limit to paginate, or filter to keep only matching lines.

输入参数limitfiltertask_id必填skip_newestwait_seconds

itasca_list_tasks

Itasca List Tasks

List tasks tracked by the bridge, newest first. Read-only. Each entry carries task_id, status (pending / running / completed / failed / interrupted), description, entry_script, start_time, end_time and elapsed_time; total_count gives the size of the full history for paging via skip_newest + limit. Task history is persisted in the engine working directory and survives GUI restarts. Use this to recover a task_id from an earlier session, to see what is running or recently finished, or as a cheap bridge-connectivity check. For a task's output and result use itasca_check_task_status; to submit a script use itasca_execute_task.

输入参数limitskip_newest

itasca_interrupt_task

Itasca Interrupt Task

Request interruption of a pending or running Itasca task. Returns as soon as the request is accepted; it does not wait for the task to stop. Confirm the stop and read the output produced so far with itasca_check_task_status. Only the script stops; the engine state is preserved, so you can inspect it with itasca_execute_code or continue from it with a new itasca_execute_task. Tasks already completed, failed or interrupted return an error. If the task_id is unknown, find it with itasca_list_tasks.

输入参数task_id必填

itasca_execute_code

Itasca Execute Code

Execute Python code synchronously in the running Itasca engine process. Returns stdout and an optional result variable immediately. Code runs in the engine's main thread, sharing the same __main__ namespace as any running task — side effects persist and are immediately visible to the task on its next cycle. The tool stays responsive while a task submitted via itasca_execute_task is cycling (calls interleave at cycle gaps), so use it as a live REPL — nothing has to be pre-scripted into the task up front. Typical uses: - Query model state and read Itasca command output: itasca.command('ball list') etc. — table dumps, list output, and command summaries are captured and interleaved with Python prints in execution order - Live inspection and tuning during a running task: check forces or contact statistics, modify parameters, swap callbacks, set sentinel variables the task reads each cycle - Create and export plots: itasca.command('plot ...') Environment: the engine's embedded Python interpreter (Itasca 9+ → Python 3.10, pre-9 → Python 3.6 or older; the product+version is encoded in sys.executable, e.g. PFC900). When unsure, check sys.version_info before relying on newer syntax. Code-writing rules (shared with itasca_execute_task): - Multi-line itasca.command("""...""") batches are normalized to one engine call per command, keeping the bridge reachable mid-batch. Normalization recognizes itasca.command through its import name; call it through that name directly — rebinding via intermediate variables (`_it = itasca`) bypasses it and the output carries a bridge warning. - Pass each FISH definition block (`fish define` / `fish operator` / legacy bare `define`, through its terminating standalone `end`) whole, in ONE itasca.command() string; feeding one line-by-line leaves the engine blocked in interactive FISH mode until completed manually in the GUI console. Per-line loops are fine for ordinary commands. - `program call '<file>'` (.p3dat / .

输入参数code必填timeout

版本历史

15
  1. v0.11.3最新Nov 3, 2026
  2. v0.11.2Nov 3, 2026
  3. v0.11.1Oct 31, 2026
  4. v0.10.7Oct 29, 2026
  5. v0.10.6Oct 24, 2026
  6. v0.10.5Oct 22, 2026
  7. v0.10.4Oct 20, 2026
  8. v0.10.3Oct 18, 2026
  9. v0.10.2Oct 5, 2026
  10. v0.10.1Sep 25, 2026
  11. v0.10.0Sep 23, 2026
  12. v0.9.0Sep 19, 2026
  13. v0.8.2Sep 17, 2026
  14. v0.8.1Sep 16, 2026
  15. v0.6.8Sep 16, 2026

评分

已满足适用检查项的 90%

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

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

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

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分