{
  "markdown": "<div align=\"center\">\n\n# PLAXIS **·** MCP\n\n### Drive PLAXIS 2D from any MCP client.\n\nGeometry, staged construction, meshing, calculation and results —\nexposed as tools, over a hardened Windows-local stdio server.\n\n<br>\n\n[![release](https://img.shields.io/badge/release-v0.3.5-00E5A0?style=flat-square&labelColor=0D1117)](https://github.com/yixuanzhong/PLAXIS-MCP/releases)\n[![python](https://img.shields.io/badge/host-CPython%203.13-3776AB?style=flat-square&logo=python&logoColor=white&labelColor=0D1117)](#requirements)\n[![mcp](https://img.shields.io/badge/MCP-1.26.0-5A45FF?style=flat-square&labelColor=0D1117)](https://github.com/modelcontextprotocol/python-sdk)\n[![transport](https://img.shields.io/badge/transport-stdio-8B949E?style=flat-square&labelColor=0D1117)](#security-model)\n[![platform](https://img.shields.io/badge/platform-Windows-0078D4?style=flat-square&logo=windows&logoColor=white&labelColor=0D1117)](#requirements)\n[![tools](https://img.shields.io/badge/tools-34%20input%20%C2%B7%2011%20output-00E5A0?style=flat-square&labelColor=0D1117)](#tools)\n[![license](https://img.shields.io/badge/license-MIT-C9D1D9?style=flat-square&labelColor=0D1117)](LICENSE)\n\n**[Quickstart](#quickstart)** · **[Tools](#tools)** · **[Clients](#clients)** · **[Security model](#security-model)** · **[Architecture](#architecture)**\n\n`mcp-name: io.github.yixuanzhong/plaxis-mcp`\n\n</div>\n\n---\n\n## ▸ v0.3 — set up once, launch from anywhere\n\n| | |\n| --- | --- |\n| **One-shot machine setup** | `plaxis-mcp setup` discovers the PLAXIS installation, writes both role profiles, and stores each role password in Windows Credential Manager — with hidden prompts, no password argument. |\n| **Shared profile store** | Every client on the machine reads the same profiles. Claude Code, Codex, Cursor and VS Code all bind to one installation and one credential set. |\n| **`serve --role`** | No per-client config surgery. `--role input` / `--role output` resolves its own profile. |\n| **Mode-aware operations** | `generate_mesh`, `create_phase` and `calculate` enter the PLAXIS mode they need, so a workflow never has to interleave `set_mode` calls. |\n| **Listed on the MCP Registry** | Published as `io.github.yixuanzhong/plaxis-mcp`, installable with `uvx`. |\n\nClient-neutral by design: Codex, Claude Code, Cursor, VS Code/Copilot and any other\nconforming local stdio MCP client connect to the same **unprefixed** server tools.\n\n---\n\n## Quickstart\n\n**1 — Set up the machine, once.**\n\n```powershell\nplaxis-mcp.exe setup\n```\n\nProfiles land in `%LOCALAPPDATA%\\Caros\\PLAXIS-MCP\\profiles` (override with `--profile-dir`).\nAdd `--skip-credentials` to generate profiles now and store passwords later with\n`plaxis-mcp.exe credentials set --profile <profile.toml>`.\n\n> The directory name is historical — it is where the first supported installer wrote —\n> and is kept because `credential_target` is derived from it.\n\n**2 — Run each role as its own process.**\n\n```powershell\nplaxis-mcp.exe serve --role input\nplaxis-mcp.exe serve --role output\n```\n\n`--config <profile.toml>` names a profile explicitly and is equivalent. Either way `serve`\ntakes every endpoint setting from the profile and the password from Windows Credential\nManager, and it **fails to start** if any `PLAXIS_*` endpoint environment override is\npresent — so a client cannot silently redirect an endpoint or inject a password.\n\n**3 — Point a client at it.** See [Clients](#clients); the host never connects at startup,\nso call the `connect` tool once PLAXIS is running.\n\n### Getting the host\n\n| Distribution | Command | Assurances |\n| --- | --- | --- |\n| **Signed Windows package** | `plaxis-mcp.exe` | Authenticode-signed, hash-manifested, installer-verified. **The supported production deployment.** |\n| **PyPI** | `uvx plaxis-mcp serve --role input`<br>`py -3.13 -m pip install plaxis-mcp` | Ordinary Python source distribution. **No** code signature, **no** artifact manifest. |\n\nBoth expose the same `setup`, `serve`, `credentials` and `profiles` commands and enforce the\nsame profile binding and environment-override rejection — so PyPI is not a weaker *runtime*\nposture. It simply carries no supply-chain attestation of its own beyond PyPI's, and it is not\nwhat an organization requiring signed binaries should deploy.\n\nDo not install `plxscripting` into the host environment under either.\n\n<details>\n<summary><b>Source / developer launch only</b> — not a supported deployment path</summary>\n\n<br>\n\nA clean CPython 3.13 environment can run the module directly with endpoint environment\nvariables. This path carries the password in the environment and performs **no** installation\nbinding.\n\n```powershell\npy -3.13 -m pip install .\n$env:PLAXIS_ROLE = \"input\"\n$env:PLAXIS_INPUT_HOST = \"127.0.0.1\"\n$env:PLAXIS_INPUT_PORT = \"10000\"\n$env:PLAXIS_BUNDLE_PYTHON = \"C:\\Path\\To\\PLAXIS\\python.exe\"\npy -3.13 -I -u -m plaxis_mcp.server\n```\n\nFor Output, set `PLAXIS_ROLE=output` and use the `PLAXIS_OUTPUT_*` variables. Role-specific\nvariables take precedence over the deprecated generic `PLAXIS_HOST`, `PLAXIS_PORT` and\n`PLAXIS_PASSWORD` fallback. The server accepts stdio only — do not set a non-stdio\n`PLAXIS_MCP_TRANSPORT`.\n\n</details>\n\n---\n\n## Tools\n\nEach process has **one immutable role**. A client registers Input and Output as separate MCP\nservers when it needs both.\n\n| Role | Endpoint | Tools |\n| --- | --- | --- |\n| **Both** | — | `connect` · `disconnect` · `connection_status` · `list_members` · `inspect` · `project_info` · `list_phases` · `list_materials` |\n| **Input** | `127.0.0.1:10000` | `list_objects` · `model_state` · `set_property` · `call_method` · `new_project` · `open_project` · `close_project` · `recover_project` · `save_project` · `create_phase` · `set_current_phase` · `set_phase_property` · `activate` · `deactivate` · `calculate` · `view_results` · `set_mode` · `generate_mesh` · `create_point` · `create_line` · `create_polygon` · `create_borehole` · `create_soillayer` · `create_material` · `assign_material` · `create_structural_element` |\n| **Output** | `127.0.0.1:10001` | `list_result_types` · `get_results` · `get_single_result` |\n\n**34 Input tools · 11 Output tools.**\n\n- `connect()` takes no endpoint or credential arguments. It uses only the pinned role\n  configuration, so an agent cannot redirect a stored password to an arbitrary host.\n- Role status resources live at `plaxis://input/status` and `plaxis://output/status`.\n- `get_results(phase, result_type_path, fem_type=\"node\", offset=0, limit=200)` paginates\n  losslessly. `limit` is 1–5,000; responses report `count`, `offset`, `limit`,\n  `returned_count`, `has_more`, `next_offset` and `results`.\n- Every object in a result carries `path` — the exact string to pass back to any reference\n  parameter. `list_objects(kind)` lists a whole kind that way, with a geometry summary\n  (coordinates, or a parsed `bounds` for objects that report a bounding box).\n- `model_state()` reports mesh status, the phase table and unassigned materials before a\n  calculate is attempted. It separates `blocking` (a fault in this model) from `unknown` (a\n  check that could not run here) and `caveats` (something PLAXIS does not expose at all — on\n  2D V22, whether the mesh still matches the geometry), so an empty `blocking` is never\n  mistaken for a clean bill of health.\n- Results live on the Output server, which reads whatever the PLAXIS Output application has\n  open. `view_results(phase)` on the Input server is what puts a calculated phase there.\n- When PLAXIS rejects a call, its own message travels beside ours in `plaxis_message`\n  (sanitised: no filesystem paths, no frames, capped with the truncation flagged out of band).\n  A failing `calculate` also carries a per-phase table in `details`.\n\n---\n\n## Clients\n\nAll shipped examples are secret-free and use two server entries, one per role. Replace the\ncommand with wherever `plaxis-mcp.exe` lives, or with `uvx plaxis-mcp` for a PyPI install.\nNothing else needs editing — `--role` finds the shared profiles by itself.\n\n| Client | Example | Credentials & approvals |\n| --- | --- | --- |\n| **Codex** | [`codex-config.toml`](examples/codex-config.toml) | `env_vars` forwards the locally stored password; `default_tools_approval_mode = \"writes\"`. |\n| **Claude Code** | [`claude-code-mcp.json`](examples/claude-code-mcp.json) | Expand only a user-level environment variable in `.mcp.json`; retain server trust and tool approval prompts. |\n| **Cursor** | [`cursor-mcp.json`](examples/cursor-mcp.json) | Role password in the user environment at launch; keep Auto-run **off**. |\n| **VS Code / Copilot** | [`vscode-mcp.json`](examples/vscode-mcp.json) | Use a password `inputs` entry — VS Code stores it securely for reuse. Keep Default Approvals, not Bypass or Autopilot. |\n\nThe generic [`mcp-client-config.json`](examples/mcp-client-config.json) is a minimal\n`mcpServers` example for clients using that conventional JSON shape.\n\n> **Never** add a PLAXIS password to version control, command-line arguments, logs, or a\n> profile file.\n\n---\n\n## Security model\n\n- **Profiles are bound to one installation.** `credential_target` is derived from\n  `installation_root`, and `worker_python` must be an interpreter that discovery links to\n  that same root. Editing any of the three by hand makes the profile fail to load. This is\n  what stops a profile from handing a stored PLAXIS password to an arbitrary executable.\n- **Environment overrides are rejected**, not merged: `serve` refuses to start when a\n  `PLAXIS_*` endpoint variable is set.\n- **Uncertified pairings fail closed.** The Python match is exact — a 3.7-series interpreter\n  at any other patch level is a different, uncertified ABI, so it is rejected rather than\n  assumed compatible.\n- **Ask before mutation.** All clients should prompt before `call_method` and project/file\n  mutators. Do not set an Always Allow-style rule for `call_method`, `open_project` or\n  `save_project`: client approval is generally tool-wide, not argument-scoped.\n- **Mutation is not undoable.** Absolute local and UNC `.p2dx` paths reachable by PLAXIS are\n  allowed only after user approval. Client approvals and client-side checkpointing cannot\n  restore in-memory PLAXIS state — use disposable projects and backups for all mutation\n  testing.\n\n---\n\n## Architecture\n\nPLAXIS-MCP separates the MCP host from PLAXIS's vendor-managed Python runtime:\n\n```\n  MCP client  ──stdio──▶  host (CPython 3.13, mcp 1.26.0)\n                              │\n                              ├─ private local pipe\n                              ▼\n                          role-pinned worker (PLAXIS bundled Python)\n                              │\n                              ▼\n                          PLAXIS Remote Scripting @ 127.0.0.1\n```\n\n- Client traffic is always MCP over stdio; normal logs and diagnostics go to stderr.\n- PLAXIS-MCP **never** installs packages into, upgrades, or redistributes the PLAXIS Python\n  bundle.\n\nThe split is required because the MCP host needs a current Python runtime while PLAXIS ships\nversion-specific scripting environments.\n\n| PLAXIS generation | Bundled Python | Runtime profile | Release status |\n| --- | --- | --- | --- |\n| PLAXIS 2024.2 and newer | 3.12.3 | `current-312` | Enable after live certification |\n| PLAXIS CONNECT Edition V22 → early 2024 | 3.8.10 | `legacy-38` | **Initial production target** |\n| PLAXIS CONNECT Edition V20 / V21 | 3.7.4 | `legacy-37` | Enable after live *and* security certification |\n\nV20 and V21 share the legacy profile: their end-of-life Python is isolated inside the loopback\nworker and requires organizational security acceptance.\n\n### Requirements\n\n- Windows, with a supported local PLAXIS 2D installation and Remote Scripting enabled.\n- CPython 3.13 for the MCP host. Supported host range: `>=3.13,<3.14`.\n- One PLAXIS Input and/or Output server listening **only** on loopback — defaults\n  Input `127.0.0.1:10000`, Output `127.0.0.1:10001`.\n- A selected, certified PLAXIS bundled-Python profile. Do not install `plxscripting` into the\n  MCP host environment.\n\n<details>\n<summary>Historical PLAXIS scripting paths — worker-only, never on the host <code>PYTHONPATH</code></summary>\n\n<br>\n\n```\nC:\\ProgramData\\Seequent\\PLAXIS Python Distribution V2\\python\\Lib\\site-packages\nC:\\ProgramData\\Bentley\\Geotechnical\\PLAXIS Python Distribution V2\\python\\Lib\\site-packages\n```\n\n</details>\n\nDocker, WSL, remote MCP transports, and PLAXIS bundles copied into a Python environment are\n**not** supported deployment paths for v0.3. The former Docker artifacts were removed\nintentionally.\n\n---\n\n## Development & verification\n\n```powershell\n# unit suite, from the CPython 3.13 host environment\npy -3.13 -m unittest discover -s tests\n\n# inspect the split host/worker configuration without starting PLAXIS\npy -3.13 scripts/smoke_test.py\n```\n\nBefore a release: verify the host wheel/installer in a clean environment, confirm `pip check`,\nscan the artifact for vendor files, validate the MCP contract at protocol `2025-03-26`, and\ncomplete live certification with a disposable calculated project for **every** enabled PLAXIS\nprofile.\n\n---\n\n## References\n\n[MCP Python SDK](https://github.com/modelcontextprotocol/python-sdk) ·\n[Codex](https://learn.chatgpt.com/docs/extend/mcp) ·\n[Claude Code](https://code.claude.com/docs/en/mcp) ·\n[Cursor](https://docs.cursor.com/context/model-context-protocol) ·\n[VS Code](https://code.visualstudio.com/docs/agents/reference/mcp-configuration)\n\n---\n\n<div align=\"center\">\n\nMIT licensed. PLAXIS is a trademark of Seequent and related companies.\n\nThis independent integration is not affiliated with, endorsed by, or sponsored by\nSeequent or Bentley Systems.\n\n</div>\n",
  "bytes": 13644,
  "sha": "6eebca820f54b1439b591fa00d7b540a7c7d34e8d3da0e6f3e22d7e820011799",
  "repo_slug": "yixuanzhong/plaxis-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_yixuanzhong_plaxis_mcp_c33b4d41/readme"
}