Model Context Protocol (MCP) server for ANSYS Fluent, built on PyFluent.
Project description
PyFluent-MCP
PyFluent-MCP (ansys-fluent-mcp) gives you a Model Context Protocol (MCP)
server that lets AI assistants interact with Ansys Fluent through
PyFluent.
PyFluent-MCP is built on PyAnsys Common MCP (ansys-common-mcp), the shared PyAnsys MCP foundation.
You can run this package as a standalone MCP server. It also serves as the open-source core + solve foundation for higher-level products. Those products depend on this package and call solve tools over MCP. Dependency direction stays one-way. This package never depends on, imports, or references products that consume it.
For architecture details, diagrams, and full tool references, see the PyFluent-MCP documentation. For contribution information, including how to build documentation locally, see Contribute.
Overview
The server is a stateless MCP leaf. Your MCP host (VS Code Copilot, Claude Desktop, Cursor, or a custom agent) calls a focused tool set. Fluent mutations run only through validated MCP tools, and Python executes only through a validated, sandboxed execution path.
Key features include:
- Manage connections dynamically: Launch a new Fluent session, attach to an existing session (local or remote), or disconnect on demand.
- Inspect the live settings tree: Explore the active Fluent settings API, named objects, allowed values, and targeted context.
- Run code through a validated execution path: Run or precheck Python in a persistent session behind an AST sandbox.
- Review results and diagnostics: Summarize setup, build a simulation report, inspect mesh quality, list fields, compare case files, and capture screenshots.
- Extend with pluggable backends: Use the local PyFluent backend by default and add execution backends through separately installed entry-point packages.
PyFluent-MCP itself is deterministic infrastructure. It does not own model
runtime selection, provider orchestration, transport policy, retries, or
agent loops. Those concerns live in higher-level host products such as
fluids-mcp, which consume this package over the MCP wire.
Tool surface
You can use 20 tools exposed by the server:
| Group | Tools |
|---|---|
| Connection and session | connect, disconnect, session_status, solver_status |
| Schema discovery | find_api, get_help, get_state, get_targeted_context |
| Named objects | list_named_objects, find_named_object, select_named_objects |
| Execution and validation | run_code, validate_code |
| Reporting and inspection | summarize_setup, simulation_report, screenshot |
| Mesh/fields/compare | mesh_quality, list_fields, compare_files |
Requirements
| Requirement | When needed | Notes |
|---|---|---|
| Python 3.12 or later | Always | 3.12, 3.13, and 3.14 supported |
| Core runtime dependencies | Always (installed automatically) | ansys-common-mcp, fastmcp, httpx, pydantic |
PyFluent (ansys-fluent-core 0.27 or later) |
To drive a live Fluent session (connect, run_code, get_state, mesh_quality, …) |
Installed automatically as a required dependency |
| A licensed local ANSYS Fluent installation | To actually launch/attach a solver | PyFluent talks to this Fluent installation over gRPC |
h5py 3.0 or later |
Only for compare_files on .h5/.cas.h5 files |
The file-probe extra |
PyFluent is required for live-session tools and is installed automatically. Offline-only tools such as
find_api,get_help, andvalidate_codestill work without a local Fluent installation. Any tool that touches a solver, includingconnect,run_code,get_state,summarize_setup,mesh_quality, andscreenshot, requires a licensed Fluent installation on your machine.
Installation
Install the latest release:
pip install ansys-fluent-mcp
To add the optional HDF5 file-probe support used by compare_files:
pip install "ansys-fluent-mcp[file-probe]"
If you want an editable developer installation with test dependencies:
git clone https://github.com/ansys/pyfluent-mcp.git
cd pyfluent-mcp
pip install -e ".[tests]"
Usage
Use STDIO for desktop MCP clients that launch the server process. Use HTTP only on trusted networks or behind infrastructure that provides authentication and TLS.
Run the server over STDIO (the default MCP transport):
ansys-fluent-mcp
Or run the server over streamable HTTP:
ansys-fluent-mcp --transport http --host 127.0.0.1 --port 8000
Starting the MCP server only makes the tools available. You still need an MCP-compatible client, such as VS Code Copilot, Claude Desktop, Cursor, or another assistant host, to connect to it and call those tools. Register the server in the client's MCP configuration after choosing a transport.
If you run a local Windows checkout, point your client at the virtual environment entry point. For VS Code MCP support, add a server entry like this to your VS Code MCP configuration:
{
"servers": {
"ansys-fluent-mcp": {
"type": "stdio",
"command": "D:\\Development\\fluent\\pyfluent-mcp\\.venv\\Scripts\\ansys-fluent-mcp.exe"
}
}
}
Configuration
You configure the server through FLUIDS_MCP_* environment variables. Common variables are listed here:
| Variable | Effect |
|---|---|
FLUIDS_MCP_SETTINGS_JSON |
Override the bundled settings schema with an external file |
FLUIDS_MCP_LOG_LEVEL |
Set the log level (default INFO) |
FLUIDS_MCP_DISABLE_SESSION_LOGS |
Set to 1 to disable session logs |
FLUIDS_MCP_MAX_STEPS |
Set a cap on MCP tool-loop iterations (default 30) |
Host ownership and architecture boundaries
ansys-fluent-mcp is the deterministic MCP substrate and solve leaf.
It intentionally does not own:
- model provider selection
- model routing
- transport orchestration
- caching policy
- retry management
- agent loops
- workflow reasoning
Those capabilities belong in higher-level orchestration products such as
fluids-mcp, VS Code Copilot agents, Claude Desktop workflows, or other
external MCP hosts.
This package focuses on:
- Fluent tool execution
- schema retrieval and grounding
- settings introspection
- validated Python execution
- deterministic MCP tooling
- backend abstractions
The architecture intentionally keeps dependency flow one-way:
agent/orchestrator/runtime
↓
ansys-fluent-mcp
The substrate never depends on the orchestration layer.
License
This project is licensed under the Apache 2.0 license agreement. See the LICENSE file for details.
Resources
For general PyAnsys questions, email pyansys.core@ansys.com.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ansys_fluent_mcp-0.2.0.tar.gz.
File metadata
- Download URL: ansys_fluent_mcp-0.2.0.tar.gz
- Upload date:
- Size: 931.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da05b93979ce512516a622d6dbdb6f1f49edd28a758d5f0514f13b4ed56e14e1
|
|
| MD5 |
b5829fbf28bafd25d271b491776025d7
|
|
| BLAKE2b-256 |
59fabf77677c5ebfb766634ad2a30b886f2fe2bef069d345c218c4bfc4d7f1a5
|
Provenance
The following attestation bundles were made for ansys_fluent_mcp-0.2.0.tar.gz:
Publisher:
ci.yml on ansys/pyfluent-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ansys_fluent_mcp-0.2.0.tar.gz -
Subject digest:
da05b93979ce512516a622d6dbdb6f1f49edd28a758d5f0514f13b4ed56e14e1 - Sigstore transparency entry: 2206482163
- Sigstore integration time:
-
Permalink:
ansys/pyfluent-mcp@897a9ecc2fe826e62b693aacccd698db209535f2 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/ansys
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@897a9ecc2fe826e62b693aacccd698db209535f2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ansys_fluent_mcp-0.2.0-py3-none-any.whl.
File metadata
- Download URL: ansys_fluent_mcp-0.2.0-py3-none-any.whl
- Upload date:
- Size: 964.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5188657cda9dcaad402b45ad1fdd5cc43fa5559e0d2b8e48a90626dc0fe1b8d8
|
|
| MD5 |
6731158668a1f295735e0997d67c27a7
|
|
| BLAKE2b-256 |
773c7f1c5ff82025ecd9ce31dc16837bd9a56c279b962d3a21d07c5da820d452
|
Provenance
The following attestation bundles were made for ansys_fluent_mcp-0.2.0-py3-none-any.whl:
Publisher:
ci.yml on ansys/pyfluent-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ansys_fluent_mcp-0.2.0-py3-none-any.whl -
Subject digest:
5188657cda9dcaad402b45ad1fdd5cc43fa5559e0d2b8e48a90626dc0fe1b8d8 - Sigstore transparency entry: 2206482245
- Sigstore integration time:
-
Permalink:
ansys/pyfluent-mcp@897a9ecc2fe826e62b693aacccd698db209535f2 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/ansys
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@897a9ecc2fe826e62b693aacccd698db209535f2 -
Trigger Event:
push
-
Statement type: