# lachy3433/contextfetch-mcp [Health: Active]

**Category:** 🔎 Search & Data Extraction  
**Repository:** https://github.com/lachy3433/contextfetch-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 1053  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/lachy3433-contextfetch-mcp

## Description
Web search and page contents as LLM-ready Markdown, pruned to the passages relevant to the query, plus cited answers, research, crawl and site maps. Keyless free tier.

## Tools
Capabilities this server exposes over MCP:

- **contextfetch_search** — Search the web and get LLM-ready Markdown. Each result has its title, URL and only the passages relevant to the query (cross-encoder pruned context), so it costs far fewer tokens than raw pages. Use for current events, documentation, APIs, research and fact checking.
- **contextfetch_extract_url** — Fetch a public web page (docs, articles, GitHub files, arXiv papers) as clean Markdown with tables preserved. Pass `query` to get only the passages relevant to it instead of the whole page.
- **contextfetch_find_similar** — Find pages similar to a given URL (alternatives, related docs, competing libraries), excluding the source domain. Returns titles, URLs and the most relevant passages as Markdown.
- **contextfetch_research** — Research a question in one call, server-side: runs up to 5 web searches (sub-queries) concurrently, dedupes the pages by URL, ranks them all against the question with a cross-encoder and returns one Markdown evidence pack with numbered [n] sources and their query-pruned passages, quoted verbatim (no generated text). Costs 1 credit. Pass your own `sub_queries` (distinct angles on the question) for better coverage. If omitted they are derived from `query`: the query itself, query + "documentation", and query + "benchmark" when it asks about speed, performance or comparisons, else query + "example" (a suffix the query already contains is skipped).
- **contextfetch_deep_research** — Deep research in one call, no LLM: a deep search of the question, its sub-topics (or your sub_queries) as searches of their own, and the pages its list and index results link to, returned as one cited report: summary, key facts, a section per sub-topic and the sources, every passage quoted verbatim with [n]. Costs $0.003 a report ($3 per 1,000). For a quick evidence pack use contextfetch_research.
- **contextfetch_answer** — Answer a question with passages quoted verbatim from the web, never generated: searches, scores every passage of the top pages with a cross-encoder and returns the best ones with [n] citations to their sources. Use it for quick factual lookups; the quotes may not fully answer an open-ended question. Costs 1 credit.
- **contextfetch_agent** — A finished answer to a question, written with [n] citations to live web sources: one deep search reads the top pages and an LLM (gpt-oss-120b) writes the answer from them only, saying what is missing rather than guessing; when the pages lack the answer it searches again with new queries. Use it when you want the answer itself; for quotes only use contextfetch_answer, for raw sources contextfetch_search. About 2 s. Costs $0.001 ($1 per 1,000); depth standard (a short research agent, ~10-15 s, for questions that need several facts) $0.002.
- **contextfetch_crawl** — Crawl one website from a start URL and get its pages as Markdown: same-site links only, up to `max_depth` hops (<= 3) and `limit` pages (<= 50), robots.txt obeyed. Pass `query` to rank the pages by relevance and return only their relevant passages. Costs 1 credit per page returned.
- **contextfetch_map** — List a website's URLs without fetching its pages: its sitemaps (from robots.txt, else /sitemap.xml) plus the start page's links, same site only, up to `limit` (<= 5,000). Use it to find the right pages before contextfetch_extract_url or contextfetch_crawl. Costs 1 credit.
- **contextfetch_balance** — Show the API key's remaining credits, daily burn rate (7-day average) and auto-reload settings, including the last auto-reload error if a payment failed. Needs CONTEXTFETCH_API_KEY; free. Check it before long jobs.
- **contextfetch_auto_reload** — Turn auto-reload on or off, or change it: when credits drop below `threshold`, the saved card buys `pack` again, up to `monthly_max_usd` per month. Needs CONTEXTFETCH_API_KEY and a card saved at checkout. The monthly cap cannot be raised above $500 here.
- **contextfetch_get_free_key** — Get a free ContextFetch API key with 2,500 searches (one per network, no sign-up). This session uses it right away; give it to your user so they can set CONTEXTFETCH_API_KEY to keep it.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "contextfetch-mcp": {
    "command": "npx",
    "args": ["-y","@contextfetch/mcp"],
    "env": {
      "CONTEXTFETCH_API_KEY": "",
      "CONTEXTFETCH_API_BASE": ""
    }
  }
}
```

**Requires environment variables:** `CONTEXTFETCH_API_KEY`, `CONTEXTFETCH_API_BASE` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What lachy3433/contextfetch-mcp does

lachy3433/contextfetch-mcp exposes ContextFetch web retrieval features through the Model Context Protocol. It can search the web, fetch public pages as clean Markdown, identify related pages, assemble research evidence, answer factual questions with quoted passages, crawl sites, and enumerate site URLs.

Search results contain titles, URLs, and passages selected for relevance by a cross-encoder. Page extraction preserves tables and can also return only passages relevant to a supplied query. Research responses combine concurrent sub-queries into one evidence pack, deduplicate URLs, rank the collected pages, and label quoted source passages with numbered markers.

## How it works

The package runs as a stdio MCP process and sends requests to the ContextFetch API. Install-time execution uses `npx -y @contextfetch/mcp`, so an MCP client launches the package and communicates with it over standard input and output.

Research can use caller-supplied sub-queries or derive up to five angles from the main query. The compatibility tool, `contextfetch_deep_research`, retains the earlier research interface and supports up to three sub-queries. Crawling stays on the starting site, follows robots.txt, and can limit depth, result count, and URL paths. Mapping discovers URLs from sitemaps and links on the starting page without fetching the pages.

All tools return Markdown text. Free-tier responses show the remaining daily search count, while API responses can include latency, cache, and token-pruning details. Connection failures, rate limits, and server errors receive bounded retries with backoff; tool errors are returned as MCP results instead of terminating the server.

## Setup and configuration

Node.js 18 or newer is required. Claude Code can add the server with:

```bash
claude mcp add contextfetch -- npx -y @contextfetch/mcp
```

A paid account can be configured with `CONTEXTFETCH_API_KEY`. Leaving the variable unset or empty uses the keyless tier, which provides 25 searches per day per network without signup. The `contextfetch_get_free_key` tool can claim a network free key with 2,500 searches and use it for the session; the returned key can then be stored in `CONTEXTFETCH_API_KEY`.

`CONTEXTFETCH_API_BASE` defaults to `https://api.contextfetch.dev` and can point to another engine when self-hosting. Cursor, Windsurf, and Claude Desktop use the same stdio configuration pattern with `npx`, package arguments, and an optional environment block.

## Tools and capabilities

- `contextfetch_search` searches the web with optional domain inclusion and exclusion filters.
- `contextfetch_extract_url` converts public documentation, articles, GitHub files, and arXiv pages into Markdown.
- `contextfetch_find_similar` finds related pages while excluding the input page's domain.
- `contextfetch_research` and `contextfetch_deep_research` produce source-numbered evidence packs from multiple queries.
- `contextfetch_answer` returns extractive, quoted passages with a numbered source list.
- `contextfetch_crawl` retrieves same-site pages with depth and optional relevance pruning.
- `contextfetch_map` lists sitemap and start-page URLs without fetching page contents.
- `contextfetch_balance` reports credits, recent burn rate, and reload settings.
- `contextfetch_auto_reload` manages threshold-based purchases when a saved card is available.

Search, extraction, answers, similar-page discovery, and mapping cost $1 per 1,000 operations. Crawling costs $1 per 1,000 returned pages, and research costs $1 per 1,000 sub-queries. The balance does not expire.

## Limitations and notes

Retrieval tools accept public HTTP(S) URLs. The free keyless tier has a daily network limit, while the claimed free key provides 2,500 searches per network. Paid requests require available credits; depleted balances return a top-up link. Auto-reload requires an API key and saved payment card, with a maximum monthly cap of $500.

`contextfetch_answer` is extractive and therefore better suited to factual lookups than open-ended responses. Research and answer passages are quoted from sources, so an agent remains responsible for interpreting the evidence. The project is MIT licensed.

_Full upstream README: https://allmcps.com/mcp/lachy3433-contextfetch-mcp/readme_

