# ScrapeGraph MCP server

> Scrape pages, extract structured data with AI prompts, and crawl multiple pages through the ScrapeGraph API.

- Listing: https://mcp.tc/i/scrapegraph
- Connect: this is a local (stdio) server; install it on your machine (see Install). The listing link is a page, not an MCP endpoint.
- Type: local (stdio)
- Auth: API key
- Category: [Search & Web Data](https://mcp.tc/c/search-web)
- Vendor: ScrapeGraphAI
- Repository: <https://github.com/ScrapeGraphAI/scrapegraph-mcp>
- Package: pypi `scrapegraph-mcp`

## About

Connects an assistant to the ScrapeGraph AI API for web scraping and data extraction. It can convert pages to markdown, extract structured data from a page using a natural language prompt, run AI-powered searches, read sitemaps, crawl multiple pages asynchronously, and run agentic scraping workflows with custom schemas.

Runs locally over stdio as the PyPI package scrapegraph-mcp, started with uvx. A ScrapeGraph API key is needed, set in the SGAI\_API\_KEY environment variable or in the MCP client config. Requests consume ScrapeGraph credits.

## What it can do

- Convert any webpage to clean markdown
- Extract structured data from a page with a natural language prompt
- Run AI-powered web searches with structured results
- Fetch pages with optional heavy JavaScript rendering
- Extract sitemap URLs for a website
- Crawl multiple pages asynchronously and fetch results later
- Run agentic scraping workflows with custom steps and output schemas

## Example prompts

- "Convert https://scrapegraphai.com to markdown"
- "Extract all product names and prices from this e-commerce page"
- "Crawl this docs site up to 20 pages and summarize each page"
- "Get the sitemap URLs for example.com"

## Install

### Claude Code

1. Run this in a terminal, in your project folder:

```bash
claude mcp add --transport stdio scrapegraph --env "SGAI_API_KEY=<YOUR_SGAI_API_KEY>" -- uvx scrapegraph-mcp
```

2. Start Claude Code and type `/mcp`. **scrapegraph** should show as connected.

Add `--scope user` to make it available in every project. Replace the placeholders with your own values.

### Claude Desktop

1. Open **Settings → Developer → Edit Config**. It opens `claude_desktop_config.json`. Add:

`claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "scrapegraph": {
      "command": "uvx",
      "args": [
        "scrapegraph-mcp"
      ],
      "env": {
        "SGAI_API_KEY": "<YOUR_SGAI_API_KEY>"
      }
    }
  }
}
```

2. Save the file and restart Claude Desktop. Replace the placeholders with your own values.

Needs uv (Python) on your computer. The file lives in `~/Library/Application Support/Claude/` on macOS and `%APPDATA%\Claude\` on Windows.

### Cursor

[Add to Cursor](<https://cursor.com/install-mcp?name=scrapegraph&config=eyJjb21tYW5kIjoidXZ4IiwiYXJncyI6WyJzY3JhcGVncmFwaC1tY3AiXSwiZW52Ijp7IlNHQUlfQVBJX0tFWSI6IjxZT1VSX1NHQUlfQVBJX0tFWT4ifX0%3D>) (opens Cursor)

Or add it by hand to `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (this project):

`mcp.json`:

```json
{
  "mcpServers": {
    "scrapegraph": {
      "command": "uvx",
      "args": [
        "scrapegraph-mcp"
      ],
      "env": {
        "SGAI_API_KEY": "<YOUR_SGAI_API_KEY>"
      }
    }
  }
}
```

Needs uv (Python) on your computer. Replace the placeholders with your own values.

### VS Code

Add it to `.vscode/mcp.json`. VS Code asks for the secret the first time and stores it securely:

`.vscode/mcp.json`:

```json
{
  "servers": {
    "scrapegraph": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "scrapegraph-mcp"
      ],
      "env": {
        "SGAI_API_KEY": "${input:sgai-api-key}"
      }
    }
  },
  "inputs": [
    {
      "type": "promptString",
      "id": "sgai-api-key",
      "description": "SGAI_API_KEY",
      "password": true
    }
  ]
}
```

Needs uv (Python) on your computer.

### Devin Desktop

1. Add it to `~/.config/devin/mcp_config.json` (macOS and Linux) or `%APPDATA%\devin\mcp_config.json` (Windows):

`mcp_config.json`:

```json
{
  "mcpServers": {
    "scrapegraph": {
      "command": "uvx",
      "args": [
        "scrapegraph-mcp"
      ],
      "env": {
        "SGAI_API_KEY": "<YOUR_SGAI_API_KEY>"
      }
    }
  }
}
```

2. Refresh the MCP server list in Cascade. Replace the placeholders with your own values.

Devin Desktop is the new name for Windsurf.

### Codex

```bash
codex mcp add scrapegraph --env "SGAI_API_KEY=<YOUR_SGAI_API_KEY>" -- uvx scrapegraph-mcp
```

Or edit `~/.codex/config.toml` directly:

`config.toml`:

```toml
[mcp_servers.scrapegraph]
command = "uvx"
args = ["scrapegraph-mcp"]
env = { SGAI_API_KEY = "<YOUR_SGAI_API_KEY>" }
```

Needs uv (Python) on your computer. Replace the placeholders with your own values.

### Gemini CLI

```bash
gemini mcp add -e "SGAI_API_KEY=<YOUR_SGAI_API_KEY>" scrapegraph uvx scrapegraph-mcp
```

This adds it to the current project. Add `-s user` to use it everywhere.

### Any client

Most clients that start local servers accept this shape:

```json
{
  "mcpServers": {
    "scrapegraph": {
      "command": "uvx",
      "args": [
        "scrapegraph-mcp"
      ],
      "env": {
        "SGAI_API_KEY": "<YOUR_SGAI_API_KEY>"
      }
    }
  }
}
```

Zed puts servers under `context_servers` in its settings, with the same `command`, `args` and `env` fields.

Needs uv (Python) on your computer. Replace the placeholders with your own values.

## Details

- Server version: 1.0.1
- Last checked: 2026-10-04
- Listed: 2026-10-04
- Updated: 2026-10-04

---
Source: https://mcp.tc/i/scrapegraph (mcp.tc is an independent directory, not affiliated with this server's publisher). Corrections: https://mcp.tc/report
