solvegate-mcp

solvegate-mcp

Enables agents to inspect web pages for Cloudflare Turnstile challenges without an API key, and clear Turnstile or WAF challenges using a SolveGate API key.

Category
访问服务器

README

solvegate-mcp

CI npm Glama score

An MCP server that lets an agent deal with Cloudflare Turnstile: check whether a page has one, and clear it when it does.

Three tools. One of them needs no account.

Tool What it does Needs a key
inspect_page Fetch a URL and report whether Cloudflare Turnstile is on it, its sitekey, how it renders, its data-* configuration, and whether the page is a full-page WAF challenge instead of a widget No
solve_turnstile Clear a Turnstile or Turnstile WAF challenge and return a token Yes
get_solve Fetch a solve by id — free, never re-bills Yes

Install

npx solvegate-mcp

Claude Desktop / any MCP client, in your config:

{
  "mcpServers": {
    "solvegate": {
      "command": "npx",
      "args": ["-y", "solvegate-mcp"],
      "env": { "SOLVEGATE_API_KEY": "sk_test_…" }
    }
  }
}

Leave SOLVEGATE_API_KEY out and inspect_page still works. That is deliberate: you should be able to see what the server does before deciding whether to sign up for anything.

Get a key at solvegate.io. A free sk_test_ sandbox key needs no card and returns a deterministic token instantly — right for wiring this up, and it never clears a real gate.

Why inspect_page exists

The commonest wrong turn with a solver is calling it when you should have looked first. Three cases account for most of it:

  • The page carries reCAPTCHA or hCaptcha, not Turnstile. Those are different products from different vendors. This server does not solve them, and neither does SolveGate — inspect_page says so by name instead of letting you find out from a 422.
  • It is a WAF challenge, not a widget. A full-page Cloudflare interstitial has no data-sitekey, because the challenge belongs to a zone rule rather than to a widget you embed. There is nothing to read off the page, and the gate is waf rather than turnstile.
  • The sitekey is rendered from script after load. Then it is not in the served HTML at all, and the tool says that rather than guessing.

Inspecting is free, takes about a second, and is quite often the whole answer.

What it will not tell you

The widget mode. Managed, non-interactive and invisible are stored on the widget inside the Cloudflare account that owns the sitekey. The page carries only the key, so no tool can read the mode off the source — including this one, and including anything that claims otherwise.

It does not matter for solving: all three modes resolve to the same request. A sitekey, a page URL, and a token back.

The one exception is Cloudflare's five documented dummy sitekeys, whose widget type Cloudflare publishes itself. inspect_page reports those, and finding one on a page tells you something useful — you are looking at a staging build rather than production.

Configuration

Variable Default What it does
SOLVEGATE_API_KEY — Your key. sk_test_ for the sandbox, sk_live_ for real gates.
SOLVEGATE_BASE_URL https://api.solvegate.io API base.
SOLVEGATE_SITE_URL https://solvegate.io Where inspect_page runs.
SOLVEGATE_TIMEOUT_MS 30000 Per-request timeout.
SOLVEGATE_MAX_WAIT_MS 60000 How long solve_turnstile waits for a pending solve.

The key is read from the environment and is never a tool argument — a tool argument is model-visible and ends up in transcripts.

Notes on behaviour

Solving is async underneath. solve_turnstile creates the solve with async: true and polls it, rather than holding a connection open for the whole attempt. An agent's tool call has a timeout it does not control, and a synchronous solve makes a slow gate look like a dead tool. It also means a timeout here leaves you a solve id: the error names it, and get_solve will pick it up rather than losing a solve that was already billed.

Errors are results, not exceptions. Every failure comes back as an isError result carrying SolveGate's own error.code — balance_empty, unknown_sitekey, rate_limited, forbidden_target. A model can act on those. It can do nothing useful with a stack trace.

Tokens are single-use and short-lived. expiresAt is Unix seconds; past it, Cloudflare stops accepting the token and the solve record is just a record. Request a token at the moment you submit it.

Check mode before trusting a token. An sk_test_ key returns mode: "sandbox", and a sandbox token will not clear a real gate. The field exists so a test key in a production config fails loudly rather than quietly.

Acceptable use

Solve only against properties you own or are authorised to test. This exists for end-to-end tests that keep failing on a challenge, CI against your own staging, and synthetic monitoring of your own production. The acceptable use policy is the binding version, and targets on the denylist return 403 forbidden_target regardless of what any agent asks for.

Development

npm install
npm run build
npm test          # spawns the built server and speaks MCP to it
OFFLINE=1 npm test  # skips the two tests that reach the network

The tests drive a real stdio transport rather than calling the tool callbacks directly. That is on purpose: a schema the SDK rejects at registration, or a stray write to stdout — which corrupts the transport, since stdout is the transport — only shows up when something actually speaks the protocol to it.

Links

MIT.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选