Integration · Gemini CLI (Google)
Connect Gemini CLI to Google Search Console
5 steps · about 5 minutes
By the GSC PAP team · Updated
Gemini CLI is Google's open-source terminal agent. It supports Model Context Protocol (MCP) servers, so you can register GSC PAP once and ask Search Console questions from your terminal.
Setup mirrors the other CLI agents: install, copy a token from gscpap.com, register the server, then check that it connects.
How to connect Google Search Console to Gemini CLI
- 1
Install Gemini CLI and sign in
Install Gemini CLI with npm or Homebrew, or run it without installing through npx @google/gemini-cli. Start it with gemini and choose Sign in with Google when it asks how to authenticate.
shellnpm install -g @google/gemini-cli # or brew install gemini-cli gemini - 2
Sign in to GSC PAP and copy your token
Go to gscpap.com and click "Sign in with Google." Approve the read-only access it asks for. The connect page then shows your bearer token once, so copy it now. If you lose it, create a new one at app.gscpap.com/account/tokens; your other tokens keep working.
- 3
Register gsc-pap
Run the command below with your token in place of YOUR_TOKEN. The --scope user flag saves the server in ~/.gemini/settings.json so it works in every folder; without it, Gemini CLI saves it to .gemini/settings.json in the current folder. To edit settings.json by hand instead, add an entry under mcpServers (camelCase) with httpUrl set to https://mcp.gscpap.com/mcp and a headers object that holds the Authorization line.
shellgemini mcp add --scope user --transport http \ --header "Authorization: Bearer YOUR_TOKEN" \ gsc-pap https://mcp.gscpap.com/mcp - 4
Trust the folder and check the connection
Gemini CLI connects to MCP servers only in folders you trust. The first time you run gemini in a folder, it asks whether to trust it; choose Trust folder. Then run gemini mcp list from that folder. You want the gsc-pap line to end in Connected. Disabled means the folder is not trusted yet. Disconnected usually means a wrong URL or token.
shellgemini mcp list # Expected output: # ✓ gsc-pap: https://mcp.gscpap.com/mcp (http) - Connected - 5
Ask a Search Console question
Start gemini in a trusted folder and ask: "List my Google Search Console sites and pull the top 5 queries from last week." Gemini asks you to confirm GSC PAP tool calls, then calls list_sites and search_analytics_query and answers in the terminal. Inside a session, /mcp list shows the server's status.
Gemini CLI MCP config: known issues
- ·The settings key is mcpServers. A block named mcp_servers is ignored, and gemini mcp list reports "No MCP servers configured."
- ·In a hand-written entry, use httpUrl for GSC PAP. A plain url with no "type": "http" tells Gemini CLI to use the older SSE transport instead of Streamable HTTP.
- ·In an untrusted folder, Gemini CLI skips every MCP server, including the ones in ~/.gemini/settings.json. Run /permissions inside Gemini CLI to change the current folder's trust.
- ·To keep the token out of settings.json, write the header value as "Bearer $GSC_PAP_TOKEN" and export GSC_PAP_TOKEN in your shell. Gemini CLI fills in environment variables in settings.json strings when it loads them.
- ·The URL must be exactly https://mcp.gscpap.com/mcp, including the /mcp path.
Frequently asked questions
Can I query Google Search Console from the command line?
Yes. Once GSC PAP is registered, Gemini CLI can call Search Console tools such as list_sites and search_analytics_query from your terminal. You ask in plain English and get clicks, impressions, CTR and position back. If you want raw requests without an agent, the same server also answers curl calls; see the direct HTTP guide.
Does Gemini CLI need a Google Cloud project to read Search Console?
No. Gemini CLI uses your Google account to sign you in to Gemini, and GSC PAP asks separately for read-only Search Console access through its own OAuth client. You never open the Google Cloud Console, enable an API, or download credentials.
Is the connection read-only?
Yes. GSC PAP requests the webmasters.readonly scope for Search Console, plus read-only access for GA4. Gemini can read your data but cannot submit sitemaps, request indexing, or edit anything in your properties.
Other integrations
All integrationsClaude Desktop
Connect Claude Desktop to Google Search Console without creating a Google Cloud project. Sign in with Google, paste one config block, restart Claude.
Cursor
Connect Google Search Console to Cursor through a hosted MCP server. Sign in with Google, paste one token into mcp.json, and skip the Google Cloud project.
Claude Code
Add Google Search Console to Claude Code with one claude mcp add command. Hosted and read-only: no Google Cloud project, no OAuth credentials, no Python.
Codex CLI (OpenAI)
Add Google Search Console, GA4 and PageSpeed data to OpenAI's Codex CLI with one TOML block and a bearer token. You never create a Google Cloud project.
VS Code (GitHub Copilot)
Connect Google Search Console to GitHub Copilot in VS Code with one .vscode/mcp.json entry, then ask agent mode about GSC. You skip Google Cloud setup.
Windsurf (Devin Desktop)
Give Windsurf, now Devin Desktop, your Google Search Console data. Add GSC PAP as a remote MCP server with one bearer token and no Google Cloud project.
Zed Editor
Bring Google Search Console into Zed's AI assistant as an MCP context server. You add one settings.json block and a token, with no Google Cloud setup.
JetBrains IDEs
Connect Google Search Console to IntelliJ, PyCharm, WebStorm and other JetBrains IDEs via AI Assistant's MCP settings, without a Google Cloud project.
Continue (extension)
Continue MCP setup for Google Search Console: add one mcpServers entry with a bearer token in VS Code or JetBrains. You do not need a Google Cloud project.
Claude.ai (browser)
Add Google Search Console to Claude.ai as a custom connector. Paste one URL and approve access. No token to copy, no config file, no Google Cloud project.
Direct HTTP (curl, custom agents)
Call the GSC PAP MCP server from curl or your own agent. It is JSON-RPC over HTTP with a bearer token, so you need no MCP client or Google Cloud project.
opencode
Add Google Search Console to opencode as a remote MCP server. One config block with your token, no Google Cloud project, no local server to run.
Cline
Add Google Search Console to Cline in VS Code or the Cline CLI as a remote MCP server. One token, no Google Cloud project, read-only access.
Warp
Add Google Search Console to Warp's agent as a remote MCP server. Paste one JSON block with your token, press Start, and ask about your traffic in the terminal.
LM Studio
Give a local model your Search Console data. Add GSC PAP to LM Studio's mcp.json as a remote server, with one token and no Google Cloud project.
ChatGPT
Add Google Search Console to ChatGPT as a custom MCP server. What the setup looks like, and the plan requirement that decides whether you can do it at all.
Goose
Add Google Search Console to Goose as a streamable_http extension. One block in config.yaml with your token, no Google Cloud project, read-only access.
Google Antigravity
Add Search Console to Google Antigravity as a custom MCP server. It handles dynamic client registration, so the setup is a URL and a sign-in, with no token.
Roo Code
Add Google Search Console to Roo Code in VS Code as a streamable-http MCP server. One block with your token, no Google Cloud project, read-only.
Kilo Code
Add Google Search Console to Kilo Code as a remote MCP server. It can negotiate OAuth for you, or take a bearer token. No Google Cloud project either way.
Amp
Add Google Search Console to Amp as a remote MCP server, in settings or with one CLI command. No Google Cloud project, read-only scopes.
Kiro
Add Google Search Console to Kiro as a remote MCP server. One entry in mcp.json, the token read from an approved environment variable, read-only access.
Raycast
Add Google Search Console to Raycast AI as an HTTP MCP server. Dynamic OAuth means no token to paste, and HTTP servers work on Raycast for iOS too.
GitHub Copilot CLI
Add Google Search Console to GitHub Copilot CLI with one command or one JSON entry. Remote HTTP transport, your token in a header, read-only access.
n8n
Give an n8n AI Agent your Search Console data through the MCP Client Tool node, and schedule the SEO report you keep meaning to write.
LibreChat
Add GSC PAP to librechat.yaml as a streamable-http MCP server, and give every user on your install their own Search Console access rather than a shared one.