SuperAPIAI Directory

contextfetch-mcp

github.com · AI developer platforms

ContextFetch MCP is a web search and content extraction service for AI agents, connected via the MCP (Model Context Protocol) to clients such as Claude Code, Cursor, and Windsurf. It provides 11 tools covering search, web page to Markdown conversion, similar content lookup, research, question answering, crawling, sitemaps, balance inquiry, free key retrieval, and automatic top-up. Search results are returned as Markdown text, trimmed to the passages relevant to the query, making them directly usable by large models. Pricing is $1 per 1,000 searches, and 25 free uses per day are available without a key or registration. The underlying layer is compatible with the Exa and Tavily APIs.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)

About this tool

ContextFetch MCP is an MCP server that provides AI agents with web search and Markdown content directly usable by large models. Its core positioning is to give agents, when they need internet access, page text that has been trimmed and focused on the answer to the question, rather than raw HTML.

Purpose and main capabilities The service provides 11 tools: search, web page to Markdown conversion, similar content lookup, research, question answering, crawling, sitemaps, balance inquiry, free key retrieval, and automatic top-up. All tools return Markdown text. The search tool converts each page to Markdown and trims it to the passages that answer the query. On the free tier, results begin with a line showing the number of free searches remaining that day; when the API provides the relevant data, the end shows latency (total time and the time for the recall, fetch, and rerank stages), whether the answer came from cache, and token savings (trimmed tokens compared with the original page tokens).

How to use In Claude Code, it can be connected with a one-line command and no key; when using a paid key, configure it according to the documentation. Cursor requires adding the configuration in ~/.cursor/mcp.json (global) or .cursor/mcp.json (project); Windsurf requires adding it to ~/.codeium/windsurf/mcp_config.json. To use the free tier, remove the env block or leave CONTEXTFETCH_API_KEY empty. The same JSON configuration also applies to Claude Desktop's claude_desktop_config.json and to any MCP client that launches a stdio server. Running it requires Node.js 18 or later.

Sub-queries for the research tool contextfetch_research supports passing custom sub_queries (asking from different angles), and the tool description prompts the calling model to do so. If omitted, the API derives them from query according to fixed rules: the query itself; query + documentation; when the query involves speed, performance, latency, memory, or comparison (vs, compare), use query + benchmark, otherwise use query + example. If the query already contains a suffix, that suffix is skipped. The entire research is performed server-side through a single /v1/research calls complete, billed at $1 per 1,000 subqueries; failed subqueries are refunded and noted in the header; if all fail, an error is returned.

Free tier and pricing Pay-as-you-go: top-ups start at $10 (10% bonus from $100, 20% bonus from $500). Balances never expire, and one balance covers all keys. Monthly plans and per-key limits are managed in the contextfetch.dev/account dashboard. When the balance or free tier is exhausted (HTTP 402), the tool returns a one-click top-up link (Stripe: card, Apple Pay, Google Pay) plus a one-line message you can relay to the user, after which set CONTEXTFETCH_API_KEY as described above.

Retries and connections Connection failures before the request is sent (refused, DNS, connect timeout), HTTP 429, and HTTP 5xx are retried with exponential backoff plus jitter (about 0.25-0.5 seconds, then 0.5-1 second), with at most 3 attempts per API call and 30 seconds total (including retries). A 429 or 5xx with a Retry-After header waits exactly that duration unless it would exceed the 30-second budget. 400, 401, 402, 422, and other 4xx are not retried. A connection drop after the request is sent is also not retried, because the search may already have been billed. Connections are pooled and kept alive by Node's built-in fetch (undici), with no additional HTTP dependencies.

Error handling Errors do not crash the server; they are returned as tool results with isError: true plus a plain-text explanation: invalid key (401), quota or free limit exhausted (402, listing plans and a purchase link), auto-recharge with no saved card (409, with a purchase link), URL not allowed (400, only public http(s) URLs allowed), a page contextfetch_extract_url cannot fetch (with the reason, e.g. HTTP 404), rate limiting (429), server errors (5xx), network failures, and the 30-second limit per call (including retries).

Publishing Publishing @contextfetch/mcp requires the npm organization contextfetch (create it on npmjs.com and add the publishing account as a member), then run npm publish in that folder; publishConfig.access is already set to public, and prepublishOnly builds first.

Use cases and limitations Suited to AI agent workflows that need web search, web content extraction, and research, especially where results should be consumed directly by models as Markdown. Limitations include: requires Node.js 18+; only public http(s) URLs are supported; the free tier allows 25 per day with no key required; paid usage is billed per search; some tools (balance query, auto-recharge) require a key.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools