Google Search Console, Bing and GA4 in Grok
Grok Build, xAI's terminal coding agent, adds remote MCP servers over HTTP with a static auth header in one command. GSC Magic connects with an access token.
Last updated: 2026-10-30
Create an access token in the GSC Magic dashboard, run grok mcp add --transport http gsc-magic https://mcp.gscmagic.com/mcp with an Authorization: Bearer header, and Grok Build can query your Search Console, Bing and GA4 data while it edits your site.
Set up in 3 steps
- Create a GSC Magic account, connect Google, then create an access token under Connect → Access tokens.
- Run the command below with your token. It writes the server to ~/.grok/config.toml.
- Run grok mcp doctor gsc-magic to check the connection, then ask Grok to list your Search Console properties.
grok mcp add --transport http gsc-magic https://mcp.gscmagic.com/mcp --header "Authorization: Bearer gsm_YOUR_TOKEN" Good to know
- Grok Build expands environment variables in url and headers, so the token can stay in your environment instead of the config file.
- Use --scope project to write .grok/config.toml in a repository, but keep tokens out of committed files.
- On Free your agent can only read. On Pro and Agency write tools are available, and the owner can switch write mode off in Settings in one click.
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 custom connector on grok.com does not connect.
grok.com lets you add a custom MCP server under Connectors → New Connector → Custom, but GSC Magic does not accept Grok's sign-in return, and xAI's documentation does not describe a header field there. Use Grok Build, or another client, until that changes.
grok mcp doctor reports 401.
The token is wrong, expired or revoked. Create a new one, then remove and add the server again.
Questions about Grok
Does Grok Build read my Claude Code or Cursor MCP config?
Yes. It also loads servers from ~/.claude.json, .cursor/mcp.json and .mcp.json, so an existing GSC Magic entry with a token header carries over.
Other clients
Claude · ChatGPT · Claude Code · Cursor · Windsurf · VS Code · Any MCP client · Gemini CLI · Zed · Cline · Continue · n8n · LibreChat · goose · Warp · Raycast · OpenClaw · Hermes Agent