Metadata-Version: 2.4
Name: sessemi-mcp
Version: 0.1.0
Summary: MCP server for Sessemi — scrape anti-bot protected sites from AI agents
License: MIT
Project-URL: Homepage, https://sessemi.com
Project-URL: Documentation, https://sessemi.com/docs
Project-URL: Repository, https://github.com/sessemi/sessemi-mcp
Keywords: mcp,model-context-protocol,scraping,web-scraping,datadome,cloudflare,akamai,anti-bot,ai-agent
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Internet :: WWW/HTTP
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: sessemi>=1.1.0

# sessemi-mcp

MCP server that gives AI agents the ability to scrape websites protected by **Cloudflare**, **DataDome**, and **Akamai**.

Works with Claude Desktop, Cursor, Windsurf, Cline, and any MCP-compatible client.

Zero framework dependencies — implements MCP protocol directly. Only depends on the [`sessemi`](https://pypi.org/project/sessemi/) Python client.

## Install

```bash
pip install sessemi-mcp
```

Or run directly with `uvx`:

```bash
uvx sessemi-mcp
```

## Setup

Get a free API key at [app.sessemi.com](https://app.sessemi.com).

### Claude Desktop

Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS, `%APPDATA%\Claude\claude_desktop_config.json` on Windows):

```json
{
  "mcpServers": {
    "sessemi": {
      "command": "uvx",
      "args": ["sessemi-mcp"],
      "env": {
        "SESSEMI_KEY": "your_api_key"
      }
    }
  }
}
```

### Cursor

Add to `.cursor/mcp.json` in your project:

```json
{
  "mcpServers": {
    "sessemi": {
      "command": "uvx",
      "args": ["sessemi-mcp"],
      "env": {
        "SESSEMI_KEY": "your_api_key"
      }
    }
  }
}
```

## Tools

### `scrape`

Scrape a URL, bypassing anti-bot protection. Returns page content.

| Parameter | Type   | Description |
|-----------|--------|-------------|
| `url`     | string | Target URL (required) |
| `country` | string | Two-letter country code for geo-targeting (`FR`, `US`, `DE`). Auto-selects residential proxies. |
| `render`  | bool   | Force browser rendering for JS-heavy pages |
| `session` | string | Session name for cookie/IP persistence across requests |
| `headers` | string | Custom HTTP headers as JSON string |

### `credits`

Check your remaining credit balance, tier, and usage.

## Example

Ask Claude:

> "Scrape the Idealista listings page for Madrid apartments"

Claude will call the `scrape` tool with the URL and `country: "ES"`, get back the full HTML, and extract the data you need.

> "How many credits do I have left?"

Claude calls `credits` and reports your balance.

## How it works

Sessemi handles the hard parts automatically:

- **Cloudflare** — turnstile challenges, JS challenges, managed challenges
- **DataDome** — device checks, slider CAPTCHAs, interstitials
- **Akamai** — sensor validation, bot manager

Your AI agent sends a URL → Sessemi returns the page content. No browser config, no proxy setup, no CAPTCHA services.

## Links

- [Sessemi](https://sessemi.com) — web scraping API
- [Documentation](https://sessemi.com/docs)
- [Python client](https://github.com/sessemi/sessemi-python) — `pip install sessemi`
- [Get API key](https://app.sessemi.com)
