Configuration#
Configure PyCFX-MCP with command-line options and environment variables.
You can run the MCP server over STDIO or Streamable HTTP. Optional LLM
settings are used only by the codegen fallback path when deterministic CFX
recipes do not match your request.
General settings#
Setting |
Description |
|---|---|
|
MCP transport to use. Supported values are |
|
Host interface for HTTP transport. The default is |
|
HTTP port. A value of |
|
Default backend kind until |
|
Python logging level for the server process. The default is |
Model settings#
Server-side LLM access is optional and limited to codegen. The fallback is
provider agnostic. It can call native provider APIs through LiteLLM or a direct
OpenAI-compatible HTTP endpoint. Other tools, including cfx_workflow,
cfx_model_context, validate_code, and run_code, do not call a
server-side LLM.
Quick start#
Use an OpenAI key:
$env:OPENAI_API_KEY = "<your-openai-key>"
$env:LLM_PROVIDER = "openai"
$env:LLM_MODEL = "gpt-4o"
Use an Anthropic Claude key:
$env:ANTHROPIC_API_KEY = "<your-anthropic-key>"
$env:LLM_PROVIDER = "anthropic"
$env:LLM_MODEL = "claude-3-5-sonnet"
Use a Google Gemini key:
$env:GEMINI_API_KEY = "<your-gemini-key>"
$env:LLM_PROVIDER = "gemini"
$env:LLM_MODEL = "gemini-1.5-pro"
Use an OpenAI-compatible endpoint:
$env:LLM_ENDPOINT = "http://localhost:4000/v1"
$env:LLM_API_KEY = "<your-key>"
$env:LLM_MODEL = "gpt-4o"
For native provider APIs, install the providers extra once:
pip install "ansys-cfx-mcp[providers]"
Full model reference#
Variable |
Description |
|---|---|
|
Explicit provider name. Supported values are |
|
Transport override. Supported values are |
|
OpenAI-compatible chat completion endpoint. When set, |
|
API key for direct HTTP transport or a custom provider endpoint. |
|
API key for native OpenAI calls through LiteLLM. |
|
API key for native Anthropic Claude calls through LiteLLM. |
|
API key for native Google Gemini calls through LiteLLM. |
|
API key for native Azure OpenAI calls through LiteLLM. |
|
Model identifier. The default is |
|
Maximum retry attempts for LLM calls. The default is |
|
Request timeout in seconds. The default is |
|
Authorization header style for direct HTTP calls. Set to
|
|
Override the parameter name for the maximum token request. |
|
Boolean flag that controls whether |
Transport security and network egress#
Variable |
Description |
|---|---|
|
Path to a custom certificate authority bundle for outbound LLM HTTPS requests. |
|
Standard Python certificate bundle override. Used when |
|
Requests certificate bundle override. This setting is used when |
|
Disable TLS certificate verification for outbound LLM calls when set to
|
Server command-line tool options#
Run this command to inspect supported command-line tool options for your installed version:
ansys-cfx-mcp --help
To start PyCFX-MCP over STDIO:
ansys-cfx-mcp --transport stdio
To start PyCFX-MCP over HTTP on the local host interface:
ansys-cfx-mcp --transport http --host 127.0.0.1 --port 8000
Warning
PyCFX-MCP does not add authentication or TLS to HTTP transport. Use HTTP only for trusted local integrations or behind infrastructure that provides authentication and TLS.
Next steps#
Configure an MCP client as described in IDE and client configuration.
Launch your first workflow as described in Quick start.
Review the descriptions of available tools in Tools and capabilities.