Build a Google SEO & GEO MCP Server: Search Console, Core Web Vitals, and Structured Data Tools for AI Agents [2026]
Build a Google SEO & GEO MCP server with Search Console, GA4, PageSpeed Insights, and structured data validation tools for AI agents. Full FastMCP tutorial.
Marcus Vance
Head of Protocol Engineering
The Google SEO & GEO MCP server brings Search Console, Google Analytics 4, PageSpeed Insights, and Core Web Vitals data directly into your AI agent's toolset. With 74 stars on the awesome-seo-mcp list and a dedicated implementation at 33 stars, this MCP server lets agents perform SEO audits, track search performance, and optimize page speed through natural-language queries.
This post builds the complete server from scratch, covering Search Console API integration, GA4 data extraction, PageSpeed analysis, and structured data validation -- all exposed as MCP tools that any AI agent can call.
Why SEO Needs an MCP Server
SEO is a data-intensive discipline that requires continuous monitoring across multiple platforms. Traditional workflows involve logging into Search Console, exporting reports, cross-referencing GA4 data, running PageSpeed tests, and manually tracking changes. An MCP server consolidates all these data sources into a unified interface that AI agents can query programmatically.
The MCP Analytics Server demonstrated the pattern for product analytics. The SEO MCP server applies the same approach to search engine optimization and generative engine optimization (GEO) -- the emerging practice of optimizing content for AI search engines like Google SGE and Perplexity.
Step 1: Google Search Console Integration
Search Console provides search performance data including queries, impressions, clicks, and average position. The MCP server wraps the Search Console API with Google service account authentication. The client initializes with a credentials file and site URL, then exposes a method that returns performance data over a configurable time period including total clicks, total impressions, average CTR, and the top-10 queries ranked by clicks with their average positions.
Step 2: FastMCP Tool Definitions
The server exposes two main MCP tools. The search_performance tool queries Search Console for click and impression data over the last N days. The page_speed_analysis tool runs a Google PageSpeed Insights audit on any URL and returns performance scores, Core Web Vitals metrics (FCP, LCP, CLS), and the top five recommendations for improvement.
Both tools follow the FastMCP pattern established by servers in the MCP Directory -- a single @mcp.tool() decorator, typed parameters, and structured dictionary returns that MCP clients can render as formatted output.
Step 3: GA4 Traffic Analytics
The server integrates with Google Analytics 4 for traffic source analysis. The GA4 client authenticates through the same service account credentials and queries the Beta Analytics Data API for active users, sessions, and traffic sources over a configurable time period. The tool returns total users, total sessions, and the top traffic sources ranked by user count.
This integration lets AI agents answer questions like "which channel drove the most traffic last week" or "how did our organic search traffic change month over month" without logging into the GA4 interface.
Step 4: Structured Data Validation
Structured data (Schema.org markup) is critical for both traditional SEO and GEO. The server validates structured data on any URL using Google's Rich Results test API. The validation tool returns the number of valid items, total items detected, Schema.org types found, and any validation errors.
This tool is especially valuable for GEO optimization. AI search engines like Google SGE and Perplexity prioritize pages with clean, comprehensive structured data because it makes their answer-generation more reliable. Pages without structured data are less likely to be cited as sources.
Step 5: Claude Desktop Configuration
Add the SEO MCP server to Claude Desktop by adding an entry to your claude_desktop_config.json. The server requires Google Cloud service account credentials with access to Search Console, GA4, and the PageSpeed Insights API. All credentials stay on your local machine -- the MCP server makes API calls directly to Google without any intermediate service.
The GEO Advantage
GEO (Generative Engine Optimization) is the practice of optimizing content for AI search engines that generate answers rather than listing links. The SEO MCP server supports GEO analysis through three integrated capabilities:
- Structured data validation ensures AI search engines can parse your content reliably
- PageSpeed analysis identifies performance bottlenecks that reduce your content's chance of being cited
- Search performance tracking measures how your content performs in both traditional and AI-powered search results
The BankMCP Server and SEO MCP server follow the same architecture pattern: wrap external APIs as MCP tools, handle authentication transparently, and expose a consistent interface for AI agents. This pattern is becoming the standard for any domain where agents need access to third-party data.
Deployment and Security
The SEO MCP server uses Google service account authentication, which means credentials never leave your machine. All API calls go directly from your MCP server to Google's APIs with no intermediate service. This is the same security model used by the Remote MCP Servers Hub for verifying server authenticity before connecting.
The server runs as a local process, keeping your Search Console data private. For team-wide access, deploy it as a remote MCP server with appropriate authentication. The code is identical -- only the transport changes from stdio to HTTP/SSE.
Practical Use Cases
With the SEO MCP server connected, agents can perform tasks like:
- "Audit our top 10 landing pages for Core Web Vitals compliance"
- "Show me which search queries lost impressions over the last month"
- "Validate structured data on the new product page"
- "Compare traffic sources week over week from GA4"
- "Identify pages with good content but poor PageSpeed scores"
Each query triggers the appropriate API call and returns structured data that the agent can format as a report, action item list, or dashboard update. The server handles authentication, rate limiting, and data transformation automatically.
The SEO MCP server transforms search optimization from a manual, platform-by-platform process into an automated, agent-driven workflow. For marketing teams, content publishers, and anyone who depends on search traffic, this is the MCP server that pays for itself.
Production Deployment: Service Account Setup
To use the SEO MCP server, you need a Google Cloud service account with access to:
-
Google Search Console API -- The service account must be added as an owner or full user of the Search Console property you want to query. This is configured in Search Console settings under Users and Permissions.
-
Google Analytics Data API -- The service account must have access to the GA4 property. This is configured in GA4 under Property Access Management.
-
PageSpeed Insights API -- The service account needs the PageSpeed Insights API enabled and a valid API key. This is configured in the Google Cloud Console under APIs and Services.
The setup process takes approximately 30 minutes for a single domain. For agencies managing multiple client domains, the server supports a multi-site configuration where the site_url parameter routes each query to the appropriate Search Console property.
Core Web Vitals Monitoring
The PageSpeed analysis tool supports both mobile and desktop strategies. Mobile Core Web Vitals are the primary ranking factor for Google's search algorithms, while desktop metrics are used for overall site health assessment. The server returns both the raw metrics and Google's performance score (0-100) so agents can track trends over time.
For continuous monitoring, the server can be configured to run automated PageSpeed checks on a schedule and alert the agent when any page drops below the Core Web Vitals threshold (LCP under 2.5 seconds, FID under 100 milliseconds, CLS under 0.1). This automated monitoring is the SEO equivalent of the health check system used by the Remote MCP Servers Hub -- detect problems before they impact performance.
Search Console Query Analysis
The search_performance tool supports filtering by date range, query, page, and device category. This lets agents answer targeted questions like:
- "Which queries improved in position after our content update?"
- "How do our mobile vs desktop click-through rates compare?"
- "Which pages lost impressions after the algorithm update?"
- "Are there brand queries that competitors are ranking for?"
The tool returns structured data that agents can format as tables, charts, or action items. For marketing teams, this eliminates the need to manually export and analyze Search Console reports. By @deepakb.
Enjoyed this breakdown? Get our morning dispatch in your inbox.
Curated breakdowns of frontier model architectures and compute markets delivered every weekday. Zero fluff.
Marcus Vance
Head of Protocol Engineering
Marcus Vance specializes in the Model Context Protocol (MCP), FastMCP tooling, Claude Desktop integrations, and secure agent RPC transports.
Build a Remote MCP Servers Hub: Curated Directory with Health Checks for 200+ Remote AI Agent Tools [2026]
Next Story →OKF Agent Architecture Deep-Dive: Git-Native Persistent Memory with BM25 Search Instead of Vector Embeddings [2026]
Related Intelligence Analysis
Vercel AI SDK Tool Calling React: 5 Steps (2026)
Vercel AI SDK tool calling React integration is a programming pattern that executes server-side functions based on large language model decisions and streams the results to a React frontend. By combining streamText with...
Fact-Density vs. Word Count: The New SEO for 2026
Fact Density is the ratio of verifiable, unique information to the total word count of a piece of content. In 2026, AI search engines like Perplexity and Gemini prioritize high fact density over traditional word count. A...
NVIDIA Audex vs Qwen3.5-Audio: Best Open Audio-Text LLM for Voice AI 2026
NVIDIA Audex 30B-A3B (July 2026) and Qwen3.5-35B-A3B are the two leading open audio-text LLMs. Audex uniquely handles both audio understanding and generation in a single model while preserving text intelligence. Qwen3.5-...