GSC MCP for Codex

Google Search Console in OpenAI Codex

Codex already reads your code. Give it your search data too. The GSC Wizard MCP server is a hosted Model Context Protocol endpoint that hands Codex your Search Console, Bing Webmaster and GA4 data, so the agent that edits your templates can also see which pages lose clicks, which queries a page ranks for, and whether a URL is indexed.

One command, no local server, no Google Cloud project. It works in the Codex CLI, the IDE extension and the desktop app, which all read the same ~/.codex/config.toml.

codex mcp add gsc-wizard --url https://mcp.gscwizard.com/mcp
codex mcp login gsc-wizard
Endpoint
https://mcp.gscwizard.com/mcp
Transport
Streamable HTTP
Auth
OAuth (codex mcp login) or Bearer key
Tools
112 · GSC, Bing, GA4

Free trial, no credit card. MCP access is included in every plan.

01

Why Search Console belongs in Codex

Most SEO fixes end up as a code change: a title template, a canonical tag, a redirect map, a sitemap generator, an internal-link block. In a chat assistant you analyse the data, then copy the conclusion into your editor. In Codex the analysis and the change happen in the same session, against the same repository.

Data next to the diff

Codex can look up the queries a page earns clicks for before it rewrites that page's title, instead of guessing at keywords.

Analysis runs server-side

Decay, cannibalization, CTR curves and opportunity scoring are computed by the server. Codex gets conclusions and the rows behind them, not a raw export to do arithmetic on.

More history than the API

Most reads come from GSC Wizard's warehouse of your stored data, which reaches beyond Google's 16-month window and avoids the API's row sampling.

02

Setup in three steps

  1. 1

    Connect your properties

    Create a GSC Wizard account, sign in with Google and pick the Search Console properties Codex should see. Codex can only read properties connected here.

  2. 2

    Add the server to Codex

    From any terminal:

    codex mcp add gsc-wizard --url https://mcp.gscwizard.com/mcp

    This writes an [mcp_servers.gsc-wizard] table into ~/.codex/config.toml. You can also write the block by hand.

  3. 3

    Sign in and check

    Run the OAuth login, which opens your browser on GSC Wizard's consent screen. Then start Codex and type /mcp to confirm the tools are listed.

    codex mcp login gsc-wizard
    codex
    > /mcp
    > List my Search Console sites and show clicks for the last 28 days.
03

The config.toml block

If you keep your Codex config in a dotfiles repo, or want to limit what the agent can reach, edit ~/.codex/config.toml directly.

Minimal (OAuth)

[mcp_servers.gsc-wizard]
url = "https://mcp.gscwizard.com/mcp"

API key from an environment variable

bearer_token_env_var names the variable; Codex sends its value as Authorization: Bearer. The key itself never sits in the config file.

[mcp_servers.gsc-wizard]
url = "https://mcp.gscwizard.com/mcp"
bearer_token_env_var = "GSCW_API_KEY"
export GSCW_API_KEY="gscw_live_..."

Focused: only the tools a task needs

Every tool definition costs context on every turn. For a coding agent that only needs to check performance and indexing, an allowlist keeps the session lean and narrows what a prompt injection in fetched content could reach.

[mcp_servers.gsc-wizard]
url = "https://mcp.gscwizard.com/mcp"
bearer_token_env_var = "GSCW_API_KEY"
enabled_tools = [
  "list_sites",
  "get_site_summary",
  "query_top_pages",
  "get_page_performance",
  "get_query_performance",
  "find_decaying_content",
  "analyze_cannibalization",
  "inspect_url",
  "list_sitemaps"
]
tool_timeout_sec = 120

Analysis tools over long date ranges can take longer than a plain lookup, so a generous tool_timeout_sec avoids Codex abandoning a call the server is still answering. Set enabled = false to switch the server off without deleting the block.

04

OAuth or API key

OAuth via codex mcp login

Best for interactive work on your own machine. Codex discovers the authorization server, registers itself and opens a browser sign-in. No key to copy, store or rotate. The grant covers read and write tools, and you can revoke it from your GSC Wizard account.

Scoped gscw_live_ key

Best for codex exec, CI pipelines, cloud tasks and anything without a browser. Create one under Account → API keys in GSC Wizard; it is shown once and stored only as a hash.

Use a read-scoped key for agents. A read key cannot call any of the 32 mutation tools, such as submit_sitemap, submit_indexnow_urls or add_site. The check runs on the server before the tool executes, so an agent cannot be talked past it. Google credentials never reach Codex at all: the server holds them and Codex only holds a GSC Wizard credential.

05

What to ask Codex

The useful prompts combine the search data with the repository Codex has open.

Fix titles with real query data

"Find pages on example.com ranking in positions 4 to 15 with below-curve CTR. For each one, find the template or content file that sets its title in this repo and propose a title that includes its top query."

Check a migration before you ship it

"Compare the URLs this branch removes or renames against the top 500 pages by clicks over the last 90 days. List every URL with traffic that has no redirect in redirects.json."

Find content to refresh

"Run a decay analysis for the /blog/ section, then open the five worst-decaying posts in content/ and draft an update plan for each, using the queries they lost."

Resolve cannibalization in code

"Find queries where two or more of our pages compete. For each pair, check the internal links and canonicals in the templates and suggest which page should win."

Verify indexing after a deploy

"Inspect the ten URLs added in the last commit and tell me which are not indexed yet, with Google's reason."

Tell Codex once, in AGENTS.md

Codex reads AGENTS.md at the start of a session. A few lines there save repeating the property and the house rules in every prompt.

## Search data
- Search Console property: sc-domain:example.com (use the gsc-wizard MCP tools).
- Before changing a title, meta description or URL, look up the page's
  current queries with get_page_performance and keep its top query in the title.
- Treat the last 3 days as incomplete; report settledThrough with any numbers.
- Never call submit_sitemap or submit_indexnow_urls without asking first.
06

Tools Codex can call

128 tools are available to every account. Each advertises MCP annotations such as readOnlyHint and destructiveHint, so Codex can tell reads from writes when it decides whether to ask for approval.

Group Representative tools Scope
Search analyticsquery_search_analytics, query_top_queries, query_top_pages, get_page_performanceread
Analysisfind_decaying_content, analyze_cannibalization, analyze_ctr_curve, score_opportunitiesread
Detectiondetect_anomalies, detect_change_points, get_ranking_changes, forecast_trafficread
Indexing & on-pageinspect_url, bulk_inspect_urls, list_sitemaps, audit_onpage_seoread
Other sourcesBing Webmaster, GA4 (including LLM referral traffic), Core Web Vitalsread
Mutationssubmit_sitemap, submit_indexnow_urls, create_annotation, create_topic_clusterwrite

Dates are optional on every tool: an omitted range defaults to the last 28 complete days, so Codex never has to know today's date. Row-capped tools return a pagination block that says whether more rows exist, so the agent cannot mistake a clipped list for a complete one. The full catalog with arguments is at mcp.gscwizard.com, and the protocol details are in the server reference.

07

Troubleshooting

/mcp does not list gsc-wizard

Run codex mcp list to confirm the entry exists, and check that the block in ~/.codex/config.toml is a url entry rather than a command entry. Restart Codex after editing the file; it reads the config at startup.

Every call returns 401 unauthorized

With a key: the variable named in bearer_token_env_var must be exported in the shell that launched Codex, and must hold the full gscw_live_ key. With OAuth: re-run codex mcp login gsc-wizard. Either way, the account needs an active trial or subscription and at least one connected Search Console property.

A write tool is rejected

That is the read scope doing its job. If you do want Codex to submit sitemaps or IndexNow URLs, create a write-scoped key or use the OAuth login, and keep that credential out of unattended runs.

Calls time out on large properties

Raise tool_timeout_sec for the server, and narrow the request: a path filter or a shorter date range answers faster than a whole-site, sixteen-month query.

Numbers differ from the Search Console UI

Check settledThrough and dataSource on the response. The default range ends on the last complete day, while the UI includes the partial most recent days.

08

Frequently asked questions

Does Codex support remote MCP servers like GSC Wizard?

Yes. Codex supports Streamable HTTP MCP servers configured with a url in ~/.codex/config.toml or added with codex mcp add --url. The GSC Wizard server lives at https://mcp.gscwizard.com/mcp, so there is nothing to install or run locally.

Should I use OAuth or an API key with Codex?

For interactive use, codex mcp login runs the OAuth flow in your browser and needs no key handling. For codex exec, CI jobs and other unattended runs, use a read-scoped gscw_live_ API key stored in an environment variable and referenced with bearer_token_env_var, so the secret never lands in config.toml.

Do the Codex CLI, IDE extension and app share the MCP setup?

Yes. They read the same ~/.codex/config.toml, so adding gsc-wizard once makes it available in the terminal, in the IDE extension and in the desktop app.

Can Codex change anything in my Search Console?

Only with a write-scoped credential. A read-scoped API key cannot call any of the 32 mutation tools (such as submit_sitemap or submit_indexnow_urls); the check runs on the server before the tool executes. You can also narrow the tool list client-side with enabled_tools in config.toml.

How many tools does Codex get?

128 tools are available to every account, covering Search Console performance, analysis, indexing, Bing Webmaster, Yandex Webmaster, GA4 and Google Merchant Center. Sending all of them costs context on every turn, so most Codex setups list only the tools a task needs in enabled_tools.

Does it cost anything?

MCP access is included in GSC Wizard plans and in the free trial, which needs no credit card. Codex usage is billed by OpenAI as usual. See pricing.

Related

Give Codex your search data

Connect a property, run one command, and let the agent that edits your site see how it performs in search.

Search Console tips in your inbox

Practical GSC and GA4 workflows, product updates and SEO experiments. No spam, unsubscribe anytime.