---
title: "Cursor"
description: "Set up Baz in Cursor with the exploration rule and the MCP server."
---

Cursor does not auto-install MCP servers, so setup is two manual steps: add the Baz rule, then wire the server.

## 1. Add the rule

Copy `.cursor/rules/baz-codebase-exploration.mdc` from the [baz-plugin repository](https://github.com/baz-scm/baz-plugin) into your project's `.cursor/rules/` directory, or into `~/.cursor/rules/` to apply it everywhere.

The rule is the Cursor form of the `baz-codebase-exploration` skill. It always applies, and it tells the agent to route every search through Baz while keeping file reads on Cursor's own tools.

## 2. Wire the MCP server

One click install: [![Install MCP Server](https://cursor.com/deeplink/mcp-install-light.svg)](https://cursor.com/en-US/install-mcp?name=baz\&config=eyJ1cmwiOiJodHRwczovL2Jhei5jby9tY3AifQ%3D%3D)

To configure manually, open **Cursor Settings → MCP** and add:

```json
{
  "mcpServers": {
    "baz": {
      "type": "http",
      "url": "https://baz.co/mcp"
    }
  }
}
```

Cursor opens the OAuth flow the first time a Baz tool is called. Sign in with your Baz account.

## What you get

| Piece | Effect |
| --- | --- |
| MCP server `baz` | `repo_search`, `remote_grep`, and `remote_file_search` become available to the agent. |
| `baz-codebase-exploration` rule | Always applied. Routes searching through Baz and reading through Cursor's own tools. |
| `/plan-with-baz` command | Available when the plugin's `skills/` directory is present in the project. |
| `/get-plan-comments` command | Pulls every comment on the current plan back into the CLI, so you can work through feedback without leaving Cursor. |
| `/review` command | Diff-scoped code review with cross-repository checks. Also triggers on a plain request such as "review my changes". |

## Planning with Baz

Run the planning command with a description of the work:

```text
/plan-with-baz add rate limiting to the public API
```

Cursor prompts you to switch to **Plan** mode. The agent then explores the relevant repositories with the Baz tools, writes its plan to `/tmp/.baz-plan-<sessionId>.md`, and presents the same content inline. It then calls `update_plan` itself, which stores the plan in Baz and closes the planning session on your timeline. See [Planner](/docs/capabilities/planner) for the plan record.

## Reviewing with Baz

Review the current branch, or narrow the scope with a flag:

```text
/review
/review uncommitted
/review --pr 42
/review --fix
```

Cursor resolves the diff, reads the changed files, then spends the Baz search budget checking the change against repositories you have not cloned. Asking in plain language works too: "review my changes before I push" reaches the same workflow.

If the Baz server is not connected, a change with an outward-facing surface stops the review rather than downgrading it to a local-only pass. The full scope flags, the four cross-repo checks, and the `--fix` loop are described in the [plugins overview](/docs/basics/plugins).

## Known limitations

* **No tool-usage summary.** Cursor's hook validator does not recognize a session-end event, so Baz does not print a per-session summary of tool calls the way Claude Code does.
* **No automatic completion nudge.** Cursor drops hook context for non-MCP tools, so nothing prompts the agent after it writes the plan file. The rule instructs the agent to call `update_plan` on its own. If a planning session stays open on your timeline, ask the agent to call it.

## Sending review fixes into Cursor

Comments in a Baz review can be sent straight to Cursor as a fix prompt, using the same MCP connection. See [Pull Requests](/docs/capabilities/pull-requests) for the review side of that flow.

More detail on the shared pieces is in the [plugins overview](/docs/basics/plugins).

## FAQ

<details>

<summary>Why is there no tool-usage summary in Cursor?</summary>

Cursor's hook validator does not recognize a session-end event, so Baz cannot print the per-session summary that Claude Code shows.

</details>

<details>

<summary>My planning session stays open on the Baz timeline. Why?</summary>

Cursor drops hook context for non-MCP tools, so nothing nudges the agent after it writes the plan file. The rule tells the agent to call `update_plan` itself; if the session is still open, ask it to call it.

</details>

<details>

<summary>Can I send review comments into Cursor as fixes?</summary>

Yes, over the same MCP connection. See [Pull Requests](/docs/capabilities/pull-requests) for the review side of that flow.

</details>
