ModelBrain Search Console

Free, read-only Google Search Console connector for Claude, ChatGPT and Cursor. Every property your Google account can see, the full 16 months, no Google Cloud setup: search performance, period comparisons, URL inspection and sitemaps. Hosted at https://gsc.modelbrain.net/mcp, open source (MIT).

Hosted MCP Server

npx add-mcp 'https://gsc.modelbrain.net/mcp'

Installs into Claude Code, Codex, Cursor and more

Documentation

ModelBrain free connectors

Hosted, read-only MCP connectors from ModelBrain. Free for every account and every property.

First connector: ModelBrain Search Console at https://gsc.modelbrain.net/mcp.

Tools (Search Console)

ToolWhat it returns
list_sitesEvery property the Google account can see, with permission level
search_performanceClicks, impressions, CTR, position by query, page, country, device, date or search appearance, with filters and paging (up to 25,000 rows a call, 16 months)
inspect_urlIndex status, coverage, last crawl, canonical, robots and rich results for one URL
list_sitemapsSubmitted sitemaps with last read, errors, warnings and URL counts
compare_periodsTwo date ranges side by side, plus the biggest risers and fallers

Every tool is marked readOnlyHint: true. The only Google scope requested is webmasters.readonly.

How sign-in works

  1. The AI app registers itself (/register, RFC 7591) and sends the person to /authorize with a PKCE S256 challenge.
  2. We send them to Google, asking for openid and the one read-only scope, with offline access.
  3. Google returns to /oauth/google/callback. We read the account ID from the ID token, seal the Google refresh token with ChaCha20-Poly1305 and store it.
  4. The app swaps a one-time code at /token for our own access token (1 hour) and refresh token (90 days, rotated on use).

What is stored

  • Google account ID and the sealed Google refresh token.
  • SHA-256 hashes of our own codes and tokens.
  • Registered app names and redirect addresses.

Search data passes straight through and is never stored. Logs hold method, tool name, outcome and duration only. No email addresses are kept.

Configuration

VariableMeaning
CONNECTORgsc (default)
BASE_URLPublic address, for example https://gsc.modelbrain.net
BINDListen address, default 0.0.0.0:8787
DB_PATHSQLite file, default connectors.db
GOOGLE_OAUTH_JSON_FILEPath to the client JSON downloaded from Google Cloud (or set GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET, each also as *_FILE)
TOKEN_KEY / TOKEN_KEY_FILE32 random bytes, base64 (openssl rand -base64 32). Losing it signs everyone out.
EXTRA_REDIRECT_HOSTSComma-separated extra https hosts allowed as app callbacks
CALLS_PER_MINUTEPer-account tool call limit, default 60
RUST_LOGLog filter, default info

Local run

export BASE_URL=http://localhost:8787
export GOOGLE_OAUTH_JSON_FILE=$HOME/path/to/client_secret.json
export TOKEN_KEY=$(openssl rand -base64 32)
cargo run --release

Then add http://localhost:8787/mcp as a connector in an MCP client that allows localhost, or test with the MCP Inspector.

Tests

cargo test
cargo clippy --all-targets -- -D warnings

Security

  • The code that handles your Google access is all here: sign-in in src/oauth.rs, token sealing in src/crypto.rs, storage in src/store.rs.
  • The connector asks Google only for webmasters.readonly. It cannot change anything in Search Console.
  • You can remove its access at any time at https://myaccount.google.com/permissions. The connector then drops every token it issued for your account.
  • Report a security problem privately to security@modelbrain.net rather than in a public issue.

License

MIT. See LICENSE. "ModelBrain" is a trademark of Matthew Firth; the license covers the code, not the name or logo.