Integration · Codex CLI (OpenAI)
Add GSC PAP to OpenAI Codex CLI
4 steps · about 4 minutes
Codex CLI is OpenAI's terminal coding agent. From version 0.30+ it speaks the Model Context Protocol natively over Streamable HTTP, which means external tools, like your Search Console data via GSC PAP, can be plugged in through a single TOML config block.
This guide walks through every step from a fresh Codex install to your first SEO query. About four minutes end-to-end.
Steps
- 1
Install Codex CLI
If you have not already, install Codex CLI from openai.com or via the package manager for your platform. Sign in with `codex login` using your OpenAI account. Verify with `codex --version` (>= 0.30).
- 2
Sign in to GSC PAP and copy your token
Visit gscpap.com and click "Sign in with Google." Grant the read-only Search Console + GA4 scopes. After the OAuth callback, the connect page shows a one-time bearer token, copy it now.
- 3
Edit ~/.codex/config.toml
Open the Codex config file. Add an `[mcp_servers.gsc-pap]` block with the URL and a reference to an env var for the bearer token. The env-var pattern keeps the secret out of your dotfiles.
toml[mcp_servers.gsc-pap] url = "https://mcp.gscpap.com/mcp" bearer_token_env_var = "GSC_PAP_TOKEN" - 4
Export the token and restart Codex
Add `GSC_PAP_TOKEN=<paste-here>` to your shell rc file (`~/.zshrc` / `~/.bashrc`) so it persists across sessions. Source the rc, then run `codex` and ask: "What sites are in my Search Console?" Codex calls list_sites and replies with your verified properties.
shellecho 'export GSC_PAP_TOKEN="paste-your-token-here"' >> ~/.zshrc source ~/.zshrc codex
Common gotchas
- ·Codex resolves the env var at process start. If you exported it in one terminal but launched Codex in another, the var is missing. Either re-source your rc or use a terminal multiplexer that inherits env.
- ·If `codex mcp list` doesn't show gsc-pap, run `codex mcp add` interactive flow to verify the URL is reachable. The most common cause is a typo in the TOML (missing closing quote, etc.).
- ·Codex IDE extension (the VS Code variant) reads the same `~/.codex/config.toml`. Edit once, available in both surfaces.
- ·Token expired or 401: mint a new bearer at /account/tokens. Old tokens stay valid until you revoke them, so you can rotate without breaking other clients.
Other integrations
All integrationsClaude Desktop
Wire your Google Search Console to Claude Desktop in five minutes. Step-by-step instructions for macOS and Windows, with the exact JSON config to paste.
Cursor
Use Search Console data inside Cursor's AI chat. Five-step setup, single JSON config, works in any project.
Claude Code
Two-line CLI setup for Claude Code, Anthropic's terminal-based agent. User-scope means it works in every project automatically.
VS Code (GitHub Copilot)
Wire your Google Search Console + GA4 + PageSpeed data into VS Code's GitHub Copilot agent mode in five minutes. Native MCP support since VS Code 1.101.
Gemini CLI (Google)
Connect Search Console, GA4, and PageSpeed data to Google's Gemini CLI agent. Streamable HTTP MCP support, bearer-token auth, works inside Gemini's 1M-token context window.
Windsurf IDE
Plug Search Console, GA4, and PageSpeed data into Windsurf's Cascade agent in five minutes. Bearer-token auth, works with both local and remote agent runs.
Zed Editor
Wire Search Console, GA4, and PageSpeed Insights into Zed's AI assistant. Native MCP context-server support via settings.json.
JetBrains IDEs
Wire Search Console, GA4, and PageSpeed into IntelliJ, PyCharm, WebStorm, GoLand, any JetBrains IDE 2025.2 or newer. Native MCP support via the AI Assistant settings.
Continue (extension)
Continue is a popular open-source AI coding assistant with VS Code and JetBrains extensions. Add GSC PAP as an MCP server in three minutes via its config.json.
Claude.ai (browser)
Connect Search Console, GA4, and PageSpeed to Claude.ai in your browser through the Connectors panel. OAuth flow, no token to copy, no config file to edit. Works for free and paid Claude plans.
Direct HTTP (curl, custom agents)
GSC PAP speaks Streamable HTTP MCP. Any client that can POST JSON-RPC over HTTP with a bearer Authorization header can use it, curl, Python scripts, custom LangChain agents, even shell aliases.