Google Search Console, Bing and GA4 in Claude Code

Claude Code is where SEO fixes actually happen: titles, redirects, sitemaps, structured data. With GSC Magic the agent can check which pages lost clicks, inspect their index status and verify Core Web Vitals without leaving the terminal.

Last updated: 2026-10-18

In short

Run claude mcp add --transport http --scope user gsc-magic https://mcp.gscmagic.com/mcp, finish the OAuth sign-in in the browser tab that opens, and Claude Code can check Search Console performance, index status, sitemaps and Core Web Vitals while it edits your site.

Set up in 3 steps

  1. Create a GSC Magic account and connect Google.
  2. Run the command below once. Claude Code opens a browser tab for the OAuth sign-in.
  3. In any project, ask: "Which URLs from our sitemap are not indexed, and what does the inspection say?"
Add the server (user scope, available in every project)
claude mcp add --transport http --scope user gsc-magic https://mcp.gscmagic.com/mcp

Good to know

  • Use --scope project instead to commit the server to .mcp.json for the whole team; each developer still signs in with their own account.
  • Sign-in uses OAuth: the client opens a GSC Magic page where you sign in and approve once. No API key or token to paste.
  • Everything is read-only unless you turn on write mode on a paid plan, so your agent can look but not change your site.

What to ask once connected

  • "List my Search Console properties and the one with the most clicks last 28 days."
  • "Which queries sit in positions 4–10 with the most impressions? Suggest title changes."
  • "Compare clicks this month with last month by page and tell me what moved."
  • "Which URLs in my sitemap are not indexed, and what does the inspection say?"
  • "How many sessions came from ChatGPT, Perplexity and Claude last month, and to which pages?"

More in 25 SEO prompts for AI agents; the full tool list is on the tools page.

Troubleshooting

The browser never opens for sign-in (remote server, SSH, container).

Create an access token in the dashboard and add the server with a header instead: claude mcp add --transport http gsc-magic https://mcp.gscmagic.com/mcp --header "Authorization: Bearer gsm_…".

Tools work in one project but not another.

The server was added with --scope project or --scope local. Re-add it with --scope user to make it available everywhere.

Tool output is cut off.

Claude Code caps tool output. Ask for a smaller date range or fewer rows, or use the report_* tools, which return summaries instead of raw rows.

/mcp shows the server as failed after a laptop sleep.

Run /mcp and reconnect; the OAuth refresh token is still valid. If it keeps failing, claude mcp remove gsc-magic and add it again.

Questions about Claude Code

Can I use a token instead of OAuth in CI?

Yes. Create an access token in the dashboard (Connect → Tokens) and pass it as an Authorization: Bearer header. Tokens can be read-only and have an expiry.

Does it work with Claude Code in VS Code?

Yes. The VS Code extension shares the same MCP configuration as the CLI.

Other clients

Claude · ChatGPT · Cursor · Windsurf · VS Code · Any MCP client