DEVELOPERS · FOR DEVELOPERS AND INDIE HACKERS

Technical SEO in Cursor and VS Code: Indexing Checks via MCP

Most technical SEO bugs are shipped by code: a stray noindex, a broken canonical, a sitemap that stopped updating. This guide shows developers how to check Google’s view of production from Cursor, VS Code or a terminal agent, then fix the cause in the same session.

By GSC MCP Server teamUpdated 6 min read

Why do SEO checks in your editor

The URL Inspection API (urlInspection.index.inspect) returns Google’s indexed view of one URL: verdict, coverage state, last crawl, canonicals, robots.txt state and rich results. It is limited to 2,000 calls a day and 600 a minute per property, and read-only (no Request indexing). Through an MCP server, your coding agent can call it right next to the code that renders the page.

Developers and indie hackers usually hear about SEO problems weeks late, from a marketer or from a traffic chart. By then the commit that caused it is buried. Bringing Search Console data into your coding agent shortens that loop to minutes.

  • Your agent can read the code that renders the page and Google’s report on that page in one context.
  • You can verify a fix against real index data instead of guessing.
  • You stop switching between the Search Console UI, the browser and your editor.

Setup in two minutes

  1. Sign in to gscmcp, connect the Google account that has access to your Search Console property, and optionally Bing.
  2. Add a remote server named gscmcpserver to your editor’s MCP config, using the snippets below.
  3. Sign in when the editor prompts you, then enable the tools in your agent’s tool settings. If your setup cannot complete a browser sign-in, create an API key on the dashboard setup page and send it as an Authorization: Bearer header instead.

Cursor: ~/.cursor/mcp.json

{
  "mcpServers": {
    "gscmcpserver": {
      "url": "https://api.gscmcpserver.com/mcp"
    }
  }
}

VS Code: .vscode/mcp.json

{
  "servers": {
    "gscmcpserver": {
      "type": "http",
      "url": "https://api.gscmcpserver.com/mcp"
    }
  }
}

VS Code’s own format uses a servers key. Newer versions also read a portable .mcp.json at the workspace root, which takes the same entry under mcpServers; our setup page generates that one. See VS Code’s MCP server docs for your version, and merge the entry into any servers you already have.

Full client-by-client instructions, including Claude Code, Codex and Antigravity CLI, are in the connection guide.

URL Inspection from the agent

The inspect_url tool calls Google’s URL Inspection API and returns the indexed-version fields from the inspection panel (verdict, coverage, last crawl, canonicals, robots.txt, rich results); it can’t run a live test. If the verdict is “Crawled – currently not indexed”, work through how to fix Crawled – currently not indexed.

Try this prompt
Inspect https://example.com/pricing. Is it indexed? When was it last crawled? Did Google accept our canonical? Are any rich results detected?

The property is detected automatically from the URL, so the Domain vs URL-prefix property question doesn’t matter here.

Reading the verdict

Coverage stateWhat to look at in code
Excluded by ‘noindex’ tagMeta robots in layouts, environment-based flags, X-Robots-Tag headers
Blocked by robots.txtGenerated robots rules, staging rules leaking to prod
Duplicate, Google chose different canonicalCanonical tag logic, trailing slashes, query parameters
Page with redirectProxy (middleware), redirects config, locale routing
Crawled – currently not indexedThin or duplicate templates, client-only rendering
Soft 404Empty states returning 200, missing data fallbacks

Canonical mismatches

A Google-selected canonical that differs from yours is one of the most common silent bugs. Typical causes in code:

  • Canonical built from the request URL, including parameters.
  • Mixed trailing-slash behaviour between links and canonicals.
  • Locale or region routes that canonicalise to the wrong language.
  • Pagination pages canonicalising to page one.
Try this prompt
Inspect these 10 product URLs and list any where the Google-selected canonical differs from the declared one. Then find where we set the canonical in this codebase and explain why they could differ.

Duplicate pages also cause keyword cannibalization, so a canonical bug often shows up as two URLs splitting rankings.

Sitemap health

The list_sitemaps tool returns sitemaps submitted to Google and feeds submitted to Bing, with last submission and download times, errors, warnings and submitted URL counts where the provider reports them. Only the API’s per-sitemap indexed count is deprecated: in Search Console, open Indexing → Sitemaps, click a sitemap and choose See page indexing, or spot-check key pages with inspect_url.

Try this prompt
List my sitemaps in Google and Bing. When was each last downloaded? Any errors? Compare the submitted URL count with the number of routes our sitemap generator should produce.
  • A “last downloaded” date that stopped moving suggests the sitemap URL now errors or redirects.
  • Submitted counts far below expectations point to a generator bug or a build-time data fetch that failed.
  • If the Page indexing report shows far fewer indexed pages than you submitted, look at quality or duplication, not the sitemap itself.

For Bing, enable IndexNow on deploy so changed URLs are picked up quickly. See Bing and AI search visibility.

Post-deploy checks

After a release that touches routing, layouts, metadata or middleware, spend two minutes checking production:

Try this prompt
We just deployed changes to the blog layout. Inspect the blog index and three blog posts. Confirm each is indexable, the canonical is correct, and robots.txt allows it. Then compare clicks for /blog/ pages over the last 7 days with the 7 days before.

The same routine scales up to URL Inspection checks after a migration. Remember that inspection reflects Google’s last crawl, not your latest deploy. A freshly fixed page can still show the old state until it is recrawled; request indexing in Search Console to speed that up.

From finding to fix in the same session

The real advantage is continuity. The agent that found the problem can open the file that caused it.

  1. Ask the agent to inspect the affected URLs.
  2. Ask it to locate the code that renders the relevant tag or response.
  3. Review and apply the fix, then add a test if you can.
  4. After deploy and recrawl, ask it to inspect the URLs again and compare clicks before and after.

If the bug already cost traffic, the traffic drop diagnosis guide helps you measure the damage and the recovery.

Example: a Next.js app

In a Next.js App Router project, SEO-relevant code tends to live in a handful of places. Point your agent at them:

  • metadata and generateMetadata exports for titles, descriptions, canonicals (alternates.canonical) and robots.
  • app/robots.js and app/sitemap.js for crawl rules and sitemaps.
  • proxy.js (called middleware.js before Next.js 16) and next.config.js redirects for locale and trailing-slash behaviour.
  • metadataBase in the root layout, which turns relative canonicals into absolute URLs.
Try this prompt
Search Console says /docs/getting-started has a Google-selected canonical of /docs/getting-started/. Check our metadata, trailingSlash setting and links in this repo and propose a consistent fix.

Quotas and limits

  • URL Inspection: 2,000 calls per property per day and 600 per minute. Our API guide covers the URL Inspection API quota alongside the other limits.
  • Inspection data reflects the last crawl, not live HTML. It cannot test unpublished pages.
  • Performance data lags two to three days and goes back 16 months.
  • Every tool call counts toward your plan’s monthly allowance; batch related checks with multicall.

Building a product on your own? The weekly founder routine pairs well with these deploy checks. Working in a terminal instead? See Claude Code SEO with Search Console MCP.

Frequently asked questions

Can the agent request indexing in Google?

No. Google’s URL Inspection API is read-only, and GSC MCP Server only requests read access. Request indexing manually in Search Console after you ship a fix.

What is the URL Inspection API quota?

Google allows about 2,000 inspections per property per day and 600 per minute. Inspect representative URLs from each template rather than whole sites.

Does this work with Claude Code and Codex too?

Yes. Any MCP client that supports remote HTTP servers works, including Claude Code, Codex, Antigravity CLI, Devin Desktop (formerly Windsurf) and Cline. The prompts in this guide are client-agnostic.

Is it safe to put my API key in .cursor/mcp.json?

Keep the key out of version control. Use the user-level configuration file, an environment variable if your client supports it, or add the project file to .gitignore. Rotate the key from the dashboard if it leaks.

Can I check a page on my local dev server?

No. Search Console only knows about public URLs Google has crawled. Use it to check production after deploys and use local tooling, such as Lighthouse, for pre-release checks.