> ## Documentation Index
> Fetch the complete documentation index at: https://docs.auditynow.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Cursor

> Use Audity inside Cursor via MCP.

## Requirements

* Cursor (recent build with MCP support, settings panel includes an "MCP" section)
* An Audity Personal Access Token (`aky_...`), see [Authentication](/authentication)

## Setup

<Steps>
  <Step title="Open Cursor's MCP settings">
    Cursor Settings → **MCP** → **Add Server**.
  </Step>

  <Step title="Configure the server">
    * **Name**: `Audity`
    * **URL**: `https://docs.auditynow.com/mcp`
    * **Headers**: `Authorization: Bearer aky_<your-token>`

    The full Bearer string goes in the headers field, including the `Bearer ` prefix.
  </Step>

  <Step title="Save and reload">
    Cursor will discover the available tools automatically. You should see `listProjects`, `createProject`, `triggerAuditAnalysis`, `listMemories`, and the rest in the tool palette.
  </Step>

  <Step title="Test">
    In a Cursor chat, type:

    > @audity list my projects

    The first time you invoke an Audity tool, Cursor may prompt for permission. Approve to enable.
  </Step>
</Steps>

## What you get

The MCP server exposes every endpoint from Audity's [OpenAPI spec](/api-reference/openapi.json) as a Cursor tool. Tool names match the `operationId` in the spec, e.g. `getCurrentUser`, `listOpportunities`, `createCaptureNote`.

## Common prompts

```text theme={null}
@audity list my projects
```

```text theme={null}
@audity start an audit for {client}, {industry}, {size}
```

```text theme={null}
@audity search nucleus for everything related to {topic}
```

```text theme={null}
@audity convert lead {id} into a project and trigger the analysis
```

## Cursor-specific tips

* **Use `@audity` to scope the tool call.** Without an explicit reference, Cursor may pick a different MCP server's tool with a similar name.
* **Per-project MCP config.** If you want different Audity tokens for different projects (e.g. testing vs production), use Cursor's per-workspace MCP settings rather than the global one.
* **Composer mode plays nicely with Audity.** Multi-step workflows ("convert all leads above 70 from this week, then trigger analysis on each") run cleanly in composer because Cursor stages the tool calls before executing.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Cursor doesn't see Audity tools after configuring">
    Reload Cursor (Cmd+Shift+P → "Reload Window"). MCP servers are discovered at startup; runtime config changes need a reload.
  </Accordion>

  <Accordion title="Every call returns 401 PAT_MALFORMED">
    Check the headers field. It should be exactly `Authorization: Bearer aky_<token>`. If you have an extra `Bearer ` (i.e., `Authorization: Bearer Bearer aky_...`), Cursor sends the doubled prefix and Audity's middleware rejects it. Remove one.
  </Accordion>

  <Accordion title="Every call returns 403 PAT_SCOPE_INSUFFICIENT">
    Token lacks `write` scope. Generate a new one in Settings → API Tokens with both `read` and `write` checked, then update Cursor's MCP headers.
  </Accordion>

  <Accordion title="`@audity` doesn't autocomplete">
    The MCP server probably isn't connected. Check Cursor Settings → MCP, Audity should show a green dot. Red means a connection error; check the URL and headers.
  </Accordion>

  <Accordion title="429 rate limited">
    See [Authentication → Rate limits](/authentication#rate-limits). Cursor's composer can fan out calls fast; for batch operations consider serializing or adding `setTimeout`-style delays.
  </Accordion>
</AccordionGroup>

## What's next

* [Run a full audit workflow →](/guides/running-an-audit)
* [Working with Nucleus →](/guides/working-with-nucleus)
* [API Quickstart (curl) →](/api-quickstart) for non-MCP integrations
