# Micro-Manager Microscope

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.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 23
- Author: K-Dense-AI
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/K-Dense-AI/lab-instrument-mcps/tree/HEAD/servers/biology/micro-manager
- Updated: 2026-09-26
- HTML: https://affpapa.org/en/nevibecode/mcp/micro-manager-microscope

## What it 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.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `LABMCP_ADDRESS`, `LABMCP_SIMULATE`, `LABMCP_READ_ONLY`, `LABMCP_LIMITS` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
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-manager
```
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>

### Codex

**Platform CLI**
```bash
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-manager
```
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>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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>

### Gemini CLI

**Platform CLI**
```bash
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-manager
```
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>

## When to use it
- 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
- 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.

## Similar
- [Zotero MCP](https://affpapa.org/en/nevibecode/mcp/zotero-mcp.md) — MCP server · ★ 5585
- [arxiv-mcp-server](https://affpapa.org/en/nevibecode/mcp/arxiv-mcp-server.md) — MCP server · ★ 3235
- [PaperBanana](https://affpapa.org/en/nevibecode/mcp/paperbanana.md) — MCP server · ★ 2418
- [MATLAB MCP Server](https://affpapa.org/en/nevibecode/mcp/matlab-mcp-server.md) — MCP server · ★ 1723
- [Hex Research](https://affpapa.org/en/nevibecode/mcp/hex-research.md) — MCP server · ★ 584
- [DocsAgent — Zotero, Obsidian & Apple Notes MCP Server](https://affpapa.org/en/nevibecode/mcp/docsagent-zotero-obsidian-apple-notes-mcp-server.md) — MCP server · ★ 578

From the same set: [k-dense-ai/lab-instrument-mcps](https://affpapa.org/en/nevibecode/by/k-dense-ai/lab-instrument-mcps.md) — 15 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
