<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Scraping Notes]]></title><description><![CDATA[Open-source tooling at NodeMaven. Notes on scraping Google, residential proxies and browser automation, with the numbers behind them.]]></description><link>https://alkaznodemaven.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/6afb05732e3c9f133839efc2/595270b9-dfaa-4866-9a7b-0be2f37b4d8a.png</url><title>Scraping Notes</title><link>https://alkaznodemaven.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Tue, 24 Nov 2026 12:31:11 GMT</lastBuildDate><atom:link href="https://alkaznodemaven.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Give your AI agent real Google rankings with a self-hosted MCP server]]></title><description><![CDATA[Plug Google's real results page into Claude, Cursor or Gemini CLI as an MCP tool: positions, AI Overview, any country, via your own proxy.]]></description><link>https://alkaznodemaven.hashnode.dev/give-your-ai-agent-real-google-rankings-with-a-self-hosted-mcp-server</link><guid isPermaLink="true">https://alkaznodemaven.hashnode.dev/give-your-ai-agent-real-google-rankings-with-a-self-hosted-mcp-server</guid><category><![CDATA[AI]]></category><category><![CDATA[mcp]]></category><category><![CDATA[webscraping ]]></category><category><![CDATA[Python]]></category><category><![CDATA[SEO]]></category><dc:creator><![CDATA[Alexandr Kazmin]]></dc:creator><pubDate>Mon, 16 Nov 2026 13:53:30 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6afb05732e3c9f133839efc2/92b7eed0-4b6b-47f4-add9-ceb553e7698c.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Most agents can already "search the web". What they get back is a handful of sources picked by their own search provider, not what Google shows for a query: no positions, no AI Overview, no "People also ask", and usually little control over which country the results are for. For SEO work, rank checks or competitor research, that is the part you need.</p>
<p>This walkthrough plugs Google's actual results page into Claude Code, Cursor, Gemini CLI or Claude Desktop as a tool, using <a href="https://github.com/nodemaven/serpmaven">SERP Maven</a>, an open-source Google scraper with a built-in MCP server. It runs on your machine through your residential proxy, so there is no per-search bill. Setup takes about five minutes.</p>
<h2>What you need</h2>
<ul>
<li>Python 3.10+, or <a href="https://docs.astral.sh/uv/">uv</a> (it brings its own Python).</li>
<li>A residential proxy with <strong>sticky sessions</strong>. Any provider works. We build SERP Maven at NodeMaven, so NodeMaven proxies have a one-command login; others take a proxy URL.</li>
</ul>
<h2>1. Install</h2>
<pre><code class="language-bash">uv tool install serpmaven
serpmaven install
</code></pre>
<p>The second command downloads the browser SERP Maven drives, about 150 MB, once per machine. Do it now: an MCP server cannot stop and ask you about a download.</p>
<h2>2. Save your proxy login</h2>
<p>For NodeMaven, enter the proxy username and password from the dashboard:</p>
<pre><code class="language-bash">serpmaven login
</code></pre>
<p>For any other provider, give the proxy URL with <code>{session}</code> where the provider expects a session id in the username:</p>
<pre><code class="language-bash">serpmaven login --proxy "http://USER-session-{session}:PASS@gate.example.com:7000"
</code></pre>
<p>The login is stored in a file only your user can read. The MCP server picks it up from there, so no password goes into your editor's config.</p>
<h2>3. Try one search from the terminal</h2>
<pre><code class="language-bash">serpmaven search "best running shoes" --country us
</code></pre>
<p>The first search takes a few minutes. SERP Maven opens a real Chrome window and browses a few ordinary pages on the first proxy IP before it asks Google anything, because a fresh browser on a fresh IP is the thing Google refuses most. Later searches take seconds, and new proxy IPs start from the cookies Google already accepted. The run ends with a summary of pages served and traffic used.</p>
<h2>4. Connect it to your agent</h2>
<p><strong>Claude Code.</strong> One command:</p>
<pre><code class="language-bash">claude mcp add google-search -- serpmaven mcp --country us --prewarm
</code></pre>
<p><strong>Cursor.</strong> Add this to <code>~/.cursor/mcp.json</code>:</p>
<pre><code class="language-json">{
  "mcpServers": {
    "google-search": {
      "command": "serpmaven",
      "args": ["mcp", "--country", "us", "--prewarm"]
    }
  }
}
</code></pre>
<p><strong>Gemini CLI.</strong> The repository is also a Gemini CLI extension:</p>
<pre><code class="language-bash">gemini extensions install https://github.com/nodemaven/serpmaven
</code></pre>
<p><strong>Claude Desktop.</strong> The same JSON block goes into Settings → Developer → Edit Config. Restart Claude Desktop and the <code>google_search</code> tool appears in the tools menu:</p>
<img src="https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/9n09o13pnlcapr4e28ma.png" alt="Claude Desktop asking to run google_search with the query, country, language and links" style="display:block;margin:0 auto" />

<p>If a client says it cannot find <code>serpmaven</code>, it was started without your shell's PATH. Put the full path from <code>which serpmaven</code> (<code>where serpmaven</code> on Windows) into <code>command</code>.</p>
<p><code>--prewarm</code> warms the first proxy IP as soon as the server starts. That takes three to five minutes, longer than some clients wait for a tool, so give it those minutes after a restart before the first question. Later searches take under ten seconds. With NodeMaven, <code>--country</code> picks the country of the proxy IP; the tool's <code>gl</code> argument sets the country Google answers for on each call.</p>
<h2>What the agent gets back</h2>
<p>The server exposes one tool, <code>google_search(query, pages, hl, gl, links)</code>:</p>
<ul>
<li><code>query</code> - the search;</li>
<li><code>pages</code> - result pages to fetch, about 10 results each (default 1);</li>
<li><code>hl</code>, <code>gl</code> - interface language and country, e.g. <code>de</code> and <code>de</code>;</li>
<li><code>links</code> - how many top results get their full URL (default 5); fewer answers sooner.</li>
</ul>
<p>Ask your agent something like <em>"Who ranks on Google in the US for 'best python web scraping library'?"</em> and the tool returns compact JSON with Google's own order. A real answer, trimmed:</p>
<pre><code class="language-json">{
  "results": [
    {
      "position": 1,
      "title": "Scrapy, a fast high-level web crawling &amp; scraping ...",
      "link": "https://github.com/scrapy/scrapy",
      "snippet": "Scrapy is a web scraping framework to extract structured data from websites..."
    },
    {
      "position": 2,
      "title": "Advanced Web Scraping Tutorial! (w/ Python Beautiful Soup ...",
      "link": "https://www.youtube.com/watch?v=DcI_AZqfZVc"
    },
    {
      "position": 3,
      "title": "High Level Web Scraping Library for Python",
      "link": "https://www.reddit.com/r/Python/comments/1iy78rw/high_level_web_scraping_library_for_python/",
      "snippet": "Hi, I started working on an open source Python library that handles common web scraping tasks..."
    }
  ],
  "ai_overview": "There is no single best Python web scraping library because the right choice depends on your target site and scale. For small static pages, Beautiful Soup paired with Requests or HTTPX is the easiest starting point...",
  "related_searches": ["Best python web scraping library free", "Best python web scraping library github", "Web scraping tools"]
}
</code></pre>
<p>Results past the first five carry the site instead of the full link (raise <code>links</code> if the agent needs them). Organic results and related searches come with every page; "People also ask", Google's AI Overview and the map pack (name, rating, address, hours) come when Google shows them.</p>
<h2>What it costs</h2>
<p>The proxy is the only cost. The first IP's warm-up uses about 60 MB once. After that a search is about 0.4 MB, so 1000 searches are roughly 0.4 GB of proxy traffic. Keep <code>pages</code> at 1 unless you need more: every page is traffic on your plan.</p>
<p>New to NodeMaven? <a href="https://dashboard.nodemaven.com/accounts/signup/?utm_source=hashnode&amp;utm_medium=article&amp;utm_campaign=serpmaven_mcp">Sign up</a> and enter <strong>GOOGLENM</strong> for 2 GB of free traffic.</p>
<h2>When something goes wrong</h2>
<ul>
<li><strong>The server shows as failed or disconnected</strong> in your client: it stops at start when there is no saved proxy login or no browser. Run <code>serpmaven login</code> and <code>serpmaven install</code> once, then restart the client.</li>
<li><strong>The first search times out</strong> right after the client starts: the proxy IP is still warming up. Wait a few minutes and ask again; the warm-up keeps going in the background.</li>
<li><strong>A captcha or a block is never read as "no results".</strong> SERP Maven drops the proxy IP Google refused and asks again on another one; a search that still fails comes back with an error, so the agent can tell "Google refused" from "nothing found".</li>
<li><strong>Results for a different query</strong> are Google's quiet way of turning a scraper away. When a proxy IP starts answering like that, SERP Maven drops it and asks the query again on a fresh one.</li>
<li><strong>On a server without a screen,</strong> run it under <code>xvfb-run -a</code>, or use the Docker image <code>ghcr.io/nodemaven/serpmaven</code>.</li>
<li><code>serpmaven doctor</code> starts the browser on a blank page and reports what a website would see. Run it first if searches keep failing.</li>
</ul>
<h2>The same thing without an agent</h2>
<p>The MCP server is one of four ways to run SERP Maven. The others:</p>
<ul>
<li><code>serpmaven search -f queries.txt -o results.jsonl</code> for a batch;</li>
<li><code>serpmaven serve</code> for a local HTTP API with SERP-API-style JSON;</li>
<li><code>from serpmaven import Scraper</code> in Python.</li>
</ul>
<p>Code, options and issues: <a href="https://github.com/nodemaven/serpmaven">github.com/nodemaven/serpmaven</a>.</p>
]]></content:encoded></item></channel></rss>