ITASCA MCP Server

io.github.yusong652Published by GitHub account yusong652v0.11.3Updated Nov 3, 2026

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

VerifiedSTDIODesktop onlyKnowledge & MemoryDeveloper Tools

Overview

ITASCA's local MCP server; no sign-in required; STDIO; 7 tools.

No AI overview yet: these facts come from the registry entry and the server itself.

Installation

In SourceWeft

  1. Open ITASCA MCP Server in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

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.

Source: README.md at commit a3dedb7

Tools

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.

Parameterspathsourcerequiredversionsoftwarerequired

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.

Parameterslimitqueryrequiredsourceversionsoftwarerequired

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.

Parametersdescriptionrequiredentry_scriptrequired

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.

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

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

Parameterstask_idrequired

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

Parameterscoderequiredtimeout

Version history

15
  1. v0.11.3LatestNov 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

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts
  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts