Configuration#
You can configure PyMechanical-MCP through command-line flags and environment variables.
Command-line tool startup flags#
Flag |
Description |
|---|---|
|
MCP transport (default |
|
HTTP bind address and port for |
|
Mechanical endpoint for |
|
Connection to Mechanical on startup. Locks lifecycle tools. |
|
Expose all tools from startup instead of dynamically hiding tools that require a Mechanical connection. See Static tool exposure. |
|
gRPC mode: |
|
Path to mTLS certificates directory ( |
|
Comma-separated allowed origins for HTTP transport. |
|
AALI-specific runtime behavior. |
Environment variables#
Variable |
Description |
|---|---|
|
Default gRPC mode when |
|
Default certificate directory when |
|
Preferred endpoint values in containerized deployments. |
|
MCP server log verbosity. |
Connection-lock behavior#
When you use --connect-on-startup, the server connects to Mechanical
during startup and then disables:
launch_mechanicalconnect_to_mechanicaldisconnect_from_mechanical
This keeps the active session stable for clients that expect a fixed connection lifecycle.
Static tool exposure#
By default, PyMechanical-MCP dynamically hides tools tagged
requires_mechanical (see Tools and capabilities) until
launch_mechanical or connect_to_mechanical succeeds. Some MCP clients
do not reliably refresh their tool list when the server notifies them of a
change, which can make newly enabled tools appear unavailable until you send
another message or manually refresh the client’s tool list.
Pass --static-tools to expose the full tool surface from startup instead.
Mechanical-only tools remain visible the whole time; calling one before a
connection exists returns a clear “No Mechanical connection available”
message rather than hiding the tool. This trades a small amount of prompt
size (all tool schemas are sent up front) for avoiding client-side tool list
refresh issues. --static-tools can be combined with --connect-on-startup.
Next steps#
For install and startup examples, see Installation.
For client setup, see IDE and client configuration.