# Agents and MCP

> The zc-workstation MCP server, Claude Code plugin, skills and adapters for other agents.

## MCP server

`zc-workstation mcp` serves these tools over standard input and output:

<table class="tableblock frame-all grid-all stretch"><colgroup><col style="width: 25%;"> <col style="width: 75%;"></colgroup><tbody><tr><td class="tableblock halign-left valign-top"><p class="tableblock"><code>status</code></p></td><td class="tableblock halign-left valign-top"><p class="tableblock">Live state per target. Read-only.</p></td></tr><tr><td class="tableblock halign-left valign-top"><p class="tableblock"><code>list</code></p></td><td class="tableblock halign-left valign-top"><p class="tableblock">Every declared item with its state, version, newer version and app, then what is installed but not declared. Takes <code>state</code> and <code>kind</code> filters. Read-only.</p></td></tr><tr><td class="tableblock halign-left valign-top"><p class="tableblock"><code>add</code></p></td><td class="tableblock halign-left valign-top"><p class="tableblock">Declare a package or runtime in one target’s manifest, with its why and section. Edits the manifest only.</p></td></tr><tr><td class="tableblock halign-left valign-top"><p class="tableblock"><code>remove</code></p></td><td class="tableblock halign-left valign-top"><p class="tableblock">Uninstall a package and drop it from the manifest. Destructive: only once the user okayed it.</p></td></tr><tr><td class="tableblock halign-left valign-top"><p class="tableblock"><code>capture</code></p></td><td class="tableblock halign-left valign-top"><p class="tableblock">The manifest one target would declare to match this machine. Writes nothing. Read-only.</p></td></tr><tr><td class="tableblock halign-left valign-top"><p class="tableblock"><code>validate</code></p></td><td class="tableblock halign-left valign-top"><p class="tableblock">Check the config offline. Read-only.</p></td></tr><tr><td class="tableblock halign-left valign-top"><p class="tableblock"><code>plan</code></p></td><td class="tableblock halign-left valign-top"><p class="tableblock">Plan and save it. Returns a <code>plan_id</code>. Changes nothing.</p></td></tr><tr><td class="tableblock halign-left valign-top"><p class="tableblock"><code>apply</code></p></td><td class="tableblock halign-left valign-top"><p class="tableblock">Apply a saved plan by <code>plan_id</code>. Refuses when live state moved.</p></td></tr><tr><td class="tableblock halign-left valign-top"><p class="tableblock"><code>doctor</code></p></td><td class="tableblock halign-left valign-top"><p class="tableblock">Install health, security settings and AI agent configs. Read-only.</p></td></tr><tr><td class="tableblock halign-left valign-top"><p class="tableblock"><code>history</code></p></td><td class="tableblock halign-left valign-top"><p class="tableblock">What was applied, newest first, and from where. Read-only.</p></td></tr><tr><td class="tableblock halign-left valign-top"><p class="tableblock"><code>drift</code></p></td><td class="tableblock halign-left valign-top"><p class="tableblock">What the last daily drift check found. Read-only.</p></td></tr></tbody></table>

`apply` takes only the id of a plan the server saved, never a plan body. A plan that deletes is cancelled and the reply names the terminal command for the user to run.

-   **Plans expire.** A saved plan older than an hour is refused; the agent plans again and shows the user the new one.
    
-   **Every call is logged.** Each tool call, its arguments and whether it worked go to `~/.local/state/zc-workstation/mcp-audit.jsonl`. An apply also lands in `zc-workstation history` as applied from an agent.
    
-   **Tools say what they do.** Each tool carries MCP annotations: read-only tools say so, `add` edits a file, `remove` is destructive, and `apply` changes the machine. A client can ask before the ones that write.
    
-   **Resources.** The server offers the config (`zc-workstation://config`), the last 50 applies (`zc-workstation://history`) and each target’s manifest (`zc-workstation://manifest/<target>`), so an agent reads them without a tool call.
    
-   **Prompts.** Each skill is also an MCP prompt, for clients without skills.
    

## Claude Code plugin

The repository is a plugin: `skills/`, `commands/`, `hooks/` and `.mcp.json`.

```console
$ claude plugin marketplace add zoolcoder/zc-workstation
$ claude plugin install zc-workstation
```

-   `setup` installs the binary, writes a config and runs `doctor`.
    
-   `plan-apply` plans, explains, asks for a yes, and applies that plan by id.
    
-   `add-software` turns "install X" or "I need a tool for Y" into a manifest entry: it picks the package, writes it with `add` under a section with a why, then plans and applies after a yes. Nothing is installed by hand, so the next machine gets it too.
    
-   `review` reads `doctor` and `list`, then reports what is new in the tools you rely on, what is broken or drifted, and up to three ideas. It changes nothing until you pick.
    
-   Slash commands: `/zc-workstation:plan`, `/zc-workstation:apply`, `/zc-workstation:doctor`, `/zc-workstation:add <tool or need>` and `/zc-workstation:review`.
    
-   The `PreToolUse` hook asks before any `apply` with `-yes` or without a saved plan file.
    

## What is new after an update

`review` reports features worth trying in the versions you moved to. It reads the release notes between the old and the new version, from GitHub releases when the homepage is on GitHub, and keeps only what touches each item’s why.

To know what an update moved, upgrade with `zc-workstation upgrade`. It saves the outdated list to `~/.local/state/zc-workstation/upgrades/`, then runs `apply -upgrade`; `review` reads the newest file there.

```console
$ zc-workstation upgrade             # everything outdated
$ zc-workstation upgrade -only brew:tmux
```

## One setup for every agent

The [`agents` provider](providers.html#agents) writes the same MCP servers, rules and skills into Claude Code, Codex, Cursor and Gemini CLI, and pulls the Ollama models you name. A new machine gets them with the rest of `apply`.

## Other agents

`adapters/` holds the same rules for Codex, Cursor, Gemini CLI, Copilot and cloud agents.
