MCP server
The MCP (Model Context Protocol) server publishes MicroLab engine operations as tools for AI clients (Claude Code, Claude Desktop, Cursor…). It’s the same surface the app’s copilot uses. The tools are generated from the operations registry, so MCP and CLI don’t diverge.
Today it publishes 42 tools, 2 resources and 3 flow prompts.
Curated surface
Section titled “Curated surface”It’s not a dump of the registry (92 operations): the AI operates the lab —launch,
test, mock, debug—, while the catalog authoring (create micros and scenarios, edit
machine settings, import/export by file) stays in the app and the CLI. A model chooses
worse the longer the list. Nothing is lost: what’s hidden is still in microlab ops, the
CLI and the control server.
Connection over stdio (the usual one)
Section titled “Connection over stdio (the usual one)”The client launches microlab mcp as a child process. It requires the compiled engine
(npm run build:electron) and it’s advisable to use absolute paths and an explicit -p
(the project folder with .microlab/).
Claude Code:
claude mcp add microlab -- node C:\tools\micro-lab\bin\microlab.js mcp -p C:\projects\my-projectClaude Desktop / Cursor (claude_desktop_config.json or .cursor/mcp.json):
{ "mcpServers": { "microlab": { "command": "node", "args": ["C:\\tools\\micro-lab\\bin\\microlab.js", "mcp", "-p", "C:\\projects\\my-project"] } }}With the global executable (npm link), "command": "microlab", "args": ["mcp", "-p", "..."] is enough.
Connection over HTTP (live engine)
Section titled “Connection over HTTP (live engine)”With a live engine (the app open or the daemon), the same server is available over
Streamable HTTP at the /mcp route of the control
server, for clients that don’t launch processes. The URL and
the token come from control.json; every request carries Authorization: Bearer <token>.
What it publishes
Section titled “What it publishes”- Tools — 42, grouped by domain (scenario lifecycle, debugging, Docker, read-only
catalog, mocks…). Each carries
readOnlyHintordestructiveHintannotations where it applies, so the client decides what to run without confirmation. - Resources —
microlab://guide(operation guide for AIs, in markdown) andmicrolab://status(JSON snapshot: version, paths, live engine, active scenario and its micros’ status). - Prompts — three flow recipes:
levantar-y-probar,mockear-dependenciaanddepurar-micro.
Execution model
Section titled “Execution model”Same as the CLI: if there is a live engine, the tool runs against it (same state as the
UI); if not, the stateless tools run in-proc. scenario_start and
scenario_up_and_wait launch the daemon if it’s missing; the micros survive the MCP
session (closing the AI client doesn’t stop them; to stop them, scenario_stop).
Access
Section titled “Access”In projects with login, the MCP requires the mcp capability (independent of cli).
Without it, stdio exits with 5 and HTTP responds 403. See
Capabilities.
See also
Section titled “See also”- Copilot — the same surface inside the app.
- Control server · CLI commands