---
title: "Connect an AI agent"
nav: "Connect an AI agent"
description: "Let an AI agent that edits your document see what Wymark shows you: turn on and install the wymark CLI, then connect the agent once, over MCP or in a terminal."
sources: ["0180", "0181", "spec:wymark-review-3"]
section: "Guide"
---

# Connect an AI agent

An AI agent editing your document reads the file, and the file holds only the latest text. Connected to Wymark, the agent can ask for what you see: the pending changes, where each came from, and your comment threads. [How an AI agent sees your review](/docs/agents) explains what it gets.

The setup has two steps. Both are in Settings > Review & comments, under **How AI agents read the review**. Help > **Connect an Agent…** opens it.

## 1. Turn on and install the wymark CLI

`wymark` is a command-line program that asks the running Wymark about a document. Every way of connecting an agent goes through it.

1. Turn on **The wymark CLI**. It is off until you do, and while it is off Wymark answers no agent.
2. Click **Install the CLI**. This puts `wymark` on your PATH. macOS may ask for your password.

## 2. Connect your agent, once

Pick your agent in Settings and click **Copy**. What you do with the copied text depends on the agent:

| Agent | What to do |
| --- | --- |
| **Claude Code** | Run the copied command in a terminal. |
| **Claude desktop app**, Cowork included | Customize > Plugins > Add > Add marketplace, paste `wymarkapp/wymark`, select Sync, then add Wymark. |
| **Other agents**, such as Cursor | Paste the copied entry into the agent's MCP configuration file. [Where that file is](/docs/reference/wymark-command#use-it-from-an-mcp-client). |
| **Any agent with a terminal** | Paste the copied sentence into a session with the agent. To skip asking in every session, add the second sentence to the agent's instructions, such as `AGENTS.md`. |

The first three connect over MCP: the agent gets Wymark's commands as its own tools, and is told to read a document's review before editing it. The last runs `wymark` in a terminal when you ask it to.

## Check it worked

- Over MCP: ask the agent to list its MCP tools. There are nine, from `open` to `readme`.
- In a terminal: `wymark review notes.md` prints the review of `notes.md`.

## While you work

- Wymark must be running, with the CLI turned on. The document need not be open.
- The agent edits the file itself. Its edits show in Wymark as [changes from outside](/docs/guide/changes-from-outside), for you to accept or reject.
- Nothing leaves your computer: the CLI asks the Wymark running on it. See [Privacy](/docs/reference/privacy).

:::persona git

An agent with a terminal may reach for `git diff`. That measures against a commit, not against what you last approved, and cannot say which text is yours. `wymark review` does both.

:::

For every command and option, see [The `wymark` command](/docs/reference/wymark-command).
