Metadata-Version: 2.4
Name: google-ai-scraper
Version: 0.2.0
Summary: MCP server for scraping Google AI Overviews via a Chrome extension relay
Project-URL: Homepage, https://github.com/balakumardev/google-ai-scraper
Project-URL: Repository, https://github.com/balakumardev/google-ai-scraper
Project-URL: Issues, https://github.com/balakumardev/google-ai-scraper/issues
Author-email: Bala Kumar <mail@balakumar.dev>
License-Expression: MIT
Keywords: ai-overview,chrome-extension,google,mcp,scraper
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Requires-Dist: fastapi>=0.115.0
Requires-Dist: httpx>=0.28.0
Requires-Dist: mcp>=1.0.0
Requires-Dist: uvicorn>=0.32.0
Description-Content-Type: text/markdown

# google-ai-scraper

MCP server for scraping Google AI Overviews via a Chrome extension relay. No API keys needed — uses your own Chrome browser.

## How it works

```
MCP Client (Claude Code, Cursor, etc.)
    ↕ stdio
MCP Server + embedded FastAPI (this package)
    ↕ HTTP polling
Chrome Extension (installed separately)
    → opens background tab on google.com
    → scrapes AI Overview → Markdown
    → posts result back
```

## Install

```bash
# Via uvx (recommended)
uvx google-ai-scraper

# Or pip
pip install google-ai-scraper
```

### Prerequisites

1. **Chrome** with the [Google AI Overview Scraper extension](https://github.com/balakumardev/google-ai-scraper) installed
2. **Python 3.10+**

## MCP Client Configuration

### Claude Code

Add to your project's `.mcp.json` or run `claude mcp add`:

```json
{
  "mcpServers": {
    "google-ai-scraper": {
      "command": "uvx",
      "args": ["google-ai-scraper"]
    }
  }
}
```

### Claude Desktop

Add to `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "google-ai-scraper": {
      "command": "uvx",
      "args": ["google-ai-scraper"]
    }
  }
}
```

### Cursor

Add to `.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "google-ai-scraper": {
      "command": "uvx",
      "args": ["google-ai-scraper"]
    }
  }
}
```

## MCP Tools

| Tool | Params | Description |
|------|--------|-------------|
| `search` | `query` | Search Google AI Overview. Returns markdown + citations + thread_id |
| `follow_up` | `query`, `thread_id` | Continue a conversation in an existing thread |
| `health` | — | Check server + extension connectivity |

## Options

```
google-ai-scraper [--sse] [--no-server] [--port PORT]
```

| Flag | Default | Description |
|------|---------|-------------|
| `--sse` | off | Use SSE transport instead of stdio |
| `--no-server` | off | Don't start embedded FastAPI (if running separately) |
| `--port` | 15551 | FastAPI server port |

## Environment Variables

| Variable | Default | Description |
|----------|---------|-------------|
| `GOOGLE_AI_SCRAPER_URL` | `http://127.0.0.1:15551` | FastAPI server URL |

## License

MIT
