agproxy
Pay-per-call residential proxy traffic and raw fetch for AI agents, with country targeting and sticky sessions. No API key, paid per call with x402 stablecoins.
Hosted MCP Server
npx add-mcp 'https://agproxy.shveik.dev/mcp'Installs into Claude Code, Codex, Cursor and more
Documentation
What can I buy?
Two ways to use a residential IP. Buy traffic and point your tools at it, or send one request and read the answer.
proxy packs
A proxy login for your agent
Pay for gigabytes, get a host, a port, a username and a password after payment. Use it with curl, a browser, a crawler or any HTTP client that takes a proxy. Choose the country, rotate the IP on every connection or keep one with a session tag.
POST /x402/proxy
or POST /mpp/proxy
{"gb":1}
{
"host": "agproxy.shveik.dev",
"port": 443,
"username": "ap_9f2c…",
"password": "…",
"cap_bytes": 1000000000
}
fetch
One request, no proxy to run
Send a URL and get the raw response back as JSON: status, headers and body, fetched from a residential IP in the country you pick. You pay for the megabytes that came back.
POST /x402/fetch
or POST /mpp/fetch
{"max_mb":1,"url":"https://example.com/"}
{
"status": 200,
"final_url": "https://example.com/",
"body": "<!doctype html>…",
"bytes": 1256
}
Try also agdata: Need the page rendered, unblocked and returned as Markdown, or structured data from social, maps, search, news and jobs? agdata does that, paid the same way.
Using a pack
A pack is an ordinary HTTP proxy. The username carries the options, so the same login does every job.
| Username | What it does |
|---|---|
ap_ID | A new exit IP for every connection, anywhere. |
ap_ID-country-DE | Exit in a country: any two-letter code, such as US, GB, JP, BR. |
ap_ID-session-job1 | Keep one exit IP for every connection that uses the tag job1 (letters, digits, underscore). |
ap_ID-country-US-session-job1-ttl-60 | Options combine; ttl is the session length in minutes, 1 to 180. |
any HTTP clientshell · python
$ curl -x http://ap_ID-country-JP:PASSWORD@agproxy.shveik.dev:443 https://example.com/
$ curl -x http://ap_ID:PASSWORD@agproxy.shveik.dev:443 http://usage.agproxy/
{"used_bytes":1256,"cap_bytes":1000000000,"remaining_bytes":999998744,...}
# python
proxies = {"https": "http://ap_ID-session-job1:PASSWORD@agproxy.shveik.dev:443"}
requests.get("https://example.com/", proxies=proxies)
Traffic is counted in both directions through the upstream, tunnel set-up included. A pack ends at its byte cap or after 90 days; http://usage.agproxy/ through the proxy shows what is left and costs nothing. Private and local addresses are not reachable.
MCP server
MCP Every endpoint is also an MCP tool
The same routes are also an MCP server (streamable HTTP, stateless): one tool per route, paid with x402 inside the tool call. Point a client at https://agproxy.shveik.dev/mcp: it lists the tools and answers a call with the quote. Each tool takes the same JSON as its endpoint, and the answer carries the settlement receipt.
any MCP client that can payshell
$ mcpc connect https://agproxy.shveik.dev/mcp @agproxy --x402 exact
$ mcpc @agproxy tools-list
$ mcpc @agproxy tools-call fetch url:=https://example.com/ country:=DE
Listing the tools and getting a quote works in any MCP client. Paying needs a client that can sign x402 payments: mcpc --x402, Cloudflare Agents, or the x402 MCP SDK. Claude Desktop, Claude Code and Cursor cannot sign payments themselves. Streamable HTTP, stateless, latest and earlier protocol versions.
Two protocols, every endpoint
Pay the way your agent already does. x402 on Base and Polygon or MPP on Base.
x402 · exact
The 402 carries a PAYMENT-REQUIRED header. Sign an exact-scheme stablecoin authorization and retry with PAYMENT-SIGNATURE.
Endpoints: /x402/<name>
MPP · evm charge
The 402 carries a WWW-Authenticate: Payment challenge (Machine Payments Protocol). Sign it and retry with Authorization: Payment.
Endpoints: /mpp/<name>
Both paths are the same endpoint with the same price: an unpaid request gets both challenges in one 402, and either credential is accepted on either path.
Why agents use it
No account, no key An unpaid request returns the quote, so you see the price before you sign anything. The login arrives with the payment receipt.
Metered to the byte The pack ends exactly at its cap, and an open connection is closed there. You are never billed past what you bought.
A failed call is free A fetch that fails on the way is not charged; one that delivers less than you reserved is refunded for the difference.
Country and sticky sessions Pick the exit country in the username and keep one IP across steps with a session tag.
How it works
- POST a small JSON body. You get
402with an x402PAYMENT-REQUIREDheader and an MPPWWW-Authenticate: Paymentchallenge that quote the price for exactly what you asked. - Sign either one with a stablecoin authorization (EIP-3009): x402
exactor MPPevm/authorization. - Retry with
PAYMENT-SIGNATUREorAuthorization. A pack answers with its proxy login; a fetch answers with the raw response. The payment settles only once the call has succeeded.
All endpoints
**POST** /{x402|mpp}/proxyResidential proxy pack**POST** /{x402|mpp}/fetchRaw fetch from a residential IP