Skip to main content

PyAEDT-MCP

PyAnsys Python License: Apache%202.0 ruff

PyAEDT-MCP is an MCP (Model Context Protocol) server for Ansys Electronics Desktop (AEDT). It gives you reliable AEDT tools and a persistent PyAEDT-backed Python session for tasks that do not fit a dedicated tool.

What PyAEDT-MCP does

PyAEDT-MCP supports this runtime loop:

  1. Check whether AEDT is installed or already reachable.
  2. Launch AEDT or connect to an existing gRPC session.
  3. Open projects, create designs, run analyses, inspect the model, and export results.
  4. Use run_python_code or run_python_script for custom PyAEDT work.

Supported AEDT applications include HFSS, Maxwell 2D/3D, Q2D, Q3D, Icepak, Circuit, TwinBuilder, Mechanical, EMIT, RMXprt, and HFSS 3D Layout.

Install

Run without cloning

uvx --from git+https://github.com/ansys/pyaedt-mcp.git ansys-aedt-mcp

Install locally

pip install git+https://github.com/ansys/pyaedt-mcp.git

Or use uv:

uv pip install git+https://github.com/ansys/pyaedt-mcp.git

Install for development

git clone https://github.com/ansys/pyaedt-mcp.git
cd pyaedt-mcp
pip install -e .
pre-commit install

Or use uv:

git clone https://github.com/ansys/pyaedt-mcp.git
cd pyaedt-mcp
uv pip install -e .
pre-commit install

Requirements

  • Python 3.12 or later
  • AEDT 2022 R2 or later for gRPC workflows
  • A local AEDT installation or a reachable remote AEDT gRPC endpoint

Quick start

  1. Start AEDT in gRPC mode when connecting to an existing session:

    "C:\Program Files\ANSYS Inc\v261\AnsysEM\ansysedt.exe" -grpcsrv 50051
    

    Or, just launch AEDT normally. It automatically starts a gRPC server.

    PyAEDT-MCP can also launch AEDT for you if it is not already running.

  2. Start PyAEDT-MCP:

    ansys-aedt-mcp
    

    You can also use one of these common variants:

    # Connect on startup
    ansys-aedt-mcp --connect --machine localhost --port 50051
    
    # Expose HTTP transport instead of STDIO
    ansys-aedt-mcp --transport http --http-host 127.0.0.1 --http-port 8080
    
    # Register optional context helper tools
    ansys-aedt-mcp --include-context
    
    # Hide AEDT-only tools until a connection exists
    ansys-aedt-mcp --dynamic-tool-discovery
    
  3. Point an MCP client at the server:

    *Visual Studio Code

    {
      "mcp": {
        "servers": {
          "pyaedt-mcp": {
            "command": "uvx",
            "args": [
              "--index-strategy", "unsafe-best-match",
              "--from", "git+https://github.com/ansys/pyaedt-mcp.git",
              "ansys-aedt-mcp"
            ]
          }
        }
      }
    }
    

    Claude Desktop

    {
      "mcpServers": {
        "pyaedt-mcp": {
          "command": "uvx",
          "args": [
            "--from", "git+https://github.com/ansys/pyaedt-mcp.git",
            "ansys-aedt-mcp"
          ]
        }
      }
    }
    

Tool reference

For information on the available tools, see Tools and capabilities in the PyAEDT-MCP documentation.

How the repository is organized

The core package is in src\ansys\aedt\mcp:

File Role
__main__.py Module entry point that forwards to the CLI launcher
server.py CLI parsing, app setup, context creation, startup cleanup, and transport selection
tools.py Runtime tool implementations for AEDT lifecycle, project, scripting, and export workflows
helpers.py Small utilities for probing endpoints, normalizing versions, and extracting model data
prompts.py System prompt content shown to MCP clients
contexts.py Optional context helper tools enabled by --include-context
toolsets.py toolsets://definition resource used for logical tool discovery
aedt_helper\startup_code.py Startup code loaded into the persistent Python session

Other top-level folders include:

  • doc\source: Sphinx documentation
  • tests: Unit and integration coverage
  • docker: Container assets
  • examples: Sample assets used by the project

Development workflow

To contribute, see Contribute in the PyAEDT-MCP documentation.

Add a new tool

Most tools require a live AEDT connection. Tag those tools with REQUIRES_AEDT_TAG in src\ansys\aedt\mcp\tools.py so they can be hidden until the session exists when dynamic discovery is enabled.

For more information, see Add a new tool in the PyAEDT-MCP documentation.

License

Apache 2.0 license. See LICENSE.

Related projects

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ansys_aedt_mcp-0.1.4.tar.gz (46.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ansys_aedt_mcp-0.1.4-py3-none-any.whl (50.9 kB view details)

Uploaded Python 3

File details

Details for the file ansys_aedt_mcp-0.1.4.tar.gz.

File metadata

  • Download URL: ansys_aedt_mcp-0.1.4.tar.gz
  • Upload date:
  • Size: 46.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ansys_aedt_mcp-0.1.4.tar.gz
Algorithm Hash digest
SHA256 0ee7c9b199d5a0350411fd8fc50b4572e54c204855705c8042218726e4cc18cf
MD5 cfdef48c4de1025c6d871f2cb889b948
BLAKE2b-256 563441a6621f4e758911f29c0877ad7f40d433217a17bc3445c98ba941a420c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansys_aedt_mcp-0.1.4.tar.gz:

Publisher: ci.yml on ansys/pyaedt-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ansys_aedt_mcp-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: ansys_aedt_mcp-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 50.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ansys_aedt_mcp-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8110ef82054a33b040c4903f6e40ddaee1a78c94afc6572675b48b014943cd40
MD5 9c885e50338bd69c97ca77a721c4b3a9
BLAKE2b-256 5bb4ad805733ae6a71cf315d700676dc90c9d319631b46bcf4ace888a63dbc49

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansys_aedt_mcp-0.1.4-py3-none-any.whl:

Publisher: ci.yml on ansys/pyaedt-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page