Rankrat

io.github.psyb0t由 GitHub 账号 psyb0t 发布v0.20.1更新于 Oct 27, 2026

Self-hosted MCP for owned-site SEO, search analytics, indexing, monitoring, and safe remediation.

概览

AI 生成的概览

自托管的 SEO 与搜索分析 MCP 服务器,整合 Google、Bing、Cloudflare 与性能数据,让助手检查并修复自有站点。

可以做什么
  • 查询 Google Search Console、GA4、Tag Manager 与 Bing Webmaster 数据:分析、报表、站点地图、外链、关键词与配额
  • 执行站点智能分析:整站审计、结构化数据资格、内链图谱、孤岛页面与跨平台对比
  • 检查性能:PageSpeed、Core Web Vitals、CrUX 历史、Clarity 洞察、Cloudflare 分析与本地 Lighthouse 审计
  • 通过 Google/Bing 检查与 DNS 验证完成所有权确认与站点接入
  • 监控与修复:持久监控、站点地图/URL 重新提交、IndexNow、Cloudflare 精确清除与边缘重定向
  • 创建、更新或删除平台资源,如媒体资源、站点地图、代码、触发器与容器
适用场景
当你拥有或管理网站,希望用一个助手入口处理 SEO 排名、搜索分析、索引与性能,而不必在多个平台后台之间切换时使用。适合周期性审计、监控与修复工作,且允许代理对平台做出更改。
运行要求
以本地 Docker 进程运行(Docker 是唯一运行时要求),包装命令通过安装脚本安装。平台凭据在交互式 setup 中创建:Google OAuth 客户端 JSON、Bing Webmaster 密钥、Cloudflare 令牌与 Clarity 令牌。配置档案存放在数据目录,可用 RANKRAT_DATA_DIR 覆盖。HTTP 模式在本机端口监听并使用 bearer 令牌。
安装前请注意
默认可写:已配置的凭据授权所有支持的平台操作,包括创建、更新和删除媒体资源、站点地图、代码与容器。设置 RANKRAT_READ_ONLY=true 可移除写入路由与工具。setup 会收集平台密钥与 OAuth 记录,需保护数据目录。HTTP 模式使用 bearer 令牌,不应暴露到回环地址之外。项目处于 alpha 阶段,建议固定具体版本。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

rankrat

[CI] [coverage] [version] [license] [Docker Pulls]

Every SEO signal lives in its own walled garden with its own dashboard, its own API, and its own bullshit auth dance: Search Console over here, GA4 over there, Bing Webmaster somewhere else, plus Cloudflare, Clarity, PageSpeed, CrUX, GTM, and Bing's backlink data. Point an agent at your rankings and it drowns juggling eight consoles. Rankrat drags all of them behind one self-hosted service, so you tell an agent the outcome you want and it inspects, creates, updates, or rips out provider resources through a single surface — REST and MCP, no dashboards.

It's a rat, not a burglar. You hand it the provider accounts; those credentials are the only authority it has. The resource lists in boundaries.json are inventory and URL-containment data — not a second permission system pretending to keep you safe. Rankrat writes by default; set RANKRAT_READ_ONLY=true and every mutating route and tool disappears from discovery. That's the one switch.

It speaks MCP over stdio, MCP over Streamable HTTP at /mcp, and a FastAPI JSON API under /v1/. Wrapper-managed HTTP gets a bearer; a hand-rolled loopback-only launch can drop it if you know what you're doing.

Status: alpha. The API and tool surface can still move before 1.0 — minor releases may break things on purpose (documented), so pin an exact release if you need it to hold still.

Contents

Capabilities

AreaWhat Rankrat exposes
GoogleSearch Console analytics, inspection and sitemaps; GA4 inventory, historical and realtime reports, ecommerce, funnels, and audiences; Google Tag Manager containers, workspaces, tags, triggers, variables, versions, and publication; property, sitemap, indexing, ownership, onboarding, and rename writes
BingSearch, crawl, indexing, sitemap, backlink, quota, keyword, opportunity, cannibalization, site/submission, and safe content-submission operations
PerformancePageSpeed, Core Web Vitals, CrUX history, Microsoft Clarity insights, Cloudflare analytics, and isolated local Lighthouse audits
Site intelligenceWhole-site audits, schema eligibility, internal-link graphs, orphan pages, content opportunities, and cross-provider comparisons
Ownership and onboardingGoogle/Bing checks, provider-neutral DNS verification through Cloudflare, and idempotent GA4/Search Console/Bing onboarding
BacklinksBing Webmaster backlink intelligence for configured sites
Monitoring and remediationPersistent monitors and issue history, sitemap/URL resubmission, IndexNow, exact Cloudflare purges, finite cache templates, and managed edge redirects

What the runtime advertises is what it does — no hidden endpoints. A read-only deployment drops every write from discovery; a writable one exposes onboarding alongside the rest. The whole list is the MCP tool catalog and the generated OpenAPI document.

Quick start

Install the rankrat command, create the credentials for the providers you want, then run it. Docker is the only runtime requirement.

Install

Download the installer, read it, then run it — per-user (no root) or system-wide:

sh
curl -fsSL https://raw.githubusercontent.com/psyb0t/rankrat/main/install.sh -o rankrat-install.shless rankrat-install.shbash rankrat-install.sh                # per-user   -> ~/.local/bin/rankratsudo bash rankrat-install.sh --system  # system-wide -> /usr/local/bin/rankrat

The mode auto-detects from who runs it; --user / --system force it and --uninstall removes the command. This puts the rankrat wrapper — a readable script that drives the published Docker images — on your PATH. Prefer to work from a source checkout? Clone the repo and use ./rankrat or the make targets instead; see Getting started.

Set up

Run setup. It lists every provider, you pick the ones you actually use, and it walks you through creating each credential — the exact console clicks for Google OAuth, the Bing Webmaster key, the Cloudflare token, the Clarity token — then hides every value you paste. No copying token permissions out of a README:

sh
rankrat setup

Configuring Google? Paste the one-line Desktop OAuth client JSON at the hidden prompt when setup asks — same as every other credential.

Setup validates account access — it does not submit URLs or create properties. Your profile lives in ~/.config/rankrat; override it per launch with rankrat --data-dir /absolute/path or RANKRAT_DATA_DIR for a separate profile per account or workspace. Want to read the credential steps ahead of time, or what each provider actually gives you? See Providers and credentials. From a source checkout the setup step is make setup.

Run it

sh
rankrat            # MCP over stdio (default)rankrat http -d    # REST + Streamable-HTTP MCP + Lighthouse, detached with restartsrankrat upgrade    # re-pin to the latest release, pull it, drop the previous image

From a source checkout: make run (stdio) and make run-http (HTTP over Compose, attached).

rankrat setup pins both psyb0t/rankrat and psyb0t/rankrat-lighthouse to the latest release tag — recorded, along with the HTTP port and read-only flag, in a .env at your profile root — rather than tracking the moving :latest. rankrat upgrade re-pins the images to the newest release, pulls both, restarts a running HTTP stack (reusing the recorded port and read-only flag), and removes the superseded images; it leaves the port and read-only lines untouched. Pass --rolling (or set RANKRAT_ROLLING=1) to use the moving :latest images for a single run without touching the recorded pin. RANKRAT_IMAGE, RANKRAT_LIGHTHOUSE_IMAGE, RANKRAT_HTTP_PORT, and RANKRAT_READ_ONLY still override the recorded values per run.

To set the host settings once instead of per run, put them in a permanent host env file at ~/.config/rankrat/.env (override the path with RANKRAT_ENV_FILE). The wrapper reads it before selecting a profile, so it can set RANKRAT_DATA_DIR (which profile to use) along with RANKRAT_READ_ONLY, RANKRAT_IMAGE, RANKRAT_LIGHTHOUSE_IMAGE, RANKRAT_HTTP_PORT, RANKRAT_OAUTH_CALLBACK_PORT, and RANKRAT_ROLLING. It only fills a variable that is unset or empty, so a --data-dir flag or a real env var still overrides it. This is especially handy for MCP launchers that run rankrat with a minimal environment and never see your shell exports. It is separate from the per-profile .env: the host file selects the profile and the host defaults, while a profile's .env pins that profile's images, port, and read-only flag.

Over HTTP, MCP lives at http://127.0.0.1:8080/mcp and REST under /v1/; stdio needs no port and no bearer. HTTP treats your data directory as its Compose project — it drops a docker-compose.yml in there if one's missing and never touches yours if it isn't. Under the hood that's two long-lived services plus one one-shot volume initializer. The wrapper, plain docker run, raw Compose, HTTP auth, and client wiring all live in Transports and deployment.

Browser audits run in a separate psyb0t/rankrat-lighthouse image over a Unix socket, and it never sees a single provider credential. rankrat stdio brings up an ephemeral Lighthouse sidecar for the session — same capability as HTTP — and tears it down on exit; the wrapper launches it host-side, so the app stays off the Docker socket and reaches Lighthouse only over the socket. See Lighthouse.

Safety model

  • Rankrat is writable by default. Configured account credentials authorize all supported provider operations and all resources those accounts can reach.
  • RANKRAT_READ_ONLY=true removes write REST routes and MCP tools from runtime discovery. It is the only capability switch.
  • The operator decides whether the caller is a careful human-directed agent or a fully autonomous one. Remote HTTP still uses the configured bearer.
  • Resource arrays are cached inventory and containment data. Onboarding and discovery update them so retries reuse existing resources.
  • Secrets are read-only mounts; OAuth records and monitor state have separate writable mounts.

See Configuration and Security before enabling writes or exposing HTTP beyond loopback.

Documentation

The REST source is YAML-first: openapi.yaml, seo-openapi.yaml, and free-seo-openapi.yaml generate openapi.json. Agent clients can use the repository's skill, Claude Code and Codex manifests, or OpenClaw integration under .agents.

Agent integrations

The Rankrat skill works in agents that read .agents/skills/ (such as peen). The integrations below cover both MCP stdio and a shared Streamable HTTP server.

Claude Code

sh
claude plugin marketplace add psyb0t/agentsclaude plugin install rankrat@psyb0t

Codex

sh
codex plugin marketplace add psyb0t/agentscodex plugin add rankrat@psyb0t

Installed through the catalog, the skill invokes as $rankrat:rankrat. Codex also discovers it as $rankrat directly from a Rankrat checkout.

OpenClaw

sh
openclaw skills install @psyb0t/rankratopenclaw plugins install clawhub:@psyb0t/rankrat

The plugin launches the published image over MCP stdio using the standard $HOME/.config/rankrat/ layout. Set one absolute RANKRAT_DATA_DIR in every client to reuse the same provider accounts, OAuth authorization, inventory, and monitor state from any site repository. To use an already-running shared server, configure OpenClaw for its authenticated http://127.0.0.1:8080/mcp Streamable HTTP endpoint. See Transports.

Development

Everything runs in containers — no "works on my machine" roulette:

sh
make helpmake lintmake test

Mocked tests need zero credentials. Live tests are opt-in and pull their one account plus a safe target straight from your profile, so they can't wander off and touch something they shouldn't. Full contributor guide in Development.

Project information

WTFPL license · Release history · Dependency attribution · Issues

来源:README.md,提交 d32dce5

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

2
  1. v0.20.1最新Oct 10, 2026
  2. v0.20.0Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分