Lanes#
By default, each MCP client starts its own PyAEDT-MCP server, which owns at most one AEDT session. Lanes mode lets several MCP clients (for example VS Code, Claude, and a terminal agent) share AEDT sessions, or run isolated AEDT sessions side by side, from one machine.
Lanes mode is opt-in. It is enabled only by the --lanes argument. Without it,
PyAEDT-MCP behaves exactly as described in the rest of this guide.
How it works#
A lane is a long-lived PyAEDT-MCP backend served over HTTP on
127.0.0.1. It owns at most one AEDT session.ansys-aedt-mcp --lanesstarts a small stdio routing proxy in each MCP client. It exposes every regular PyAEDT-MCP tool plus lane management tools, and forwards each AEDT tool call to the lane the client has selected.Lanes are recorded in a per-user registry, so every client on the machine sees the same lanes. Lanes survive client restarts.
No lane is spawned or selected at startup. The assistant calls
list_lanesand thenswitch_laneorspawn_lanebefore using AEDT.
Security#
Each lane is protected by a random bearer token, generated at spawn time and stored in the per-user registry. Requests without the token are rejected with HTTP 401.
The token is removed from the backend environment before AEDT starts, so child processes never inherit it, and it is never returned by tools or the
statuscommand.Lanes bind to
127.0.0.1by default.
Configure your MCP client#
Add --lanes to the arguments of the regular stdio configuration. For
example, in VS Code (.vscode/mcp.json):
{
"servers": {
"pyaedt-lanes": {
"type": "stdio",
"command": "uvx",
"args": [
"--index-strategy", "unsafe-best-match",
"--from", "git+https://github.com/ansys/pyaedt-mcp.git",
"ansys-aedt-mcp", "--lanes"
]
}
}
}
Arguments after -- are forwarded to every lane backend, for example
["--lanes", "--", "--graphical", "--include-context"].
Proxy options#
--http-host HOSTHost that lane backends bind to. The default is
127.0.0.1.--startup-timeout SECONDSSeconds a new lane gets to open its port. The default is
60.--probe-timeout SECONDSSeconds a lane gets to answer a status probe before it is reported as unresponsive.
--handshake-timeout SECONDSSeconds a lane gets to answer the MCP handshake. A busy lane is reported as busy, and the call is not sent.
--aedt-version {latest,pyaedt,VERSION}Default AEDT version used by lane backends: the newest installed version (
latest, the default), the PyAEDT default (pyaedt), or a version such as2026.1. Also read fromANSYS_AEDT_MCP_LANE_AEDT_VERSION.
--dynamic-tool-discovery cannot be forwarded to lanes. The proxy opens an
MCP session for each call, so AEDT-only tools would never be advertised.
--transport, --http-host, and --http-port are set by the proxy for
each lane and cannot be forwarded either.
Lane management tools#
These tools belong to the lanes toolset in toolsets://definition.
Tool |
Purpose |
|---|---|
|
List registered lanes with their health and AEDT session. |
|
Show the selected lane and any call in flight. |
|
Create a new lane and, by default, select it. It fails if the
name is already registered. It does not launch AEDT. Call |
|
Select the lane that subsequent AEDT tool calls go to. |
|
Shut down a lane backend. |
|
Diagnose a lane: listening, authentication, responsiveness, and AEDT state. |
|
Restart a lane backend and reattach it to the same AEDT session without closing AEDT. |
|
Re-read the AEDT gRPC port that a lane is attached to. |
|
Drop registry entries whose backend is no longer running. |
|
Clear the registry and optionally stop the lane processes. |
|
Delete a stale registry lock file. |
A typical session looks like this:
list_lanes() # reuse an existing lane with switch_lane("<name>")
spawn_lane("patch-antenna") # or create a lane and route to it
launch_aedt(...) # runs inside the patch-antenna lane
... # any AEDT tool, as usual
stop_lane("patch-antenna") # when the work is finished
Name lanes after the work, like git branches (patch-antenna,
filter-tuning), rather than default or a port number.
Recovery commands#
These commands work even when no MCP client is running:
ansys-aedt-mcp --lanes status [--json] # registered lanes and their health
ansys-aedt-mcp --lanes stop LANE [--timeout 10] # stop one lane and unregister it
ansys-aedt-mcp --lanes reap # drop dead lanes
ansys-aedt-mcp --lanes reset [--kill] [--unlock] [--yes]
ansys-aedt-mcp --lanes unlock # delete a stale lock file
ansys-aedt-mcp --lanes dashboard [--port 8765] [--refresh 30] [--no-browser]
The dashboard is a read-only local web page served on 127.0.0.1. It shows
whether each lane is up, busy, or degraded. It also shows the AEDT port and
recent log activity of each lane. It never opens an MCP session, so it cannot block a busy
lane.
State and logs#
The registry, its lock file, and one lane-<port>.log per lane are stored in
the per-user state directory:
Windows:
%LOCALAPPDATA%\ansys-aedt-mcpLinux:
$XDG_STATE_HOME/ansys-aedt-mcp, or~/.local/state/ansys-aedt-mcp