Black FridaySpecial - USA & Europe - 100 MBPS: $999.00 instead of $2,000.00. Coupon: BLACKFRIDAY, until November 27.See the plan
WeProxy
Guide

Country-Level Price and SERP Checks with Claude and Cursor: WeProxy MCP Guide

11 min read

With the WeProxy AI Access MCP server, the agent in Claude Code or Cursor gets country or state proxies via get_proxies, writes and runs a Python/Playwright script, and tabulates price, currency and stock differences. Sticky sessions, language consistency, SERP check limits and quota tracking.

Key takeaways

  • The WeProxy AI Access MCP server does not open pages; it generates proxy lines, reports quota and usage, and manages the whitelist. Pages are opened by the Python or Playwright code the agent writes and runs.
  • For a country-level price check, get_proxies returns a sticky line per country (country, plus state if needed; sticky_minutes 1–1440, default 30), and each country is opened in its own browser context.
  • Proxy country, Accept-Language header and time zone should point to the same country; in Playwright, locale and timezone_id handle this, while a rotating session can mix up currencies.
  • Search engines’ terms of service usually restrict automated queries, and official APIs exist; keep proxy-based SERP checks to low-volume verification and stop the script on a CAPTCHA.
  • Generating lines is free and only transferred data counts against quota; get_quota and get_usage track traffic, and blocking images and fonts reduces it.

Once the WeProxy AI Access MCP server is connected to Claude Code or Cursor, a country-level price check takes three steps: the agent calls get_proxies to get a proxy line for each country (and state, if needed), writes a Python or Playwright script that uses those lines, then runs the script and returns the results as a table. The MCP server does not open pages itself. It generates proxy lines, reports quota and usage, and manages the IP whitelist. The page is opened by the code the agent writes and runs.

This setup suits e-commerce, pricing and SEO teams that need to see which price, currency and stock status a product shows in different markets. Instead of writing the script from scratch, you describe the task in plain language; the agent fetches the proxies, writes the code and fixes it when something fails. WeProxy AI Access currently works only with Premium Rotating Residential orders; support for other products is in preparation.

How do you set up WeProxy AI Access?

Open your Premium Rotating Residential order in the customer panel and click "Create API key" on the "AI (MCP) / API" tab. The key starts with wpk_ and is tied to a single order. In Claude Code, one command adds the server:

claude mcp add --transport http weproxy https://mcp.weproxy.io/mcp \
  --header "Authorization: Bearer wpk_YOUR_KEY"

In Cursor, the same URL and header go into mcp.json. The Claude Desktop setup through the mcp-remote bridge, the REST endpoints and the error codes are covered step by step in the mcp.weproxy.io documentation. If you do not have an order yet, you can test the workflow with the 1 GB free trial.

How does a country-level price check work?

Two separate layers run behind the agent. The MCP layer supplies proxy details, and the code layer opens the page. Keeping this split in mind makes it easier to follow what the agent is doing and to look for errors in the right place.

StepWhat happensTool or code involved
1Order status and proxy host are checkedget_order_info
2Remaining quota is readget_quota
3A sticky proxy line is fetched for each countryget_proxies (country, session, sticky_minutes, format)
4A script that opens the page is writtenPython / Playwright code written by the agent
5The script runs and reads price and stockThe client’s command execution tool
6Results go into a table and traffic is checkedget_usage

Generating lines with get_proxies is free. Only data actually transferred through the proxy counts against your quota. So the agent requesting lines a few times costs nothing; cost depends on how many pages the script opens and how heavy those pages are.

In a chat client that cannot run commands, steps 4 and 5 do not happen. The agent gives you the proxy lines and the script, and you run the script yourself.

Example: comparing prices from the US, Germany and Turkey

Suppose you ask Claude Code: "Compare the price of this product page from the US, Germany and Turkey: https://shop.example.com/product/12345. Use a 10-minute sticky proxy for each country and put the result in a table."

The agent first calls get_proxies three times. For Germany the parameters are country: "de", session: "sticky", sticky_minutes: 10, format: "http_url", count: 1. The returned line has the same format as the US example in the documentation:

http://USER-region-US-sid-AbCd1234-t-10:[email protected]:1000

To send the same request from your own code, use the REST equivalent, POST /v1/proxies:

curl -X POST https://mcp.weproxy.io/v1/proxies \
  -H "Authorization: Bearer $WEPROXY_KEY" \
  -H "Content-Type: application/json" \
  -d '{"country": "de", "session": "sticky", "sticky_minutes": 10, "format": "http_url", "count": 1}'

The agent then puts the lines into environment variables (PROXY_US, PROXY_DE, PROXY_TR) and writes a script similar to the one below. It opens a separate Playwright context for each country, sets the language and time zone for that country, and blocks images and fonts to save traffic. The price is read from the page’s Product JSON-LD data:

import json
import os
import time
from urllib.parse import unquote, urlsplit

from playwright.sync_api import sync_playwright

URL = "https://shop.example.com/product/12345"

# Lines come from get_proxies (format: http_url) and are stored in environment variables.
TARGETS = {
    "US": {"proxy": os.environ["PROXY_US"], "locale": "en-US", "tz": "America/New_York"},
    "DE": {"proxy": os.environ["PROXY_DE"], "locale": "de-DE", "tz": "Europe/Berlin"},
    "TR": {"proxy": os.environ["PROXY_TR"], "locale": "tr-TR", "tz": "Europe/Istanbul"},
}


def playwright_proxy(line):
    u = urlsplit(line)
    return {
        "server": f"{u.scheme}://{u.hostname}:{u.port}",
        "username": unquote(u.username or ""),
        "password": unquote(u.password or ""),
    }


def is_product(item):
    kind = item.get("@type")
    return kind == "Product" or (isinstance(kind, list) and "Product" in kind)


def read_offer(page):
    for raw in page.locator('script[type="application/ld+json"]').all_text_contents():
        try:
            data = json.loads(raw)
        except json.JSONDecodeError:
            continue
        items = data if isinstance(data, list) else data.get("@graph", [data])
        for item in items:
            if not isinstance(item, dict) or not is_product(item):
                continue
            offer = item.get("offers") or {}
            if isinstance(offer, list):
                offer = offer[0] if offer else {}
            return {
                "price": offer.get("price") or offer.get("lowPrice"),
                "currency": offer.get("priceCurrency"),
                "stock": str(offer.get("availability", "")).rsplit("/", 1)[-1],
            }
    return {"price": None, "currency": None, "stock": None}


def skip_heavy(route):
    if route.request.resource_type in ("image", "media", "font"):
        return route.abort()
    return route.continue_()


rows = []
with sync_playwright() as p:
    browser = p.chromium.launch()
    for country, cfg in TARGETS.items():
        context = browser.new_context(
            proxy=playwright_proxy(cfg["proxy"]),
            locale=cfg["locale"],
            timezone_id=cfg["tz"],
        )
        context.route("**/*", skip_heavy)
        page = context.new_page()
        response = page.goto(URL, wait_until="domcontentloaded", timeout=60000)
        status = response.status if response else None
        rows.append({"country": country, "status": status, **read_offer(page)})
        context.close()
        time.sleep(5)  # Short pause so the target site does not get back-to-back requests
    browser.close()

print(f"{'Country':<9}{'HTTP':<6}{'Price':<12}{'Currency':<10}Stock")
for r in rows:
    print(f"{r['country']:<9}{r['status']!s:<6}{r['price']!s:<12}{r['currency']!s:<10}{r['stock']}")

The agent runs the script, reads the output and turns it into a table. On sites without JSON-LD it has to read the price from a CSS selector; to find one, it can save the page HTML once and inspect it. Playwright settings are explained in detail in the Playwright and Puppeteer proxy guide, and browserless requests and httpx examples are in How to Use a Proxy in Python.

Knowing where each column in the result table comes from helps you read the differences correctly:

ColumnSourceHow to read it
HTTPpage.goto() responseWith any code other than 200, the price column is not reliable
PriceJSON-LD offers.priceWhether tax is included may be stated separately on the site
CurrencyJSON-LD offers.priceCurrencyIf it does not match the country, the site may rely on a cookie or language setting
StockJSON-LD offers.availabilityValues such as InStock and OutOfStock can differ by country

Why do sticky sessions and language settings need to match?

Many stores detect the country from the IP on the first request and then store currency and language in a cookie. In a rotating session each request may leave from a different IP, so the main document can come from one country and the API call that loads the price from another. The Germany row then shows US dollars. A sticky session keeps all requests for one country on the same IP and prevents this mix-up. On Premium Rotating Residential the sticky duration can be set from 1 to 1440 minutes; the API default is 30 minutes. For a single-page check, 5–10 minutes is enough. Which session type fits which task is covered in the sticky vs rotating guide.

On the language side, three values should point to the same country: the proxy country, the Accept-Language header and the browser time zone. In Playwright, the locale parameter sets both navigator.language and the Accept-Language header, and timezone_id sets the time zone. With an HTTP client such as requests, add the header yourself:

headers = {"Accept-Language": "de-DE,de;q=0.9"}

An Accept-Language: tr-TR header sent through a German IP leads some sites to show a Turkish interface and a different price display. Telling the agent "use each country’s language and time zone" sets this up from the start. Each country should also get a fresh context, so cookies from the previous country are not carried over.

When do you need state or region targeting?

In large markets such as the US, delivery options, stock and some promotions can vary by state. In that case the agent first calls list_states to get valid region names for the country, then adds the state field to the get_proxies call (for example "New York"). Take the region name from the list; a hand-typed value that is not on the list can return a 400 error.

Not every task needs region targeting. To see currency and language differences at country level, country is enough. The proxy geo-targeting guide explains when state, city and ASN targeting make sense.

What should you watch for in SERP checks?

The same workflow can show how a search result looks in different countries: the agent gets a country proxy, writes a script that opens the results page with that country’s language settings and returns the rankings as a table. There is a limit here that price checks do not have. Search engines’ terms of service usually restrict automated queries, and the major search engines offer official APIs for this kind of work. For regular, high-volume rank tracking, those APIs, or the search engine’s webmaster tools for your own site, are the right source.

Keep proxy-based SERP checks to low-volume tasks, such as manually verifying local results for a few keywords. In practice:

  • Keep the number of queries low; add delays between requests and do not run them in parallel.
  • The script should stop when a verification page or CAPTCHA appears. Do not ask the agent to get past it; that means going outside the terms of service.
  • Open the results page with country and language settings; otherwise you will see personalized results or results for another region.

How SEO teams use proxies is covered on the SEO proxy page.

How do you track traffic and quota?

A product page opened in a browser can weigh several megabytes with images, scripts and API calls. For three countries and one page that is a small figure; when the same script runs daily for hundreds of products, quota drops quickly. The agent tracks quota with two tools:

  • get_quota: returns remaining, used and total GB. Calling it before a long job shows whether the quota will cover it.
  • get_usage: returns daily GB usage for the day, week, month (default), 3months or 6months period.

The most effective way to cut traffic is to download only what the script needs. Blocking images, media and fonts is already in the example above. If the price comes from a JSON endpoint, querying that endpoint with requests uses less data than opening the page in a browser.

On the API side there is a limit of 120 calls per minute per key; proxy traffic does not count toward it. If the limit is exceeded, 429 is returned and the client waits for the time in the Retry-After header. A single request can return up to 1000 proxy lines. Planning price monitoring for sales periods is covered in the Black Friday price tracking guide.

Example prompts: what to ask and which tool is called

What you ask the AITool calledOutput
"How much proxy quota do I have left?"get_quotaRemaining, used and total GB
"Compare the price of this product page from the US, Germany and Turkey."get_proxies (3 countries, sticky) + the agent’s scriptTable of country, HTTP code, price, currency and stock
"Check the stock status of this page from California and New York."list_states, get_proxies (state) + scriptStock table by state
"Give me 5 sticky proxies from Germany for 10 minutes."get_proxies5 proxy lines
"Look at the top results for this keyword in Germany and Turkey, keep the query count low."get_proxies + the agent’s scriptShort result list per country
"How much traffic did I use this week?"get_usage (period: week)Daily GB usage
"Add my server IP to the whitelist: 203.0.113.10"add_whitelist_ipUpdated whitelist

The more specific the request, the fewer attempts the agent makes. Stating the country codes, sticky duration, fields to read (price, currency, stock) and output format in the prompt reduces unnecessary page loads and traffic.

Compliance and key security

Treat the API key like a password. Do not put it in scripts or prompt text; keep it in the WEPROXY_KEY environment variable. The proxy lines the agent generates also contain a username and password. If you have them written to a .env file, keep that file out of version control. If the key leaks, use "Regenerate key" in the panel; the old key stops working immediately. If the proxy account is renewed after buying extra quota, old lines may stop working. In that case call get_proxies again; the key stays the same.

When collecting price and stock data, follow the target site’s terms of service and its robots.txt file, and keep the request rate at a level that does not add load to the site. Permitted and prohibited uses of WeProxy services are listed on the acceptable use page. For product details and packages, see the Premium Rotating Residential page.

Frequently asked questions

Does the WeProxy MCP server read prices itself?

No. The WeProxy AI Access MCP server generates proxy lines, returns quota and usage data, and manages the IP whitelist. The page is opened and the price read by the code that the agent in Claude Code or Cursor writes and runs with lines from get_proxies. In a chat client that cannot run code, the agent gives you the script and you run it.

Why use a sticky session for country-level price checks?

Many stores detect the country from the IP on the first request and store the currency in a cookie. In a rotating session the page and the price API can leave from different countries, showing the wrong currency. A sticky session keeps all requests for one country on the same IP. On Premium Rotating Residential the duration is 1–1440 minutes, with an API default of 30.

Is it fine to run SERP checks through a proxy?

Search engines’ terms of service usually restrict automated queries, and the major search engines offer official APIs. For regular rank tracking, use those APIs or, for your own site, webmaster tools. Keep proxy-based checks to low-volume verification of a few keywords and stop the script when a CAPTCHA appears.

How do you check prices or stock by US state?

The agent first calls list_states to get valid region names for the country, then adds the state field to the get_proxies call (for example "New York"). Take the region name from the list; a value not on the list can return a 400 error. For country-level currency and language differences, the country field is enough.

How much traffic do these checks use and how is it tracked?

Generating lines with get_proxies is free; only data transferred through the proxy counts against quota. A product page opened in a browser can weigh several megabytes. get_quota shows remaining GB and get_usage shows daily usage. Blocking images, media and fonts cuts traffic. Setup and REST details are in the mcp.weproxy.io documentation.

Get Started

Test Your Proxy Setup Today

Check connectivity with free tools or talk to sales to pick the right package.