feat: implement cli/mcp for browser session management - #3
Conversation
…h --run, session management lock, headful mode
There was a problem hiding this comment.
Pull request overview
This PR implements comprehensive CLI/MCP functionality for browser session management in the Aluvia Python SDK. It adds a JSON-first command-line interface for AI agents, an MCP (Model Context Protocol) server for integration with AI frameworks, automatic block detection and unblocking capabilities, and session management with lock files.
Changes:
- Added CLI with commands for session management, account operations, and geo-targeting via
aluviaandaluvia-sdkbinaries - Implemented MCP server (
aluvia-mcppackage) exposing 10 tools for AI agent frameworks (Claude Desktop, Claude Code, Cursor, etc.) - Added block detection engine with weighted scoring system (0.0-1.0) to detect 403s, CAPTCHAs, WAF challenges, and automatically unblock by routing through proxies
- Implemented session management with lock files, daemon mode, and CDP (Chrome DevTools Protocol) connection support via
connect()function - Added browser automation features including IP rotation, geo-targeting, and dynamic proxy routing rules
- Version bumped from 1.1.0 to 1.2.0
Reviewed changes
Copilot reviewed 32 out of 41 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
aluvia_sdk/bin/*.py |
CLI implementation with session, account, geos commands and daemon mode |
aluvia_sdk/session/lock.py |
Lock file management for session coordination |
aluvia_sdk/client/block_detection.py |
Block detection engine with weighted scoring |
aluvia_sdk/client/aluvia_client.py |
Integration of block detection and CDP support |
aluvia_sdk/connect.py |
Connect to running sessions via CDP |
aluvia_mcp/aluvia_mcp/*.py |
MCP server implementation with 10 tools |
pyproject.toml |
SDK package configuration with new scripts |
aluvia_mcp/pyproject.toml |
Separate MCP package configuration |
test_cli.py, test_block_detection.py |
Manual test scripts for new features |
docs/*.md, skills/*/SKILL.md |
Documentation for CLI, MCP, and skill integrations |
.github/workflows/*.yml |
CI/CD updates for SDK and MCP testing |
examples/block_detection_example.py |
Example demonstrating block detection usage |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 34 out of 43 changed files in this pull request and generated 18 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.