# Connect Cursor to Onsite

> Add Onsite to Cursor in one click, sign in, and ask about your sites from the editor.

Add Onsite to Cursor in one click, then ask about your sites without leaving the editor.

## Before you start

- An Onsite account on a team with an active plan.
- Cursor installed on your computer.

## Add Onsite

<Steps>
  <Step title="Install Onsite in Cursor">
    In Onsite, open [**Settings › MCP**](https://onsite.so/settings/mcp), choose **Cursor**, and select **Add to Cursor**. Cursor opens and asks you to confirm the install.
  </Step>
  <Step title="Sign in to Onsite">
    In Cursor's MCP settings, select the sign-in button next to Onsite. Onsite opens in your browser. Sign in with Google, or with a code sent to your email.
  </Step>
  <Step title="Choose a team and allow access">
    If you're on more than one team, pick the one Cursor should use, then select **Allow**.
  </Step>
</Steps>

### Add it by hand

To add Onsite without the button, open `~/.cursor/mcp.json` (create it if it doesn't exist) and add:

```json
{
  "mcpServers": {
    "onsite": {
      "url": "https://onsite.so/mcp"
    }
  }
}
```

Save the file, then sign in from Cursor's MCP settings as in step 2.

## Check it worked

In Cursor's MCP settings, Onsite shows as connected with its tools listed. Then ask in Cursor's chat:

<Prompt>
  Using Onsite, show me the sites I can access.
</Prompt>

## Use a token instead of signing in

Create a token in [**Settings › MCP**](https://onsite.so/settings/mcp) under **Connected apps and tokens**, and add it to `~/.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "onsite": {
      "url": "https://onsite.so/mcp",
      "headers": { "Authorization": "Bearer <your-onsite-token>" }
    }
  }
}
```

A token lasts 90 days. Keep it private, don't commit the file to a shared repository, and revoke the token in **Settings › MCP** when you no longer need it.

## If something goes wrong

<AccordionGroup>
  <Accordion title="Add to Cursor does nothing">
    Your browser may be blocking links that open apps. Allow it to open Cursor, or add Onsite by hand as above.
  </Accordion>
  <Accordion title="Onsite shows an error or asks you to log in">
    Select the sign-in button next to Onsite in Cursor's MCP settings and finish signing in.
  </Accordion>
  <Accordion title="Cursor shows the wrong team's sites">
    Each connection uses one team. Disconnect it in Onsite under **Settings › MCP**, then sign in again from Cursor and pick the other team. See [Manage connections](/mcp/manage-connections#switch-to-another-team).
  </Accordion>
  <Accordion title="It worked before and now it doesn't">
    A connection lasts 90 days, and stops if you revoke it or leave the team. Sign in again from Cursor's MCP settings. See [Troubleshooting](/mcp/troubleshooting).
  </Accordion>
</AccordionGroup>

## Related

<CardGroup cols={2}>
  <Card title="What you can ask" icon="lightbulb" href="/mcp/ask">
    Example questions to try next.
  </Card>
  <Card title="Other tools" icon="plug" href="/mcp/other-tools">
    VS Code, Windsurf, Zed and more.
  </Card>
</CardGroup>
