
Research
/Security News
Popular npm Packages in the keyv and Cacheable Namespaces Compromised in Active Supply Chain Attack
Popular npm packages keyv and cacheable compromised.
mcp-google-gsc
Advanced tools
MCP server for Google Search Console API with multi-client support, search analytics, and URL inspection.
MCP server for Google Search Console -- search analytics, URL inspection, and site management via Claude.
npm install mcp-google-gsc
git clone https://github.com/mharnett/mcp-search-console.git
cd mcp-google-gsc
npm install
npm run build
Security: Never share your .mcp.json file or commit it to git -- it may contain API credentials. Add .mcp.json to your .gitignore.
mcp-gsc supports two authentication modes. Pick whichever fits your setup. Neither requires any file living at a hardcoded machine-local path -- credentials come from environment variables (or a config.json you create).
Which mode to use:
Precedence when both are configured: if a service-account keyfile is explicitly set (GOOGLE_APPLICATION_CREDENTIALS, or credentials_file in config.json), it wins over any OAuth refresh token or stored OAuth credentials. If neither is configured, the server fails loudly at startup with an onboarding message rather than silently guessing -- there is no machine-local default and no silent runtime failover between modes.
Use this if you want to authorize with your own Google login (the account that has Search Console access). Best for personal / interactive use.
http://localhost loopback redirect -- you do not need to pre-register a port.)export GOOGLE_GSC_CLIENT_ID=...apps.googleusercontent.com
export GOOGLE_GSC_CLIENT_SECRET=...
access_type=offline):
node get-refresh-token.cjs
Do not redirect this command's stdout to a shared log -- it prints the refresh token to stdout by design.
export GOOGLE_GSC_REFRESH_TOKEN=...
The server reads GOOGLE_GSC_CLIENT_ID, GOOGLE_GSC_CLIENT_SECRET, and GOOGLE_GSC_REFRESH_TOKEN from the environment at runtime.
Alternatively, run the guided helper npx mcp-gsc-auth, which performs the same PKCE OAuth flow, lets you pick a default Search Console property, and writes the result to a per-user credentials file.
Use this for server / headless / always-on contexts -- it is the recommended path when no human is present to complete or refresh an interactive login.
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/your/service-account-key.json
Both modes request a single, read-only scope: https://www.googleapis.com/auth/webmasters.readonly. All four tools are reads -- nothing writes -- so the server never asks for read/write access.
The scope is defined once in config.json under oauth.scope (see config.example.json). The OAuth helper and the runtime read the same value, so they never drift. If config.json is absent (e.g. a fresh install), the committed read-only default is used.
To map working directories to Search Console properties, create a config.json in the project root (see config.example.json):
{
"oauth": {
"scope": "https://www.googleapis.com/auth/webmasters.readonly"
},
"clients": {
"my-project": {
"name": "My Project",
"folder": "/path/to/project",
"site_url": "https://example.com/"
}
}
}
Add to your Claude Code .mcp.json:
{
"mcpServers": {
"gsc": {
"command": "node",
"args": ["/path/to/mcp-gsc/dist/index.js"]
}
}
}
Or if installed globally:
{
"mcpServers": {
"gsc": {
"command": "npx",
"args": ["mcp-google-gsc"]
}
}
}
Claude Desktop: Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows).
| Tool | Description |
|---|---|
gsc_get_client_context | Detect the GSC property from your working directory based on config mapping |
gsc_list_sites | List all verified Search Console properties accessible to the authenticated account |
gsc_search_analytics | Query search performance data (clicks, impressions, CTR, position) with dimension and filter support |
gsc_inspection | Inspect a URL for indexing status, mobile usability, and rich results |
Supports dimensions: query, page, device, country, date. Filter by any dimension with operators like equals, contains, notContains. Date range defaults to the last 28 days.
Returns index coverage, crawl status, mobile usability verdict, and rich result details for a specific URL within a property.
MIT -- see LICENSE.
Built by Mark Harnett / drak-marketing
FAQs
MCP server for Google Search Console API with multi-client support, search analytics, and URL inspection.
The npm package mcp-google-gsc receives a total of 24 weekly downloads. As such, mcp-google-gsc popularity was classified as not popular.
We found that mcp-google-gsc demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Popular npm packages keyv and cacheable compromised.

Security News
A misconfiguration gave three Anthropic models internet access, and one, believing it was in a simulation, shipped a credential-stealing package to PyPI.

Security News
/Company News
Socket has joined the new Composer and Packagist sponsorship program as a launch sponsor, supporting the team that keeps PHP's package ecosystem secure.