Mechanical MCP Server
Enables natural language interaction with ANSYS Mechanical simulation software via gRPC, allowing users to manage geometry, mesh, boundary conditions, solve analyses, and generate reports through MCP-compatible AI clients.
README
ANSYS Mechanical MCP Server
A Model Context Protocol (MCP) server that connects any MCP-compatible AI client to ANSYS Mechanical via PyMechanical gRPC. Talk to your simulation in plain English.
https://github.com/user-attachments/assets/309952dc-dce0-4aa6-9b06-e8047f32c2de
Compatible clients
Works with any MCP-compatible client, including:
- Claude Desktop
- Cursor
- Windsurf
- VS Code (with Copilot MCP support)
- Continue
What it does
| Category | Capabilities |
|---|---|
| Connection | Connect to one or more running Mechanical instances by port |
| Geometry | List bodies, assign materials, suppress/unsuppress bodies |
| Mesh | Set element size, generate mesh, get statistics |
| Boundary Conditions | Fixed support, displacement, remote displacement, frictionless support, force, remote force, pressure, moment, gravity |
| Solve & Results | Solve, get status, modal frequencies, equivalent stress, directional deformation, principal stress, stress tool, reaction force |
| Point Mass | Convert a Part to a combined Point Mass (no extensions required), auto-create attachment Named Selection |
| Named Selections | List, delete |
| Reports | Generate DOCX or TXT simulation reports |
| Scripting | Run arbitrary IronPython directly in the Mechanical ACT API |
Requirements
- ANSYS Mechanical 2023 R1 or later (with gRPC enabled)
- Python 3.10+
Installation
git clone https://github.com/codersag/mechanical-mcp.git
cd mechanical-mcp
pip install -e .
To include DOCX report generation:
pip install -e ".[report]"
MCP Client Configuration
Add the following to your MCP client's config file. The config file location varies by client:
| Client | Config file location |
|---|---|
| Claude Desktop (Windows) | %APPDATA%\Claude\claude_desktop_config.json |
| Claude Desktop (Mac) | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Cursor | .cursor/mcp.json in your project, or ~/.cursor/mcp.json globally |
| Windsurf | ~/.codeium/windsurf/mcp_config.json |
{
"mcpServers": {
"mechanical-mcp": {
"command": "ansys-mechanical-mcp"
}
}
}
Or if running from source:
{
"mcpServers": {
"mechanical-mcp": {
"command": "python",
"args": ["C:/path/to/mechanical-mcp/mechanical_mcp_server.py"]
}
}
}
Restart your client after editing the config.
Finding the Mechanical gRPC port
Mechanical exposes a gRPC server whose port you pass to connect_to_mechanical.
In Workbench (Tools → Scripting → Run Script):
port = GetSystem("SYS").GetContainer(ComponentName="Model").StartGrpcServer()
print(port)
If you have multiple Mechanical systems open (e.g. Modal + Static Structural), run the script for each system by replacing "SYS" with the system name (e.g. "SYS 1", "SYS 2").
Usage
- Open ANSYS Mechanical (gRPC is enabled by default in 2023 R1+)
- Find the port using one of the methods above
- Connect to your Mechanical instance:
"Connect to Mechanical on port 10000"
Then interact naturally:
"Assign Structural Steel to all bodies"
"Generate a mesh with 50mm element size"
"Add a fixed support to the named selection called Base"
"Solve the analysis and get the maximum von Mises stress"
"Convert part Equipment1 to a point mass"
Multiple Instances
You can connect to multiple Mechanical instances (e.g. Modal on port 51811, Static Structural on port 53038) by calling connect_to_mechanical with the relevant port. The server maintains one active connection at a time.
License
Apache License 2.0 — see LICENSE
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.