Skip to main content

Aluvia MCP server - Model Context Protocol tools for browser sessions and account management

Project description

Aluvia MCP Server

Unblockable browser automation for AI agents.

PyPI version Python versions license MCP compatible


Stop getting blocked. The Aluvia MCP server exposes browser session management, geo-targeting, and account operations as Model Context Protocol tools for AI agents. Route traffic through premium US mobile carrier IPs and bypass 403s, CAPTCHAs, and WAFs that stop other tools. Works with Claude Desktop, Claude Code, Cursor, VS Code, and any MCP-compatible client.

Table of Contents


Quick Start

pip install aluvia-mcp
export ALUVIA_API_KEY="your-api-key"
aluvia-mcp

Get your API key at dashboard.aluvia.io. The server runs on stdio (stdin/stdout JSON-RPC) — MCP clients spawn it and communicate over stdio.


Requirements

  • Python 3.10+
  • Aluvia API key — sign up at dashboard.aluvia.io
  • Playwright (optional) — required for browser sessions: pip install playwright && playwright install chromium

Installation

pip install aluvia-mcp

Or from source:

git clone https://github.com/aluvia-connect/sdk-python.git
cd sdk-python/aluvia_mcp
pip install -e .

For browser session tools, install Playwright:

pip install playwright
playwright install chromium

Set your API key:

export ALUVIA_API_KEY="your-api-key"

Client Configuration

Claude Desktop

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "aluvia": {
      "command": "aluvia-mcp",
      "env": {
        "ALUVIA_API_KEY": "your-api-key"
      }
    }
  }
}

Claude Code (VS Code Extension)

Add to your VS Code settings (.vscode/settings.json or User Settings):

{
  "mcp.servers": {
    "aluvia": {
      "command": "aluvia-mcp",
      "env": {
        "ALUVIA_API_KEY": "your-api-key"
      }
    }
  }
}

Cursor

Add to your Cursor MCP settings:

{
  "mcpServers": {
    "aluvia": {
      "command": "aluvia-mcp",
      "env": {
        "ALUVIA_API_KEY": "your-api-key"
      }
    }
  }
}

Generic MCP Client

Any MCP-compatible client can use the server by spawning it with stdio transport:

import subprocess
import json

proc = subprocess.Popen(
    ["aluvia-mcp"],
    stdin=subprocess.PIPE,
    stdout=subprocess.PIPE,
    env={"ALUVIA_API_KEY": "your-api-key"}
)

# Send JSON-RPC requests to proc.stdin
# Read JSON-RPC responses from proc.stdout

Available Tools

Session Management

  • session_start — Start a browser session with Aluvia smart proxy
  • session_close — Close one or all running sessions
  • session_list — List all active sessions
  • session_get — Get detailed session info (CDP URL, proxy config, block detection state)
  • session_rotate_ip — Rotate IP address for a session
  • session_set_geo — Set or clear target geographic region
  • session_set_rules — Add or remove proxy routing rules

Account Management

  • account_get — Get account info (plan, balance)
  • account_usage — Get usage statistics for a date range

Geo-Targeting

  • geos_list — List available geographic regions

Use Cases

1. AI Agent Web Scraping

AI agents need to scrape data from websites that block automated traffic. Aluvia routes requests through mobile IPs, making them appear as real users.

Example workflow:

  1. Agent calls session_start with --auto-unblock to launch a browser
  2. Agent navigates to target websites
  3. If blocked, Aluvia detects it and automatically reroutes through mobile IPs
  4. Agent extracts data successfully
  5. Agent calls session_close when done

2. Multi-Region Testing

Test how websites behave for users in different US regions.

Example workflow:

  1. Agent calls geos_list to see available regions
  2. Agent calls session_start and then session_set_geo with us_ca for California IPs
  3. Agent verifies location-specific content
  4. Agent calls session_set_geo with us_ny to switch to New York IPs
  5. Agent compares results

3. Dynamic Unblocking

Agent adapts to blocks in real-time without restarting.

Example workflow:

  1. Agent calls session_start without proxy rules (all traffic goes direct)
  2. Agent encounters a block on example.com
  3. Agent calls session_set_rules with "example.com" to add it to proxy rules
  4. Agent retries the request — now routed through Aluvia
  5. Request succeeds

Why Aluvia

The Problem: Websites block datacenter IPs (AWS, GCP, Azure) because they're commonly used by bots. This breaks AI agents that need web access.

The Solution: Aluvia routes traffic through real US mobile carrier IPs — the same IPs used by millions of people on AT&T, T-Mobile, and Verizon. Websites can't distinguish these requests from legitimate mobile users.

Key Features:

  • Automatic block detection — detects 403s, CAPTCHAs, WAFs, and Cloudflare challenges
  • Auto-unblocking — when blocked, Aluvia reroutes through mobile IPs and reloads the page
  • Smart routing — only proxy sites that need it; everything else goes direct (saves cost and latency)
  • Runtime rule updates — add sites to proxy rules on the fly, no restarts
  • IP rotation — rotate IPs or target specific US regions at runtime
  • CDP debugging — get Chrome DevTools Protocol URLs for remote debugging

Links


License

MIT License — see LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aluvia_mcp-1.0.0.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aluvia_mcp-1.0.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file aluvia_mcp-1.0.0.tar.gz.

File metadata

  • Download URL: aluvia_mcp-1.0.0.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for aluvia_mcp-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a5bb8137b1c65852ac72f9641f5d5d36b52867553c7403cc3cf1cffc9664fc43
MD5 7c737407b79076806dbe859574e5cb0f
BLAKE2b-256 32760c03ca99ffc6c1ae5476c867b9fda536e488510ae7fdb130e60f16606866

See more details on using hashes here.

File details

Details for the file aluvia_mcp-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: aluvia_mcp-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for aluvia_mcp-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ffa638eab28a24dae4804d1e2d9b02c5eea523f9fa5cfb2d01622810ec77813b
MD5 e7378bd8e70ec1c89c5868b5ce444546
BLAKE2b-256 d0560f9039e4ae72a04a74a76a694652eef6e734c1c67459a791eeeb4cc8ed66

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page