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

# Cursor

> Configure ScrapeGraph MCP in Cursor

## Cursor Setup

Add this to your Cursor MCP settings (`~/.cursor/mcp.json`):

```json theme={null}
{
  "mcpServers": {
    "sgai": {
      "url": "https://mcp.scrapegraphai.com/mcp"
    }
  }
}
```

## Authenticate

Restart Cursor, open its MCP settings, select `sgai`, and start the login. In the browser window that opens, choose **Continue with Google** and sign in with the Google account associated with your ScrapeGraphAI account.

Once the browser shows **Authentication successful. Connected to sgai.**, return to Cursor — the tools are ready.

### With an API key instead

Set `SGAI_API_KEY` in Cursor's environment and add `bearer_token_env_var` next to the `url`:

```json theme={null}
{
  "mcpServers": {
    "sgai": {
      "url": "https://mcp.scrapegraphai.com/mcp",
      "bearer_token_env_var": "SGAI_API_KEY"
    }
  }
}
```

## Verify

Ask Cursor to run the `credits` tool. A balance response confirms that authentication and tool execution both work.

<Tip>
  See the [tool reference](/services/mcp-server/introduction#available-tools) for everything the server exposes.
</Tip>
