MCP Server for AI Agent Integration
In addition to the REST API, MaConSim ships an MCP (Model Context Protocol) server that exposes the entire REST API to AI agents and AI-powered IDEs such as VS Code with GitHub Copilot, Claude Desktop or OpenCode. An agent can create plants, machines, orders, scenarios, alerts, OPC UA trees, MQTT brokers and more simply by being asked in natural language — no manual REST calls required.
Availability: The MCP server is included in the Docker deployment and can be built for local development (stdio transport). It is not bundled in the desktop (Tauri) application.
Back to the product overview.
How the MCP integration works
- The
maconsim-mcp-serveris a small companion process that automatically registers one MCP tool per REST endpoint — every operation described in the manual is instantly available as an AI tool. - Each tool call is forwarded as an HTTP POST to the MaConSim backend’s REST
API (
/api/<operationId>), so an agent really drives the same API you would call yourself. - The user manual is built in: agents can read the relevant chapters on
demand via the tools
list_manual_sectionsandget_manual_section, or as the MCP resourcesmaconsim://manualandmaconsim://manual/<slug>— no internet access needed.
Docker deployment: the mcp-server service starts automatically with
docker compose up -d and listens over Streamable HTTP at
http://localhost:8081/mcp.
Local development builds (stdio): desktop MCP clients spawn the binary
themselves and talk over stdin/stdout — configure it in VS Code’s mcp.json,
Claude Desktop or OpenCode’s opencode.json.
Security model
- The MCP server has no authentication and is therefore published on
127.0.0.1only (Docker Compose maps port 8081 to localhost). Reaching it from another machine is deliberately not supported. - A built-in exclusion list hides destructive endpoints from agents;
extend or override it with
MACONSIM_MCP_EXCLUDE_TOOLS,MACONSIM_MCP_ALLOW_TOOLSorMACONSIM_MCP_NO_DEFAULT_EXCLUSIONS. - Python functions created by an agent run without an approval step, but inside the script sandbox; they are marked with a created by agent badge so you can review them.
Typical use cases
- Natural-language plant setup: “Create a plant with three machines and a scenario with 30 s takt time.”
- Agent-driven test scenarios for MES integration testing.
- Conversational exploration of a running simulation (“Which orders are queued on press-1?”).
Technical details
| Aspect | Detail |
|---|---|
| Docker endpoint | http://localhost:8081/mcp (Streamable HTTP, 127.0.0.1 only) |
| Local dev transport | stdio (spawned by the MCP client) |
| Prerequisite | A running maconsim-backend REST server (http://localhost:8080) |
| Tools | One MCP tool per REST endpoint, auto-registered |
| Configuration | MACONSIM_MCP_* env vars: backend URL, default user id, timeout (30 s), transport, HTTP bind, tool exclusions |
| Desktop (Tauri) app | Not included |
FAQ
Which AI clients can connect?
Any MCP-capable client — VS Code with Copilot, Claude Desktop, OpenCode and
others. Local builds connect over stdio; the Docker deployment offers the
always-on HTTP endpoint at http://localhost:8081/mcp.
Is the MCP server part of the desktop app? No. It ships with the Docker stack and local development builds only.
Is the endpoint authenticated? No — by design. It binds to localhost only, so only processes on the same machine can reach it.
Can agents change my plant without review? Agent-created functions and tool calls take effect immediately, but a built-in exclusion list blocks destructive endpoints by default, and Python scripts run in a sandbox. Agent-created functions are badged created by agent for review.
Technical documentation
Read the MCP Server chapter of the User Manual: Running the MCP Server, Configuration, Connecting an AI Agent, Tool Exclusions and Safety.
Related: REST API · Automation Flows · Machine Simulation.
