Micro-Manager Microscope — Claude Code MCP server: install
This MCP server connects an agent to microscopes running Micro-Manager. Use it to capture images, adjust stage and focus, switch configuration groups, or collect image sequences.
claude mcp add --env LABMCP_ADDRESS=<LABMCP_ADDRESS> --env LABMCP_SIMULATE=<LABMCP_SIMULATE> --env LABMCP_READ_ONLY=<LABMCP_READ_ONLY> --env LABMCP_LIMITS=<LABMCP_LIMITS> --transport stdio micro-manager -- uvx labmcp-micro-managerWhat Micro-Manager Microscope does
The server talks to Micro-Manager through MMCore and pymmcore-plus. An agent can inspect device and position details, set exposure, change configuration groups, operate the shutter, move the XY stage or focus drive, run autofocus, and collect z-stacks or time-lapse images. Acquisitions are saved as multi-page TIFF files.
To connect real equipment, prepare a Micro-Manager .cfg file and device adapter libraries compatible with the installed pymmcore build. Camera vendor drivers and SDKs are installed separately. Close the Micro-Manager application before connecting, since a device cannot be opened by two programs at once. Check the configured motion limits before issuing movement commands.
Testing has covered a simulated microscope and pymmcore-plus test devices; real hardware has not been verified. To try the simulation, run uvx labmcp-micro-manager --simulate --check. With --read-only, the agent can inspect settings and positions but cannot acquire images or move equipment.
What it helps with
- capture an image from a connected microscope
- collect a z-stack around the current focus
- save a time-lapse acquisition as TIFF
- inspect stage and focus positions
- change the active channel or objective preset
Example prompts for the agent
- Inspect the connected microscope, its devices, current position, and motion limits.
- Collect a z-stack around the current focus and save it as TIFF.
- Acquire a time-lapse at the current position and report the intensity change.
How to install Micro-Manager Microscope
Platform CLI
claude mcp add --env LABMCP_ADDRESS=<LABMCP_ADDRESS> --env LABMCP_SIMULATE=<LABMCP_SIMULATE> --env LABMCP_READ_ONLY=<LABMCP_READ_ONLY> --env LABMCP_LIMITS=<LABMCP_LIMITS> --transport stdio micro-manager -- uvx labmcp-micro-managerReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from labmcp-micro-manager <command>
Platform CLI
codex mcp add micro-manager --env LABMCP_ADDRESS=<LABMCP_ADDRESS> --env LABMCP_SIMULATE=<LABMCP_SIMULATE> --env LABMCP_READ_ONLY=<LABMCP_READ_ONLY> --env LABMCP_LIMITS=<LABMCP_LIMITS> -- uvx labmcp-micro-managerReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from labmcp-micro-manager <command>
Config file
{
"mcpServers": {
"micro-manager": {
"command": "uvx",
"args": [
"labmcp-micro-manager"
],
"env": {
"LABMCP_ADDRESS": "<LABMCP_ADDRESS>",
"LABMCP_SIMULATE": "<LABMCP_SIMULATE>",
"LABMCP_READ_ONLY": "<LABMCP_READ_ONLY>",
"LABMCP_LIMITS": "<LABMCP_LIMITS>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from labmcp-micro-manager <command>
Config file
{
"servers": {
"micro-manager": {
"type": "stdio",
"command": "uvx",
"args": [
"labmcp-micro-manager"
],
"env": {
"LABMCP_ADDRESS": "<LABMCP_ADDRESS>",
"LABMCP_SIMULATE": "<LABMCP_SIMULATE>",
"LABMCP_READ_ONLY": "<LABMCP_READ_ONLY>",
"LABMCP_LIMITS": "<LABMCP_LIMITS>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from labmcp-micro-manager <command>
Platform CLI
gemini mcp add -e LABMCP_ADDRESS=<LABMCP_ADDRESS> -e LABMCP_SIMULATE=<LABMCP_SIMULATE> -e LABMCP_READ_ONLY=<LABMCP_READ_ONLY> -e LABMCP_LIMITS=<LABMCP_LIMITS> micro-manager uvx labmcp-micro-managerReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from labmcp-micro-manager <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Micro-Manager Microscope
How do I install Micro-Manager Microscope in Claude Code?
Run claude mcp add labmcp-micro-manager -- uvx labmcp-micro-manager. This registers the MCP server and launches it with uvx.
What does Micro-Manager Microscope do?
It lets an agent inspect and control a Micro-Manager microscope, including camera exposure, stage and focus movement, shutter operation, and image acquisition.
Has Micro-Manager Microscope been tested on physical hardware?
It has been tested with a simulator and pymmcore-plus test devices. Testing on real microscope hardware has not been verified.