Ansys MCP Server
Enables AI assistants to interact with Ansys simulation software (Fluent, MAPDL, Mechanical, Geometry) through the Model Context Protocol.
README
Ansys MCP Server
A Model Context Protocol (MCP) server that provides AI assistants with the ability to interact with Ansys simulation software. This server enables seamless integration between AI tools and Ansys products like Fluent, MAPDL, Mechanical, and others.
Features
- Multi-Product Support: Interface with various Ansys products (Fluent, MAPDL, Mechanical, Geometry)
- Session Management: Create and manage Ansys simulation sessions
- File Operations: Read and analyze Ansys files (.cas, .dat, .inp, .rst, etc.)
- Command Execution: Execute MAPDL commands and Fluent operations
- Status Monitoring: Check Ansys installation and module availability
- Working Directory Management: Organize simulation files and results
Supported Ansys Products
- Ansys Fluent (via PyFluent)
- Ansys MAPDL (via PyMAPDL)
- Ansys Mechanical (via PyMechanical)
- Ansys Geometry (via PyAnsys Geometry)
Installation
Prerequisites
- Python 3.8+ is required
- Ansys Software must be installed on your system
- Ansys Python Libraries (PyAnsys packages) should be installed
Install from PyPI (when available)
pip install ansys-mcp-server
Install from Source
git clone https://github.com/yourusername/ansys-mcp-server.git
cd ansys-mcp-server
pip install -r requirements.txt
pip install -e .
Install Ansys Python Packages
# Install PyAnsys packages based on your Ansys products
pip install ansys-fluent-core # For Fluent
pip install ansys-mapdl-core # For MAPDL
pip install ansys-mechanical-core # For Mechanical
pip install ansys-geometry-core # For Geometry
Quick Start
1. Configuration
Set your Ansys installation path (optional):
export ANSYS_ROOT="/path/to/ansys/installation"
2. Running the Server
# Run as a standalone server
python ansys_mcp_server.py
# Or use the installed command
ansys-mcp-server
3. Integration with AI Tools
The server implements the MCP protocol and can be integrated with any MCP-compatible AI tool. Here's an example configuration:
{
"name": "ansys-mcp",
"command": "python",
"args": ["/path/to/ansys_mcp_server.py"],
"env": {
"ANSYS_ROOT": "/path/to/ansys"
}
}
Available Tools
System Tools
- check_ansys_status: Verify Ansys installation and available modules
- read_ansys_file: Read and analyze various Ansys file formats
Fluent Tools
- create_fluent_session: Launch a new Fluent session
- run_fluent_commands: Execute Fluent TUI commands
MAPDL Tools
- create_mapdl_session: Launch a new MAPDL session
- run_mapdl_commands: Execute APDL commands
Usage Examples
Check Ansys Status
# AI Assistant can use this tool to verify Ansys availability
result = await call_tool("check_ansys_status", {})
Create a Fluent Session
# Launch Fluent in 3D double precision mode
result = await call_tool("create_fluent_session", {
"precision": "double",
"dimension": "3d"
})
Read an Ansys File
# Analyze a Fluent case file
result = await call_tool("read_ansys_file", {
"file_path": "/path/to/simulation.cas"
})
Execute MAPDL Commands
# Run MAPDL preprocessing commands
result = await call_tool("run_mapdl_commands", {
"commands": [
"/PREP7",
"ET,1,SOLID186",
"BLOCK,0,1,0,1,0,1",
"ESIZE,0.1",
"VMESH,ALL"
]
})
Resources
The server provides access to:
- ansys://status: Real-time Ansys installation status
- ansys://working-directory: Current working directory and files
- ansys://sessions: Active Ansys sessions (future feature)
Development
Project Structure
ansys-mcp-server/
├── ansys_mcp_server.py # Main server implementation
├── requirements.txt # Dependencies
├── setup.py # Package setup
├── README.md # This file
├── LICENSE # MIT License
├── tests/ # Test suite
│ ├── test_server.py
│ └── test_ansys_interface.py
└── examples/ # Usage examples
├── fluent_example.py
└── mapdl_example.py
Running Tests
pytest tests/
Code Formatting
black ansys_mcp_server.py
flake8 ansys_mcp_server.py
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Ansys for providing excellent simulation software
- PyAnsys project for Python interfaces
- Model Context Protocol for the communication standard
- Anthropic for MCP development and support
Support
- Documentation: GitHub Wiki
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Roadmap
- [ ] Support for more Ansys products (CFX, Icepak, etc.)
- [ ] Advanced file format support
- [ ] Real-time simulation monitoring
- [ ] Batch job management
- [ ] Cloud integration (Ansys Cloud, AWS, Azure)
- [ ] Advanced visualization tools
- [ ] Optimization workflow support
- [ ] Integration with Ansys Workbench
Note: This is an unofficial tool and is not affiliated with or endorsed by Ansys, Inc. Ansys is a registered trademark of Ansys, Inc.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。