How to Build a Claude SEO Agent: Search Console, GA4, PageSpeed and Keyword Data via MCP
Most small teams pay for SEO tools they use at 10% of capacity. Here is how to wire Claude Code to Search Console, GA4, PageSpeed Insights, keyword data and a real browser, then run it as a weekly SEO agent.
Why Claude Changes the SEO Equation
A Claude SEO agent is Claude, usually running in Claude Code, connected to your real search data through MCP servers and scheduled to do the analysis an SEO would do each week: find keywords close to page one, audit the site, read competitor pages, and turn the findings into briefs and fixes.
Most businesses are paying for SEO tools they use at 10% of capacity. Ahrefs, Semrush and Screaming Frog are powerful platforms built for agencies managing dozens of clients. For the solo founder, small team or niche site operator, they are expensive and underused, and a large part of what people actually use them for can now be done by an agent working from first-party data.
Claude changes the equation because it does not just surface data. It interprets it, prioritizes it and connects it to action. Where traditional SEO software hands you a spreadsheet of 400 issues sorted by severity, Claude hands you a prioritized to-do list in plain English, with the reason each item matters and what to do about it. Connect it to Search Console, GA4, PageSpeed Insights and a real browser, and it becomes a working SEO analyst that runs on a schedule.
The cost is lower than most people expect. Anthropic lists Claude Pro at $20 a month and it includes Claude Code. The Search Console, Google Analytics and PageSpeed Insights APIs are free. The only line item that usually costs money is third-party keyword or rank data, and pay-as-you-go options like DataForSEO keep that small for a single site.
Connecting Search Console, GA4, PageSpeed and keyword data to Claude
What are the best tools for connecting Search Console and keyword research to Claude Code? The short answer: a community Search Console MCP server (AminForou's mcp-gsc is the most widely used and is actively maintained), Google's own Analytics MCP for GA4, a small PageSpeed Insights MCP or script, and one keyword data source, which is DataForSEO if you want cheap pay-as-you-go data or the official Semrush or Ahrefs MCP if you already pay for those tools. Add Playwright MCP or Chrome DevTools MCP so the agent can look at real pages.
MCP, the Model Context Protocol, is the standard way to give Claude Code tools. Each server exposes a set of functions, such as "run a Search Console query" or "get keyword volume", and Claude decides when to call them. You register a server once with the claude mcp add command, choose a scope (local to one project, project-wide through a shared .mcp.json file, or user-wide across all your projects), and then run /mcp inside Claude Code to check that it connected or to complete an OAuth sign-in.
Two rules apply to everything below. First, prefer read-only credentials. An SEO agent needs to read Search Console and GA4, not change property settings. Second, check the repository before you install a community server: look at the last commit date, open issues and whether the author still answers them. The commit dates below were checked in October 2026.
Google Search Console MCP servers
Google does not publish an official Search Console MCP server. Google ships official MCP servers for Google Analytics and Google Ads, but every Search Console option today is community code calling the public Search Console API. That is fine, because the API itself is free and well documented, but it means you are trusting a third party's code with your Google credentials.
AminForou/mcp-gsc is the one to start with. It is a Python server with the largest following of the Search Console options, its changelog shows releases through September 2026, and it covers the things an SEO agent needs: listing properties, search analytics with page and query breakdowns, period comparisons, URL inspection, batch inspection and sitemap management. Destructive tools such as deleting a site or sitemap are disabled by default, which is the right design. It supports OAuth (a desktop OAuth client from Google Cloud, with a browser sign-in on first run) or a service account that you add to the property as a user.
ahonn/mcp-server-gsc is a lighter Node option published on npm as mcp-server-gsc, also still receiving commits. It uses a service account and focuses on search analytics with query, page, country and device dimensions. Other servers exist, including pijusz/mcp-gsc and mharnett's mcp-google-gsc package, but they have smaller user bases, so check their activity before relying on them.
Setup follows the same pattern for all of them. Create a Google Cloud project, enable the Search Console API, then create either a desktop OAuth client or a service account. If you use a service account, add its email address to your Search Console property as a user. Then register the server in Claude Code: for a Python server, run claude mcp add gsc followed by two dashes and the command that starts the server, passing the path to your credentials file as an environment variable with the -e flag. Restart Claude Code, run /mcp, and ask it to list your properties as a smoke test.
Know the API's limits. Search Console data runs a couple of days behind, keeps about 16 months of history, and returns at most 25,000 rows per request, so ask the agent to page through results on larger sites. Average position is an average across every impression, not a rank check, which matters for the tracking section below.
GA4 for small teams: Google's official Analytics MCP
For GA4, small teams should use Google's own server. Google publishes google-analytics-mcp on GitHub under the googleanalytics organization, distributed on PyPI as analytics-mcp. Google labels it experimental, but it is actively maintained, with commits in October 2026, and it is the only GA4 option that comes from Google.
It gives Claude tools to list your accounts and properties, read property details and Google Ads links, run standard reports, run funnel reports, inspect custom dimensions and metrics, and run realtime reports. That is enough for the questions a small team actually asks: which landing pages from organic search convert, which pages lost sessions this month, and whether a traffic drop is sitewide or limited to one section.
To set it up, enable the Google Analytics Admin API and Google Analytics Data API in a Google Cloud project, then configure Application Default Credentials with the gcloud CLI using the analytics.readonly scope. The README's Claude Code command is claude mcp add analytics-mcp with user scope, two environment variables (the path to your credentials JSON and your Google Cloud project ID), and pipx run analytics-mcp as the command. You need pipx installed first. Several community GA4 servers use similar names, including ones by surendranb and leosepulveda, so make sure the repository you install is the googleanalytics one.
The GA4 connection is what turns a keyword report into a business report. Search Console tells you a page gained clicks. GA4 tells you whether those visitors did anything. For a small team without an analyst, asking Claude to join the two every Monday is most of the value.
How to connect PageSpeed Insights to Claude
There are three ways to connect PageSpeed Insights to Claude, and the simplest is often a script. The PageSpeed Insights API is free with an API key from Google Cloud, and third-party guides put the default quota at around 25,000 requests a day, which is far more than a weekly audit needs. Check the Quotas tab in your own Cloud console for your actual limit.
Option one is a PSI MCP server. ruslanlap/pagespeed-insights-mcp is the most complete community option and is actively maintained. It runs through npx, needs your Google API key as an environment variable, and exposes tools to analyze a page, diagnose it, pull Chrome UX Report field data, compare pages and run batches. PhialsBasement/pagespeed-mcp-server and enemyrr/mcp-server-pagespeed are simpler alternatives with fewer tools.
Option two is no MCP at all. Claude Code can run shell commands, so ask it to write a short script that calls the PSI API for your top 20 URLs on mobile and desktop and saves the results to a JSON file. Then have the weekly skill read that file. This has fewer moving parts than a server and is easy to read.
Option three is Chrome DevTools MCP, the official server from the Chrome DevTools team. It can record performance traces, analyze them, and run Lighthouse audits on a live page, which is better than PSI for debugging why a page is slow rather than just scoring it. Register it with claude mcp add chrome-devtools followed by npx chrome-devtools-mcp@latest. It needs a recent Node version and Chrome installed.
Whichever route you pick, ask for the specific opportunities and the field data, not just the score. The score changes from run to run. The list of render-blocking scripts and oversized images is what Claude can fix in your codebase.
Keyword research data: DataForSEO, Semrush and Ahrefs MCP
Search Console only shows queries you already appear for. To find keywords you do not rank for yet, check search volume, or see who else ranks, you need a third-party keyword source.
DataForSEO is the budget choice. It has an official MCP server, which you can run locally with npx using your API login and password as environment variables, or connect to as a hosted HTTP server. DataForSEO's help center documents three ways to install it with Claude Code. It is pay-as-you-go: the company lists a $50 minimum deposit and per-request pricing, and it moved all endpoints to pay-as-you-go in July 2026. For a single site running a weekly agent, this is usually the cheapest way to get keyword volumes, keyword difficulty, SERP snapshots and competitor rankings.
Semrush has an official remote MCP server. Its developer docs list the endpoint as mcp.semrush.com/v2/mcp, and the Claude Code setup is claude mcp add semrush with that URL and the http transport, then /mcp to sign in with OAuth. It exposes Semrush's SEO API, Trends API and read-only Projects data. Semrush says access requires a plan that includes API units, such as Semrush One Starter or Pro+, or SEO Classic Pro or Guru, and every MCP call spends API units the same way a direct API call would.
Ahrefs has an official remote MCP server too, available on paid plans from Lite upward according to Ahrefs' documentation. The endpoint is api.ahrefs.com/mcp/mcp over HTTP, you add it with claude mcp add ahrefs and the http transport, and you authorize in the browser. It reaches Keywords Explorer, Site Explorer, Rank Tracker and Site Audit data. Calls consume API units from your plan's monthly allowance, and lower plans cap how many rows each request returns. Ahrefs also has an older local server on GitHub, which hasn't been updated since 2025, so use the remote one.
The honest recommendation: if you already pay for Semrush or Ahrefs, connect their MCP and stop exporting CSVs. If you don't, start with Search Console plus DataForSEO, and only add a subscription when you hit a question that data can't answer, which in practice usually means backlinks.
Agent browser SEO: Playwright MCP, Chrome DevTools MCP and agent-browser
Agent browser SEO means giving Claude a real browser so it can see pages the way Google and users do: rendered JavaScript, actual titles and headings, structured data in the DOM, and what a competitor's page really contains. There are three good options.
Playwright MCP is Microsoft's official browser server and the default choice. Register it with claude mcp add playwright followed by npx @playwright/mcp@latest, and add the headless flag after two dashes if you want it to run without a window. It works from the page's accessibility tree, so Claude can read headings, links and text without screenshots. The first time, say "use the playwright mcp" in your prompt, or Claude may try to script the browser with shell commands instead.
Chrome DevTools MCP, covered above, is the better choice when the job is performance or debugging: network requests, console errors, traces and Lighthouse.
agent-browser from Vercel Labs is a browser CLI built for AI agents rather than an MCP server. You install it with npm, and it gives the agent compact page snapshots with short element references. Vercel and early users say this uses far fewer tokens than an MCP browser, which matters when the agent is reading dozens of competitor pages in one run. It also ships as a Claude Code skill.
For SEO work, a real browser handles the jobs that APIs cannot: checking the rendered title and canonical on your top pages, confirming that schema appears after JavaScript runs, reading the top three ranking pages for a keyword, and walking through Google Business Profile listings for local SEO.
Best Claude SEO tracking tools
The best Claude SEO tracking software in 2026 is a rank tracker that ships its own MCP server, so Claude can read your tracked positions directly. Today that means AccuRanker, SE Ranking, Semrush Position Tracking and Ahrefs Rank Tracker. If you don't need daily, location-specific rank checks, Search Console through mcp-gsc is a free tracker that is good enough for most small sites.
AccuRanker launched an MCP in May 2026. You connect Claude Code with claude mcp add, using the http transport and AccuRanker's connect endpoint, then authenticate with your AccuRanker login. AccuRanker says it is included in the subscription at no extra cost and is read-only, so Claude can analyze rankings, share of voice and AI visibility data but cannot add or delete keywords. If rank tracking is the only thing you want inside Claude, this is the most focused option.
SE Ranking has a hosted MCP server at api.seranking.com/mcp with OAuth or an API key header, and SE Ranking's docs give the Claude Code command directly. It covers far more than tracking: keyword research, backlinks, audits and SERP data, plus your projects and rank tracking through its Project API. Your account needs API access. For a small team that wants one subscription for both tracking and research, it is the strongest all-in-one choice.
Semrush Position Tracking and Ahrefs Rank Tracker are both reachable through their official MCP servers described above. Semrush exposes project data read-only, so Claude can read tracking results but not create campaigns. Ahrefs lists Rank Tracker among its MCP toolsets. Both cost API units per call, so they make sense if you already pay for the platform, not as a reason to subscribe.
Nightwatch also appears in MCP directories with an official server for rank tracking and AI visibility. We couldn't confirm the setup details on Nightwatch's own documentation, so check it before you commit.
You can also build your own tracker. DataForSEO's SERP API charges fractions of a cent per SERP on its standard queue, so a weekly job that checks 200 keywords, stores the positions in a spreadsheet or database, and has Claude summarize the changes costs very little. You take on the maintenance, but you get exactly the keywords, locations and devices you care about.
Which should you pick? If you only need to know whether your pages are moving, use Search Console through mcp-gsc and have Claude compare this week's average positions with the previous four weeks. If you serve local markets and need true positions by city or device, use AccuRanker or SE Ranking. If you already pay for Semrush or Ahrefs, connect what you have.
Workflow 1: Keyword Research and Gap Detection
The foundation of any SEO system is knowing where you actually stand. Before Claude can help you move the needle, it needs to know which keywords you rank for, which ones are close to page one, and which ones are not worth pursuing. This workflow runs against your Search Console data and produces a prioritized keyword action list.
With the Search Console MCP connected, ask Claude to pull the last 90 days of data covering query, page, position, clicks, impressions and CTR. If you prefer not to install a server, export the Performance report as a CSV and give Claude the file; you lose automation but keep the analysis.
Then filter for every keyword where your average position is between 5 and 20. These are your gap zone keywords, and they are the highest-return opportunity in most SEO programs. Google has already decided the page is relevant. The work now is optimization, not building authority from scratch, and because most clicks go to the top few results, moving a query from page two to the top of page one changes its click-through rate dramatically.
Have Claude group gap zone keywords by intent: informational content for how-to and what-is queries, commercial content for best and versus queries, and transactional content for buy, hire and get-a-quote queries. For each high-priority keyword, produce a keyword card with the current position, the target position, the ranking URL, the main gap and a one-sentence action. If DataForSEO, Semrush or Ahrefs is connected, add search volume and difficulty to each card so you are not optimizing for queries nobody searches.
One more check is worth adding: queries with high impressions and low CTR where you already rank on page one. These usually need a better title and meta description, not more content, and Claude can draft both in a minute.
Workflow 2: Competitor Content Analysis
Knowing your own rankings is half the picture. The other half is understanding why competitors beat you for your gap zone keywords. For each keyword, have Claude use the browser MCP to run the search or pull a SERP snapshot from your keyword data source, then open the top three organic results and extract the title, meta description, H1, all H2s, approximate word count, image count, and whether there is an FAQ section or structured data.
Once Claude has the competitor page data, ask it for a gap analysis against your ranking page for the same keyword. The output should answer three questions: are competitors covering subtopics you haven't addressed, are they using tables or comparison charts that help them win featured snippets, and is their heading structure or internal linking noticeably different from yours.
After analyzing three or more competitors across your top gap zone keywords, have Claude list the patterns that repeat across top-ranking pages regardless of the keyword. Those patterns are the closest thing to a ranking playbook for your niche. Typical findings are a rough length range, consistent use of structured data, a particular heading depth or a recurring content format such as comparison tables.
Workflow 3: Technical SEO Audit
Technical SEO is the layer most site owners either ignore or check once and never revisit. Issues accumulate silently. Running a technical audit on a schedule with Claude means problems get caught within days rather than months.
Start every audit with crawlability and indexation. Have Claude check that robots.txt is present and not blocking important pages or directories. Verify the XML sitemap is submitted to Search Console and contains only canonical, indexable URLs, with no 404s or redirect chains. Use the Search Console MCP's URL inspection tools on your most important pages and flag anything marked "Discovered, currently not indexed" or "Crawled, currently not indexed". These point to either a crawl problem or a quality signal issue.
For site speed, run your key URLs through PageSpeed Insights using one of the three routes above, capture mobile and desktop results, and have Claude analyze the specific opportunities rather than the scores. The most common fixable issues are unoptimized images, render-blocking JavaScript and missing lazy loading. In Claude Code, Claude can write the fixes directly into your codebase as a branch for you to review.
Schema markup matters more now that AI answer engines pull from structured data. Have Claude use the browser MCP to read the rendered JSON-LD on your most important page types and compare it against the schema types those pages should carry, then confirm anything questionable in Google's Rich Results Test. For internal linking, have Claude crawl your top 20 pages by traffic and find high-value pages with fewer than three internal links pointing to them. Fixing internal links costs nothing, can be done in your CMS or codebase, and is one of the fastest ways to help gap zone pages.
Workflow 4: Content Brief and Page Creation
The keyword research and competitor analysis workflows produce a clear list of content gaps. This workflow is where Claude closes them.
Before Claude writes anything, run a structured brand voice interview. It runs once, and the output becomes a voice profile that goes into every future content prompt. The interview should capture who your primary customer is, what makes your business different, words you always use and words you never want in your content, the level of technical detail your audience expects, and two or three examples of writing you admire. Save Claude's summary as a brand_voice.md file and reference it from your content skill.
For each keyword selected from the gap zone analysis, have Claude produce a full brief before drafting. The brief should include the primary keyword and two or three secondary keywords, a length range based on the competitor analysis, a suggested H1 and H2 structure, content elements such as tables and FAQs, two or three angles that would differentiate the piece from what already ranks, and an internal linking plan showing which existing pages should link to and from it.
With the brief approved, pass it back to Claude with the brand voice file and ask for the draft. In Claude Code, Claude can format the article, add it to your CMS or repository, and flag it for human review before it goes live. Keep that review step. An agent that publishes unedited drafts on a schedule is how sites end up with thin, repetitive content that hurts rankings.
Workflow 5: Google Business Profile and Local SEO
For businesses targeting local search, Google Business Profile is often the highest-value ranking surface. Map pack positions for local queries can drive more calls and visits than organic rankings.
Have Claude use the browser MCP to search for your primary service keywords in your target city. For the top three map pack results, extract the business category, review count, average rating, recent review activity, photo count, post frequency, and any services or attributes listed that you have not added to your own profile.
After gathering data from several competitors, ask Claude which factors consistently appear across businesses ranking in positions 1 through 3. The goal is to isolate what Google rewards in your market for your keywords, based on what is visible in your real competitive landscape rather than generic advice.
Then have Claude cross-reference your GBP profile against your website's homepage and contact page, checking for discrepancies in business name formatting, address, phone number, service area descriptions, hours and category alignment. NAP inconsistencies, even small ones like Street versus St., can dilute local ranking signals.
Deploying the Full System as a Weekly Loop
The five workflows are modular but sequential. A sensible order for a weekly run is keyword research to pull fresh Search Console data, the technical audit to catch new issues, a competitor check on the top two or three priority keywords, content briefs for the next pieces in the pipeline, and the GBP audit every other week.
Save each workflow as a Claude Code skill: a markdown file describing the task, which MCP tools to use, and the exact output format. Then chain them. The simplest production setup is a scheduled job that runs Claude Code in non-interactive mode every Monday morning, runs each skill in turn, and writes one Markdown report that is emailed or posted to Slack. Teams already using n8n or Make can trigger the same run from a scheduled workflow. The leanest option is to skip scheduling and run the skills by hand each Monday; once they are tuned, reviewing the output takes well under an hour.
For scheduled runs, use credentials that don't need a browser sign-in. A Google service account for Search Console, Application Default Credentials for GA4, and API keys rather than OAuth for paid data sources keep the job from stalling on a login prompt at 6 a.m.
Your Monday review should cover four things: which gap zone keywords moved up or down, any critical findings from this week's technical audit, which briefs are ready and what is being published this week, and which keywords crossed onto page one.
Conclusion
Every SEO tactic in this guide has been available to large agencies for years. What has changed is the cost and setup effort. A multi-workflow SEO system used to require a developer, a data analyst and several paid subscriptions. With Claude Code and a handful of MCP servers, it takes an afternoon of setup and a clear prompt strategy.
The sites that win in search over the next two years won't be the ones with the biggest budgets. They will be the ones running the tightest feedback loops. Weekly audits beat quarterly audits. Automated gap analysis beats manual spreadsheet reviews. Build the system once, then improve it every week based on what you learn. If you want to see a version of this running in production, the Claude Code SEO agent strategy in our directory walks through one builder's setup.
Frequently Asked Questions
What is a Claude SEO agent?▾
A Claude SEO agent is Claude, usually in Claude Code, connected to your SEO data through MCP servers and given repeatable instructions for keyword research, technical audits, competitor analysis and content briefs. It runs on a schedule or on demand and produces a prioritized report rather than raw data.
What are the best tools for connecting Search Console and keyword research to Claude Code?▾
For Search Console, use AminForou's mcp-gsc, the most widely used community server, which was still being updated in September 2026. For keyword research, use DataForSEO's official MCP if you want pay-as-you-go pricing, or the official Semrush or Ahrefs MCP servers if you already have those subscriptions. Add Google's analytics-mcp for GA4 and Playwright MCP for a real browser.
Is there an official Google Search Console MCP server?▾
No. As of October 2026, Google publishes official MCP servers for Google Analytics and Google Ads but not for Search Console. Every Search Console MCP server is community code that calls the free Search Console API, so check the repository's activity and use read-only access.
How do I connect GA4 to Claude?▾
Use Google's official google-analytics-mcp server, installed through pipx as analytics-mcp. Enable the Analytics Admin and Data APIs in Google Cloud, set up Application Default Credentials with the analytics.readonly scope, then register it in Claude Code with claude mcp add, passing your credentials path and project ID as environment variables. Google labels it experimental.
How do I connect PageSpeed Insights to Claude?▾
Get a free PageSpeed Insights API key from Google Cloud, then either install a community MCP server such as ruslanlap/pagespeed-insights-mcp, or ask Claude Code to write a short script that calls the API for your key URLs. For deeper debugging, Chrome DevTools MCP can run Lighthouse audits and performance traces on live pages.
What is the best Claude SEO tracking software?▾
If you want true rank tracking inside Claude, AccuRanker and SE Ranking both offer MCP servers built for it, and Semrush and Ahrefs expose their trackers through their official MCP servers. If average positions are enough, Search Console through mcp-gsc is free and works well for small sites.
What does agent browser SEO mean?▾
It means giving an AI agent a real browser so it can check rendered pages: titles, canonicals, headings, structured data after JavaScript, competitor content and local map results. In Claude Code, the usual tools are Microsoft's Playwright MCP, Chrome DevTools MCP for performance work, and Vercel Labs' agent-browser CLI.
Can Claude replace tools like Ahrefs or Semrush?▾
For keyword gap analysis, technical audits, content planning and competitor page analysis, a Claude agent working from Search Console plus a pay-as-you-go data source covers what many small teams use those tools for. For backlink analysis and large-scale research across many domains, the paid tools still have data you can't get elsewhere, which is why both now offer MCP servers.
How much does a Claude SEO agent cost to run?▾
Anthropic lists Claude Pro, which includes Claude Code, at $20 a month. The Search Console, GA4 and PageSpeed Insights APIs are free. Keyword data is the variable cost: DataForSEO is pay-as-you-go with a $50 minimum deposit, while Semrush and Ahrefs MCP access requires an existing paid plan and uses its API units.
Is it safe to give an AI agent access to Search Console and Analytics?▾
It is reasonably safe if you limit access. Use read-only scopes where the server supports them, such as analytics.readonly for GA4, add a service account to Search Console rather than sharing your main Google login, keep destructive tools disabled, and review any community server's code and maintenance history before installing it.