Metadata-Version: 2.4
Name: unblockapi-mcp
Version: 1.0.0
Summary: MCP server for UnblockAPI — captcha solving, browser rendering, temp email, SMS verification, screenshots, and web search for AI agents
Author-email: UnblockAPI <hello@unblockapi.com>
License: MIT
Project-URL: Homepage, https://unblockapi.com
Project-URL: Documentation, https://api.unblockapi.com/docs
Project-URL: Repository, https://github.com/unblockapi/unblockapi
Project-URL: Issues, https://github.com/unblockapi/unblockapi/issues
Keywords: mcp,model-context-protocol,captcha,browser-automation,ai-agent,claude,cursor,screenshot,web-scraping,temp-email,sms-verification,fastmcp
Classifier: Development Status :: 5 - Production/Stable
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: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Internet :: WWW/HTTP
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.28
Requires-Dist: mcp>=1.28

# UnblockAPI

<!-- mcp-name: io.github.unblockapi.server -->

**One API for everything AI agents can't do.** Captcha solving, browser rendering, temp email, SMS verification, screenshots, and web search — all through a single API key with flat dollar pricing.

[![Website](https://img.shields.io/badge/website-unblockapi.com-00d992)](https://unblockapi.com)
[![API Docs](https://img.shields.io/badge/docs-api.unblockapi.com-00d992)](https://api.unblockapi.com/docs)
[![MCP Server](https://img.shields.io/badge/MCP-native-00d992)](https://unblockapi.com/#quickstart)

---

## Why UnblockAPI?

AI agents are getting smarter, but the web was built for humans. Every autonomous agent hits the same walls:

| Roadblock | Your Agent | UnblockAPI |
|-----------|-----------|------------|
| Captchas | ❌ Can't solve | ✅ 40+ types, $0.10 |
| JS-only pages | ❌ Empty `<div>` | ✅ Headless Chromium, $0.05 |
| Email verification | ❌ No inbox | ✅ Temp inbox, $0.05 |
| SMS verification | ❌ No phone | ✅ Temp numbers, $0.50 |
| Visual checks | ❌ No eyes | ✅ Screenshots, $0.05 |
| Web search | ❌ No internet | ✅ DuckDuckGo, $0.05 |

**Six services, one API key, flat pricing.** No credits to convert, no tiers to track.

---

## Quick Start (30 seconds)

```bash
# 1. Get a free API key (no email required, 5 free calls)
curl -X POST https://api.unblockapi.com/api/v1/account/register/anonymous

# 2. Use it immediately
curl -X POST https://api.unblockapi.com/api/v1/screenshot \
  -H "Content-Type: application/json" \
  -H "X-API-Key: ub_YOUR_KEY" \
  -d '{"url": "https://example.com"}'

# 3. Solve a captcha
curl -X POST https://api.unblockapi.com/api/v1/captcha/solve \
  -H "Content-Type: application/json" \
  -H "X-API-Key: ub_YOUR_KEY" \
  -d '{"type":"recaptcha_v2","site_key":"SITE_KEY","site_url":"https://example.com"}'
```

[Full API documentation →](https://api.unblockapi.com/docs)

---

## Services

### 🤖 Captcha Solving — `POST /api/v1/captcha/solve`
40+ captcha types: reCAPTCHA v2/v3, hCaptcha, Turnstile, FunCaptcha, GeeTest, Cloudflare, and more. One flat price: **$0.10/solve**.

### 🌐 Browser Rendering — `POST /api/v1/browser/fetch`
Headless Chromium. Extract JS-rendered HTML or plain text from SPAs and dynamic sites. **$0.05/fetch**.

### 📧 Temp Email — `POST /api/v1/email/generate`
Disposable inboxes for account verification. Create, poll, and auto-destroy. **$0.05/inbox**.

### 📱 SMS Verification — `POST /api/v1/sms/number`
Rent temporary phone numbers to receive SMS codes. Supports Google, WhatsApp, Telegram, and more. **$0.50/number**.

### 📸 Screenshots — `POST /api/v1/screenshot`
Full-page PNG/JPEG captures including JS-rendered content. **$0.05/shot**.

### 🔍 Web Search — `POST /api/v1/search`
Structured search results via DuckDuckGo. **$0.05/search**.

---

## MCP Server — Native AI Agent Integration

UnblockAPI ships an MCP (Model Context Protocol) server with 11 tools. Claude Desktop, Cursor, and any MCP-compatible agent can call UnblockAPI as native tools — no HTTP integration needed.

```json
{
  "mcpServers": {
    "unblockapi": {
      "command": "python",
      "args": ["-m", "mcp_server.server"],
      "env": {
        "UNBLOCK_API_KEY": "ub_your_key",
        "UNBLOCK_API_URL": "https://api.unblockapi.com"
      }
    }
  }
}
```

**11 MCP tools:** `unblock_screenshot`, `unblock_browser_fetch`, `unblock_search`, `unblock_solve_captcha`, `unblock_email_generate`, `unblock_email_inbox`, `unblock_sms_number`, `unblock_sms_check`, `unblock_sms_wait`, `unblock_pricing`, `unblock_account`.

---

## Pricing

| Service | Cost | Details |
|---------|------|---------|
| Captcha Solve | $0.10 | Any of 40+ types |
| Browser Render | $0.05 | Headless Chromium, full JS/SPA |
| Temp Email | $0.05 | Create + read + destroy |
| SMS Temp Number | $0.50 | Rent number, receive codes |
| SMS Rent + Wait | $1.00 | Orchestrated one-shot flow |
| Screenshot | $0.05 | Full-page PNG/JPEG |
| Web Search | $0.05 | DuckDuckGo results |

**Deposit tiers with bonus calls:**
- $1 — no bonus
- $5 — +5 bonus calls
- $20 — +20 bonus calls *(best value)*
- $100 — +50 bonus calls

**First 5 calls free. No credit card required.** Pay with Stripe (cards, stablecoins) or x402 protocol.

---

## Integration Examples

### Python (httpx)
```python
import httpx

async def solve_captcha(site_key, url):
    async with httpx.AsyncClient() as client:
        r = await client.post(
            "https://api.unblockapi.com/api/v1/captcha/solve",
            json={"type": "recaptcha_v2", "site_key": site_key, "site_url": url},
            headers={"X-API-Key": "ub_YOUR_KEY"}
        )
        return r.json()["token"]
```

### LangChain Tool
```python
from langchain.tools import BaseTool
import httpx

class CaptchaSolver(BaseTool):
    name = "solve_captcha"
    description = "Solve reCAPTCHA/hCaptcha/Turnstile captchas"

    def _run(self, site_url, site_key, captcha_type="recaptcha_v2"):
        r = httpx.post(
            "https://api.unblockapi.com/api/v1/captcha/solve",
            json={"type": captcha_type, "site_key": site_key, "site_url": site_url},
            headers={"X-API-Key": "ub_YOUR_KEY"}
        )
        return r.json()["token"]
```

---

## Links

- **Website:** [unblockapi.com](https://unblockapi.com)
- **API Docs:** [api.unblockapi.com/docs](https://api.unblockapi.com/docs)
- **Blog:** [unblockapi.com/blog.html](https://unblockapi.com/blog.html)
- **Postman Collection:** [tmp/postman-collection.json](tmp/postman-collection.json)

---

Built for AI agents. By developers who got tired of integrating five different APIs.
