SEO analytics in ChatGPT via MCP

Case study · SEO MCP · Google Search Console · ChatGPT

An SEO team needed to review search impressions, clicks and page trends from ChatGPT. I deployed a separate MCP server that imports Google Search Console data, stores the history and exposes reports through ChatGPT tools.

Published:

The integration runs on its own server with a separate database, credentials and Google OAuth sign-in. The client application and the original MCP deployment remain in their own environments.

The task

Connect a client website’s search analytics to ChatGPT and keep enough history for consistent reporting. The SEO team needs query and page data, period comparisons and signals they can investigate.

  • History and comparisonsWeb and image search data are stored separately. Period comparisons use the saved history.
  • Separate accessChatGPT invokes the approved tools through MCP. A service account requests read-only Google API scopes.

Why connect SEO data to ChatGPT?

When organic traffic changes, an SEO team first needs to pinpoint where it changed. That often means joining several exports to compare periods, find affected pages and then examine their queries. The integration lets the team ask those questions in ChatGPT against the same stored Search Console history.

  • Investigate a drop in clicksStart by asking which pages lost the most clicks in the last 28 complete days compared with the preceding 28. Then compare impressions, CTR and position for the affected URLs to decide which pages to inspect first.
  • Find pages worth improvingCheck which queries earn impressions but few clicks, then review whether the result matches the search intent. The team can revise the title, improve the page or add a relevant internal link depending on what it finds.
  • Review the effect of a releaseRevisit the same URLs after an update and compare equal-length periods. Separate web and image search data show which search type accounts for the movement.
  • Repeat reports consistentlyPostgreSQL stores the history. MCP tools retrieve and calculate the results, while ChatGPT helps frame the question and present the answer. The team can repeat the check with the same dates and filters.

If the latest period is incomplete or Google suppresses some queries, the findings need further verification. A comparison helps prioritise the investigation. The team can then check the page and its release history for the cause.

Implementation

  1. Deploy an isolated copy

    I moved the code without the original secrets and configured separate credentials and PostgreSQL storage. Docker Compose separates the HTTP application, background worker and database.

  2. Import Search Console history

    The worker synchronises search data and refreshes anomaly and opportunity calculations. Web and image search remain separate. Search Console can sync on its own.

  3. Connect ChatGPT through MCP

    FastMCP exposes query, page, comparison, URL inspection and reporting tools. Google OAuth restricts sign-in to an approved account.

  4. Configure hosting on HestiaCP

    Nginx forwards HTTPS requests to an application bound to the local interface. PostgreSQL has no public port. The application runs as a non-root user with a read-only container filesystem.

Technology stack

  • Python, FastMCP and UvicornMCP tools and HTTP transport for ChatGPT.
  • Google Search Console API and Google OAuthRead access to search data and separate user sign-in.
  • PostgreSQL, SQLAlchemy, Alembic and psycopgHistorical storage, data access and schema migrations.
  • pandas, NumPy, APScheduler and PytestCalculations, scheduled background jobs and automated checks.
  • Docker Compose, HestiaCP and NginxSeparate application, worker and database services with HTTPS proxying.

Verification

CheckResult
Search Console historyImported 495 days of search performance data.
Repeated importRe-running the import for the tested month did not increase the row count.
ChatGPT and access controlThe logs confirmed successful site-listing and period-comparison calls. Missing and invalid tokens returned HTTP 401.
Regression checks91 tests passed. After the proxy change, the other 14 sites retained their Nginx configurations and homepage HTTP statuses.

Pricing

The base setup covers one Google Search Console property and standard reports in ChatGPT via MCP. Additional calculations and reports in Python, along with data backups, are quoted separately.

Service prices in USD
ServicePrice
Base SEO MCP setup$150
Additional calculations and reports in PythonOn request
Data backup setupOn request

Frequently asked questions

What can I ask ChatGPT?

For example, which pages lost clicks between two periods or which queries gained impressions. ChatGPT uses the data returned by the MCP tool.

Can it operate with Search Console alone?

Yes. Historical data and period comparisons are available with Search Console as the sole data source.

Does the integration change the client website?

It reads search data through the Google API. The synchronisation tool updates the reporting database, and URL inspection stores the inspection result.

Does this replace Google Search Console?

Search Console remains the data source and the place for manual checks. MCP lets you access historical comparisons and reports from ChatGPT.

Where are the metrics calculated?

The server retrieves the data and performs the calculations in Python. ChatGPT receives the results from the MCP tool and explains them in context.

Why do query rows add up to a different total?

Google suppresses some queries. Use page reports for total traffic and visible query rows to understand topics and search intent.

Can I compare language versions or sections?

Within one connected property, you can select groups of URLs or language prefixes. Comparisons across multiple properties or custom groupings can be scoped separately.

What reports can I request?

Examples include comparisons across commercial page groups, post-release tracking and exports based on agreed thresholds. We agree on sources, formulas, filters and output before developing the report in Python.

Discuss connecting your analytics to ChatGPT

Describe the data sources, the reports you need and who needs to use them.

Discuss an integration


Let’s discuss your project

Tell me what you would like to build. I will reply by email.

Or message me on Telegram @ifwcom