> ## 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 (remote-first)

## Cursor Setup

Use the remote HTTP MCP endpoint (recommended):

```
https://mcp.scrapegraphai.com/mcp
```

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

```json theme={null}
{
  "mcpServers": {
    "scrapegraph-mcp": {
      "url": "https://mcp.scrapegraphai.com/mcp",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}
```

### Local (stdio) alternative

If you prefer running locally:

```bash theme={null}
pip install scrapegraph-mcp
export SGAI_API_KEY=your-api-key
```

`~/.cursor/mcp.json`:

```json theme={null}
{
  "mcpServers": {
    "scrapegraph-mcp-local": {
      "command": "python3",
      "args": ["-m", "scrapegraph_mcp.server"],
      "env": { "SGAI_API_KEY": "YOUR_API_KEY" }
    }
  }
}
```

#### Alternative: use the CLI directly

```json theme={null}
{
  "mcpServers": {
    "scrapegraph-mcp": {
      "command": "scrapegraph-mcp",
      "env": { "SGAI_API_KEY": "YOUR_API_KEY" }
    }
  }
}
```

#### Windows tip

If environment variables are tricky in Cursor on Windows:

```bash theme={null}
cmd /c "set SGAI_API_KEY=YOUR_API_KEY && python -m scrapegraph_mcp.server"
```

<Note>
  * Ensure the CLI is on your <code>PATH</code> (it may be in <code>\~/.local/bin</code> or your venv).<br />
  * You can use an absolute Python path if needed (e.g., from pyenv/venv).<br />
  * Use <code>python3</code> on macOS if <code>python</code> points to Python 2.
</Note>

### Optional: Smithery

```bash theme={null}
npx -y @smithery/cli install @ScrapeGraphAI/scrapegraph-mcp --client claude
```

Use this only if you specifically want Smithery provisioning. Remote HTTP (above) is the simplest path.
