Are you the author? Sign in to claim
MCP server connecting Claude AI to ANSYS HFSS via PyAEDT for automated antenna design
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.
| Client | Supported |
|---|---|
| Claude Desktop | ✅ |
| Cursor | ✅ |
| Windsurf | ✅ |
| VS Code (Copilot) | ✅ |
| Any MCP-compatible client | ✅ |
| Tool | Description |
|---|---|
connect_to_hfss | Connect to a running AEDT/HFSS session via gRPC port |
check_connection | Check current connection status |
disconnect | Release the HFSS connection without closing the project |
| Tool | Description |
|---|---|
create_box | Create a rectangular box primitive |
create_cylinder | Create a cylinder primitive |
create_sphere | Create a sphere primitive |
| Tool | Description |
|---|---|
list_materials | List all materials in the active project |
assign_material | Assign a material to an existing geometry object |
| Tool | Description |
|---|---|
add_wave_port | Add a wave port excitation on a face |
add_lumped_port | Add a lumped port excitation on a face |
| Tool | Description |
|---|---|
create_solution_setup | Create an HFSS adaptive solution setup |
add_frequency_sweep | Add a frequency sweep to a solution setup |
| Tool | Description |
|---|---|
solve | Launch the HFSS solver |
get_solve_status | Check solved/unsolved status of all setups |
get_s_parameters | Retrieve S-parameter data for a solved sweep |
get_far_field | Retrieve far-field radiation pattern data |
| Tool | Description |
|---|---|
design_patch_antenna | Full coax-fed microstrip patch antenna at any frequency (Modal Network) |
design_dipole_antenna | Full center-fed half-wave dipole at any frequency (Terminal Network) |
create_438mhz_dipole | One-click 438 MHz half-wave dipole recreation |
| Tool | Description |
|---|---|
run_hfss_script | Execute arbitrary PyAEDT/Python code against the live HFSS session |
get_script_result | Poll the output of a background script job |
ansys-aedt-core or pyaedt)git clone https://github.com/NedaEmami123/hfss-mcp.git
cd hfss-mcp
python -m venv venv
venv\Scripts\activate # Windows
pip install ansys-aedt-core mcp
Find your client's config file and add the hfss-mcp server entry:
| Client | Config file location |
|---|---|
| Claude Desktop | %APPDATA%\Claude\claude_desktop_config.json |
| Cursor | %APPDATA%\Roaming\Cursor\User\globalStorage\cursor.mcp\mcp.json |
| Windsurf | %APPDATA%\Windsurf\User\globalStorage\codeium.windsurf\mcp_config.json |
| VS Code | .vscode/mcp.json in your workspace |
Add this block:
{
"mcpServers": {
"hfss-mcp": {
"command": "C:/path/to/hfss-mcp/venv/Scripts/python.exe",
"args": ["C:/path/to/hfss-mcp/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).
Open ANSYS Electronics Desktop. In the Message Manager, look for:
gRPC server started on port 50051
In your chat with Claude:
"Connect to HFSS on port 50051"
"Design a 2.4 GHz patch antenna"
Claude will:
"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.
Long workflows run in the background. Claude will give you a job_id and poll automatically:
"Get script result for job_1"
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 |
|---|---|---|
patch_w | 38 mm | Patch width (Pozar formula) |
patch_l | 29 mm | Patch length (Pozar formula) |
feed_offset | 9 mm | Coax feed inset from the radiating edge |
sub_h | 1.6 mm | FR4 substrate thickness |
sub_w / sub_l | 70 mm | Substrate & ground footprint |
coax_drop | 3 mm | Coax stub depth below ground |
probe_rad | 0.65 mm | Coax inner conductor radius / substrate clearance hole |
antipad_rad | 2 mm | Ground-plane anti-pad clearance (keeps probe from shorting to ground) |
coax_outer_rad | 2 mm | Coax dielectric outer radius |
airbox_pad | 31 mm | Airbox padding beyond the substrate edge |
Apache 2.0 — see LICENSE
Run Claude Code as an MCP server so any agent can delegate coding tasks to it
Browser automation using accessibility snapshots instead of screenshots
Google's universal MCP server supporting PostgreSQL, MySQL, MongoDB, Redis, and 10+ databases
Official GitHub integration for repos, issues, PRs, and CI/CD workflows