Most AI agents fail their first real-world task. Not because of bad code, but because of bad IPs.
You write a perfect script, test it locally, deploy it to the cloud, and... 403 Forbidden. Most websites trust residential and mobile connections but treat datacenter traffic (AWS, Vercel, etc.) as hostile bot traffic.
In this post, I'll show you how to give your AI agents "human" connectivity using the Aluvia SDK, and how to let them manage their own connectivity using the Model Context Protocol (MCP).
What is Aluvia?
Aluvia is a proxy service that routes your traffic through real mobile devices on Tier 1 US carriers. Unlike datacenter proxies, mobile IPs have high trust scores because they're used by regular people every day. The SDK and CLI make it easy to integrate this into your automation workflows.
The "Datacenter Problem"
Websites use IP reputation to filter traffic.
- Home/Mobile IP: "Probably a human. Let them in."
- Datacenter IP: "Probably a bot. Show a CAPTCHA or block them."
Aluvia solves this by routing your agent's traffic through a network of real mobile devices on Tier 1 US carriers.
The Developer Experience (CLI & SDK)
We designed the Aluvia SDK to be "infrastructure-as-code" for connectivity.
Installation
npm install @aluvia/sdk playwright
Basic Usage with Playwright
Instead of buying a proxy list and manually managing rotation, you spin up a session:
import { chromium } from 'playwright';
import { AluviaClient } from '@aluvia/sdk';
// 1. Initialize
const client = new AluviaClient({ apiKey: process.env.ALUVIA_API_KEY });
// 2. Start a connection
const connection = await client.start();
// 3. Launch browser (Pre-configured!)
// .asPlaywright() formats the proxy settings automatically
const browser = await chromium.launch({
proxy: connection.asPlaywright(),
});
const page = await browser.newPage();
await page.goto('https://ipconfig.io/json'); // Shows a mobile carrier IP!
// 4. Cleanup
await connection.close();
Next Level: Agent Autonomy with MCP
This is where it gets interesting. We built an MCP server as a separate package: @aluvia/mcp.
If you use an AI IDE like Cursor or an assistant like Claude Desktop, you can install the Aluvia MCP server. This exposes our tools directly to the LLM.
What does this enable?
- Self-Healing Agents: If the AI encounters a block, it can reason that it needs a new IP, call
session_rotate_ip, and retry. No custom error-handling logic needed. - Context-Aware Geolocation: You can say "Compare the prices of this product in California vs. New York." The AI can use
session_set_geoto switch location between requests.
The AI first calls session_start to spin up a browser, then uses these tools to control the session.
Available Tools
-
session_start- Start a browser with mobile IP -
session_close- Close sessions -
session_list- List active sessions -
session_rotate_ip- Get a fresh IP -
session_set_geo- Target a specific US state -
session_set_rules- Control which domains route through proxy -
account_get- Check your balance -
geos_list- List available regions
Configuration for Claude Desktop
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"aluvia": {
"command": "npx",
"args": ["-y", "@aluvia/mcp"],
"env": {
"ALUVIA_API_KEY": "your_key_here"
}
}
}
}
Now you can just type: "Start a browser session and check my IP location, then switch me to a Texas IP."
Conclusion
The future of agents isn't just about better models. It's about better capabilities. Giving your agent reliable access to the web is just as important as giving it memory or vision.
Ready to try it? Create a free account - no credit card required, and you get free bandwidth to start.
- Aluvia - Learn more about mobile proxies
- Documentation - CLI, SDK, and binding rules
- @aluvia/mcp on npm - MCP server package
Let me know if you have any questions about handling blocks or setting up the MCP server!
Top comments (0)