# Installing deliberation in Cursor

[Cursor](https://cursor.com) connects to the deliberation MCP server and reads a
project **rule** that tells the agent when to delegate. Both pieces are below.

## 1. Add the MCP server

Use the one-click button from the [README](../../README.md#install) ("Install in
Cursor"), or add the server to `~/.cursor/mcp.json` (global) or `.cursor/mcp.json`
(project):

```json
{
  "mcpServers": {
    "deliberation": { "command": "npx", "args": ["-y", "@antonbabenko/deliberation-mcp"] }
  }
}
```

The one-click deeplink (`cursor://anysphere.cursor-deeplink/mcp/install?...`)
cannot carry secrets - set provider keys in your environment (see below).

## 2. Add the rule

Copy the generated rule into your project so Cursor knows when to reach for the
experts:

```
.cursor/rules/deliberation.mdc
```

It is generated by `scripts/sync-hosts.js` from `examples/cursor.md`. The
frontmatter (`description`, `alwaysApply`) controls when Cursor loads it; the body
routes plan/architecture/security reviews and second opinions to the right tool.
The full surface (same as every host) is the fan-out / single-provider tools
(`ask-all`, `consensus`, `ask-gpt` / `ask-gemini` / `ask-grok` / `ask-openrouter`)
and the seven experts (`architect`, `plan-reviewer`, `scope-analyst`,
`code-reviewer`, `security-analyst`, `researcher`, `debugger`).

## Provider credentials

The MCP server reads credentials from the host environment. Set only the providers
you use:

| Provider | How it authenticates |
|----------|----------------------|
| GPT (Codex) | OpenAI / Codex CLI auth (Codex login or `OPENAI_API_KEY`) |
| Gemini | The Antigravity CLI (`agy`) - sign in once with the CLI |
| Grok (xAI) | `XAI_API_KEY` |
| OpenRouter | `OPENROUTER_API_KEY` (advisory-only; declare models in `~/.config/deliberation/config.json`) |

Missing keys just disable that one provider.

## Distribution

- **cursor.directory** - the community rules/MCP registry. Submit the rule via the
  site's "Submit" flow / its GitHub repo.
- [unverified] Whether the official Cursor Marketplace (cursor.com/marketplace)
  accepts a self-serve third-party MCP+rules package - confirm with Cursor's
  publisher docs before treating a Marketplace listing as available.

## Notes / verified vs unverified

Verified against cursor.com/docs + cursor.directory: project rules live in
`.cursor/rules/*.mdc` (frontmatter `description` / `globs` / `alwaysApply`); MCP
servers register under `mcpServers` in `~/.cursor/mcp.json` or `.cursor/mcp.json`;
one-click install deeplink format
`cursor://anysphere.cursor-deeplink/mcp/install?name=&config=<base64>`.
