# Cursor

> Add IndexZero to Cursor with a four-line mcp.json.

Source: https://docs.indexzero.site/agents/cursor



Cursor reads MCP servers from `mcp.json`, either globally at `~/.cursor/mcp.json` or per project at `.cursor/mcp.json`. Remote servers with OAuth need only the URL.

<Steps>
  <Step>
    ### Add the server [#add-the-server]

    ```json title="~/.cursor/mcp.json"
    {
      "mcpServers": {
        "indexzero": {
          "url": "https://app.indexzero.site/mcp"
        }
      }
    }
    ```

    Use `.cursor/mcp.json` inside a repository instead if the setup should travel with the project. The file holds no credentials either way.
  </Step>

  <Step>
    ### Reload and approve [#reload-and-approve]

    Reload Cursor. In **Settings**, **MCP**, the IndexZero server appears with a prompt to authenticate. Approve the connection in the browser window that opens on app.indexzero.site.
  </Step>

  <Step>
    ### Confirm [#confirm]

    Open the agent panel and ask it to list your IndexZero projects. The server's tools appear in the MCP settings once connected.
  </Step>
</Steps>

## Using an API key instead [#using-an-api-key-instead]

If OAuth is not an option in your environment, create an [API key](/agents/api-keys) and send it as a header:

```json title="~/.cursor/mcp.json"
{
  "mcpServers": {
    "indexzero": {
      "url": "https://app.indexzero.site/mcp",
      "headers": {
        "x-api-key": "iz_your_key_here"
      }
    }
  }
}
```

Do not commit a file containing a key. Keep the header form in the global `~/.cursor/mcp.json` and the URL-only form in the project file.
