ANSYS HFSS MCP Server
Enables interaction with ANSYS HFSS via PyAEDT over gRPC, allowing users to connect to HFSS sessions, create and modify geometry, assign materials and excitations, configure solution setups and frequency sweeps, run simulations, check solve status, retrieve S-parameters and far-field results, and execute antenna design workflows or arbitrary PyAEDT/Python scripts.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ANSYS HFSS MCP ServerDesign a 2.4 GHz patch antenna and solve for S11"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ANSYS HFSS MCP Server
⚠️ Note: This repository contains an architectural demo. The complete proprietary algorithms (including parametric geometry generation, Pozar equations, and port alignment) are hidden in this public version. However, the core MCP protocol handling, state management, and async job scheduling architecture are fully functional. A Model Context Protocol (MCP) server that enables AI assistants to interact with ANSYS HFSS through natural language commands, powered by PyAEDT over gRPC.
Design antennas, assign boundaries, run simulations, and retrieve results — all by chatting with Claude.
Compatible Clients
Client | Supported |
Claude Desktop | ✅ |
Cursor | ✅ |
Windsurf | ✅ |
VS Code (Copilot) | ✅ |
Any MCP-compatible client | ✅ |
Related MCP server: hfss-agent-native
Capabilities
Connection Management
Tool | Description |
| Connect to a running AEDT/HFSS session via gRPC port |
| Check current connection status |
| Release the HFSS connection without closing the project |
Geometry
Tool | Description |
| Create a rectangular box primitive |
| Create a cylinder primitive |
| Create a sphere primitive |
Materials
Tool | Description |
| List all materials in the active project |
| Assign a material to an existing geometry object |
Excitations
Tool | Description |
| Add a wave port excitation on a face |
| Add a lumped port excitation on a face |
Solution Setup
Tool | Description |
| Create an HFSS adaptive solution setup |
| Add a frequency sweep to a solution setup |
Solve & Results
Tool | Description |
| Launch the HFSS solver |
| Check solved/unsolved status of all setups |
| Retrieve S-parameter data for a solved sweep |
| Retrieve far-field radiation pattern data |
Antenna Design Workflows
Tool | Description |
| Full coax-fed microstrip patch antenna at any frequency (Modal Network) |
| Full center-fed half-wave dipole at any frequency (Terminal Network) |
| One-click 438 MHz half-wave dipole recreation |
Scripting
Tool | Description |
| Execute arbitrary PyAEDT/Python code against the live HFSS session |
| Poll the output of a background script job |
Requirements
ANSYS Electronics Desktop (AEDT) 2023 R1 or later with HFSS
Python 3.10+
PyAEDT (
ansys-aedt-coreorpyaedt)
Installation
git clone https://github.com/scutdeng/mcp-server.git
cd mcp-server
python -m venv venv
venv\Scripts\activate # Windows
pip install .Configuration
Find your client's config file and add the mcp-server server entry:
Client | Config file location |
Claude Desktop |
|
Cursor |
|
Windsurf |
|
VS Code |
|
Add this block:
{
"mcpServers": {
"mcp-server": {
"command": "C:/path/to/mcp-server/venv/Scripts/python.exe",
"args": ["C:/path/to/mcp-server/hfss_mcp_server.py"],
"env": {
"ANSYSEM_ROOT261": "C:/Program Files/ANSYS Inc/v261/AnsysEM"
}
}
}
}Replace
v261with your installed AEDT version (e.g.v232,v241,v251).
Usage
1. Start HFSS and get the gRPC port
Open ANSYS Electronics Desktop. In the Message Manager, look for:
gRPC server started on port 500512. Connect Claude to HFSS
In your chat with Claude:
"Connect to HFSS on port 50051"
3. Design an antenna
"Design a 2.4 GHz patch antenna"
Claude will:
Create a new Modal Network design with all parameters as HFSS variables
Build geometry: Substrate, Airbox, Ground plane, Patch, Coax probe, Teflon dielectric
Assign boundaries: PerfE (ground & patch), coax shield, radiation boundary
Add a wave port with integration line
Create Setup1 (adaptive mesh) + frequency sweeps
Insert a 3D far-field sphere
Solve and generate S11, E-plane, H-plane, and 3D gain reports
"Design a 438 MHz dipole antenna"
Claude will build a center-fed half-wave dipole in free space with a Terminal Network solution, lumped port, and full radiation analysis.
4. Poll for results (long jobs)
Long workflows run in the background. Claude will give you a job_id and poll automatically:
"Get script result for job_1"
Antenna Design Parameters (Patch — 2.4 GHz, mirrors HFSSDesign22)
All parameters are created as HFSS design variables, and every geometry object is built from variable expressions (not baked floats), so the model is fully parametric — matching the "Type: Design" properties you'd see in the HFSS Properties panel — and you can sweep them:
Variable | Value | Description |
| 38 mm | Patch width (Pozar formula) |
| 29 mm | Patch length (Pozar formula) |
| 9 mm | Coax feed inset from the radiating edge |
| 1.6 mm | FR4 substrate thickness |
| 70 mm | Substrate & ground footprint |
| 3 mm | Coax stub depth below ground |
| 0.65 mm | Coax inner conductor radius / substrate clearance hole |
| 2 mm | Ground-plane anti-pad clearance (keeps probe from shorting to ground) |
| 2 mm | Coax dielectric outer radius |
| 31 mm | Airbox padding beyond the substrate edge |
License
Apache 2.0 — see LICENSE
This server cannot be deployed
Maintenance
Related MCP Connectors
Run FDS, OpenFOAM, CalculiX and other engineering simulations on cloudHPC from your AI assistant.
AI-callable calculators and engineering models with real formulas. No hallucinated math.
Create and manage AI agents that collaborate and solve problems through natural language interacti…
- OwlCADOAuthcom.owlcad
Parametric 3D CAD for AI agents: build print-ready parts, check them, export STL, 3MF or STEP.
Related MCP Servers
- AlicenseAqualityAmaintenanceEnables AI-assisted design of antennas and electromagnetic structures using openEMS FDTD simulation, with analytical dimension calculators and full-wave script generation.163AGPL 3.0
- AlicenseNot gradedqualityBmaintenanceEnables natural language control of HFSS (v2019-2025) for antenna modeling, simulation, and result extraction via win32com without PyAEDT.8MIT
- AlicenseCqualityBmaintenanceEnables engineers to convert antenna papers/diagrams and natural language specs into auditable, versionable HFSS Python modeling code, with optional simulation and parametric optimization.3022MIT
- AlicenseNot gradedqualityBmaintenanceEnables natural-language control of CST Studio Suite for electromagnetic simulation, covering modeling, materials, ports, solvers, result reading, and VBA scripting, with an embedded knowledge base and constraint hooks that self-evolve through use.8Apache 2.0