Docker deployment#
PyMechanical-MCP supports containerized deployment with HTTP transport. The repository provides:
docker/Dockerfiledocker/docker-compose.ymldocker/env.example
Quick start with Docker Compose#
Configure environment values:
cd docker cp env.example .env
Update
.envvalues for your Mechanical target and license server.Start services:
docker compose up -d --build
PyMechanical-MCP is available at
http://localhost:8080by default.Validate: view container logs to confirm the
pymechanical-mcpservice is ready:docker compose logs -f pymechanical-mcp
Important environment variables#
Variable |
Default |
Description |
|---|---|---|
|
|
Mechanical hostname or IP address for the gRPC connection. |
|
|
Mechanical gRPC port. |
|
|
MCP HTTP bind host. |
|
|
MCP HTTP port. |
|
|
Whether PyMechanical-MCP is to connect to Mechanical on startup. |
|
|
gRPC mode: |
|
(unset) |
Path containing |
Local Mechanical connectivity notes#
On Windows, macOS, or Docker Desktop, use
host.docker.internalfor a host Mechanical instance.On Linux, use host networking or explicit host IP routing.
Visual Studio Code MCP client example (HTTP)#
{
"servers": {
"pymechanical-mcp": {
"type": "http",
"url": "http://127.0.0.1:8080"
}
}
}
Limitations#
Containerizing PyMechanical-MCP does not containerize Ansys Mechanical licensing requirements.
Ensure the Mechanical gRPC endpoint and license server are reachable from the container network.