Searchdock Cli

io.github.xplormityaiv0.1.3更新于 Oct 11, 2026

Read-only Google Search Console analytics, URL inspection and sitemaps via SearchDock CLI.

概览

AI 生成的概览

让助手以只读方式访问 Google Search Console:搜索分析、网址检查和站点地图状态。

功能
通过本地 stdio 服务器提供五个只读 MCP 工具:searchdock_sites、searchdock_analytics、searchdock_sitemaps、searchdock_inspect 和 searchdock_report。分析数据涵盖点击、展示、点击率、平均排名,以及按查询词、页面、日期、设备或国家/地区的细分,并可按品牌词筛选。站点地图工具报告 Google 的处理状态,检查工具返回 Google 收录的指定网址版本。报告可针对指定网址合并生成,并写入新的 JSON 文件。
适用场景
适合让助手回答网站 Google 搜索表现的问题、检查特定网址是否被收录,或在不打开 Search Console 界面的情况下跟踪站点地图处理情况。它是报告与检查工具,不是完整的技术 SEO 审计,也无法请求重新收录或测试实时网址。
运行要求
以本地 stdio 进程运行;所有发行方式(包括 Python 启动器)都要求 Node.js 22 或更高版本。访问 Google 需要你自己的 Google Cloud 项目、启用 Search Console API,并提供桌面应用类型的 OAuth 客户端 JSON,还需完成一次浏览器授权。不包含共享开发者凭据,也未声明任何环境变量。
安装前请注意
它申请只读的 Google 访问权限(webmasters.readonly),并将刷新令牌以受权限保护的本地 JSON 保存,SearchDock 不对其加密。OAuth 客户端 JSON 路径和令牌不应被打印或提交到仓库。用 --output 写出的报告可能包含私密搜索数据,请勿纳入 Git。数据来自 Google API,会省略部分匿名化查询且可能滞后。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Searchdock Cli,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

SearchDock CLI — Google Search Console CLI

Read Google Search Console analytics, inspect indexed URLs, and monitor sitemaps from your terminal or AI agent.

SearchDock is open source, runs locally, and requests read-only Google access. Use the same core through npm, Python, MCP, a Codex or Claude Code plugin, or a standalone agent skill. Bing Webmaster Tools support is planned.

Set up with your agent

Copy this prompt into your coding agent:

text
Set up SearchDock CLI for this project usinghttps://github.com/xplormityai/searchdock-cli. Read its README andskills/searchdock-setup/SKILL.md. Check Node.js 22+, reuse an existinginstallation, or install the CLI from npm. Install searchdock-setup andsearchdock skills for the agent I am using, scoped to this project, andconnect the stdio MCP server if this agent supports it. Keep existingagent configuration. For Google access, ask only for the local path tomy Desktop OAuth client JSON and guide me through read-only browserconsent. Never print credentials or tokens. Let me choose the SearchConsole property, then verify the connection with a metrics request.Tell me exactly which steps succeeded and what still needs my input.

Installation commands

Node.js 22 or later is required for every distribution.

Packages: npm · PyPI.

sh
# npmnpm install --global searchdock-clisearchdock --help
# No global installationnpx --yes [email protected] --help
# Python; Node.js is still requiredpipx install searchdock-cli# Alternatively: python -m pip install searchdock-cli

The Python package is a launcher containing the exact same JavaScript runtime. It has no separate Google implementation. If you install both packages, use python -m searchdock_cli to select the Python launcher explicitly.

Install both skills for Codex in the current project:

sh
npx --yes skills add xplormityai/searchdock-cli --skill searchdock-setup searchdock --agent codex --copy --yes

Replace codex with claude-code, cursor, opencode, or your supported agent. Add --global only for installation across projects. Skills do not install the CLI or authorize Google access. Plugin, MCP and manual setup.

To run from source:

sh
git clone https://github.com/xplormityai/searchdock-cli.gitcd searchdock-clinpm cinpm run buildnode dist/cli.cjs --help

Connect Google Search Console

Create a Google OAuth Desktop app client in your own Google Cloud project, enable the Search Console API, and download the client JSON. See Google setup for the steps and testing-mode limits. No shared developer credentials are included.

sh
searchdock auth login --client-file /path/to/desktop-client.jsonsearchdock sites listsearchdock sites use sc-domain:example.comsearchdock auth status

Google opens a local browser consent flow. SearchDock uses PKCE, validates the callback state, and listens only on 127.0.0.1. It requests webmasters.readonly and keeps the refresh token in your operating system's per-user configuration directory, outside this repository. Credentials are stored as permission-protected local JSON, not encrypted by SearchDock. See privacy.

Commands

sh
# Search performance and top queriessearchdock analytics --days 28searchdock analytics --dimensions page --days 28 --jsonsearchdock analytics --dimensions date --start 2026-09-01 --end 2026-09-30
# Exact, case-insensitive brand queriessearchdock analytics --brand "Your Brand" --json
# Sitemaps and Google's indexed URL statussearchdock sitemapssearchdock inspect https://example.com/
# Combined report, including only the URLs you specifysearchdock report --urls https://example.com/,https://example.com/about --jsonsearchdock report --output ./private-report.json
# Multiple accounts/sitessearchdock auth login --client-file /path/to/client.json --profile worksearchdock sites use https://example.com/ --profile worksearchdock analytics --profile work --site https://example.com/ --json
# Diagnostics and local credential removalsearchdock doctorsearchdock auth logout

--json writes machine-readable results to stdout and errors to stderr with a nonzero exit status. --output saves JSON to a new file and refuses to overwrite an existing one. Keep private reports out of Git yourself. CSV is not yet supported. For URLs containing commas, use the MCP urls array or the JavaScript API for batch inspection.

Report windows default to 28 days ending three days before today in Pacific Time, to allow for Search Console processing. You can specify exact dates. Finalized data may still lag. Pagination supports up to 100,000 requested rows, but Google's API returns top rows and omits some anonymized query data. Missing rows do not prove zero demand; zero impressions make average position meaningless.

AI agents and MCP

SearchDock provides five read-only MCP tools: searchdock_sites, searchdock_analytics, searchdock_sitemaps, searchdock_inspect, and searchdock_report. Authenticate locally first; MCP tools do not start consent or change account settings.

Add this stdio server to any compatible MCP client:

json
{  "mcpServers": {    "searchdock": {      "command": "npx",      "args": ["--yes", "[email protected]", "mcp"]    }  }}

For a source checkout, set command to node and args to ["/absolute/path/searchdock-cli/dist/cli.cjs", "mcp"]. Windows clients that launch npx.cmd through a shell may need command: "cmd" and args: ["/c", "npx", "--yes", "[email protected]", "mcp"]. Use your client's Windows configuration guidance.

Plugins use the same pinned npm version:

sh
# Codex CLIcodex plugin marketplace add xplormityai/searchdock-clicodex plugin add searchdock@searchdock

In Claude Code:

text
/plugin install searchdock --marketplace xplormityai/searchdock-cli --scope project

This one-step command requires Claude Code 2.1.275+. Earlier versions can use /plugin marketplace add xplormityai/searchdock-cli, then /plugin install searchdock@searchdock --scope project.

For standalone skills, copy both skills/searchdock and skills/searchdock-setup into your agent's skills directory. Codex uses ~/.agents/skills/; Claude Code uses ~/.claude/skills/. Install the CLI separately. Both skills are included in the plugin. The repository includes portable Agent Plugins, Codex and Claude manifests; local stdio plugins are not automatically listed in hosted plugin directories.

You can also install the skill with the open skills installer:

sh
npx --yes skills add xplormityai/searchdock-cli --skill searchdock-setup searchdock --agent codex --copy --yes

SearchDock is published in the official MCP Registry under io.github.xplormityai/searchdock-cli. Release workflows update its metadata using GitHub OIDC.

What the Google API can and cannot tell you

AvailableRequires Search Console UI or an export
Clicks, impressions, CTR, average positionRequest indexing
Top queries/pages and date/device/country breakdownsTest a live URL
Exact brand-query performanceFull Page indexing exclusions table
Sitemap processing statusManual actions and security issues
Google's indexed version of specific URLsGuaranteed current ranking or indexing

SearchDock's report flags returned sitemap errors/warnings, pending processing and non-PASS verdicts for the URLs you inspect. It is not a complete technical SEO audit, and it does not provide invented SEO/AEO/GEO scores.

JavaScript API

js
import { selectedContext } from 'searchdock-cli';
const { adapter, site } = await selectedContext({ profile: 'default' });const result = await adapter.analytics(site, { days: 28, dimensions: ['page'] });console.log(result.rows);

The provider registry declares capabilities separately. Bing can be added as an adapter without changing the CLI, MCP or Python distribution model. Provider-specific differences must remain explicit. See architecture.

Develop and release

sh
npm cinpm run buildnpm testnpm run checkpython -m pip install build twinenpm run release:artifactspython -m twine check dist/releases/searchdock_cli-0.1.3-py3-none-any.whl dist/releases/searchdock_cli-0.1.3.tar.gz

Release instructions cover npm/PyPI accounts, OIDC trusted publishing, versioning and GitHub release artifacts. Package creation alone does not publish anything.

Built by Xplormity Collective. MIT license.

来源:README.md,提交 d091292

工具

0
工具元数据尚未被收录。

版本历史

1
  1. v0.1.3最新Oct 11, 2026