Self-hosted web research for MCP agents.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
Spend tokens on answers, not webpages.
TinySearch searches, crawls, and reranks the web locally, then gives your agent only the evidence worth putting in its context.
Documentation Β· Quick start Β· Python Β· Discord
TinySearch is a self-hosted web-research tool for AI agents. It searches the web, reads the best pages, removes low-value content, and returns compact evidence with source URLs.
Your model receives the useful passages instead of paying to process entire webpages.
TinySearch is part of TinySuite, a suite of focused tools designed to make agentic operations cheaper by minimizing token usage through smart retrieval, selection, and context-management techniques.
| Tier | Use it when | Entry point | Search backend |
|---|---|---|---|
| 1. Python library | You are building with TinySuite or Python | pip install tinysuite-search | DDGS |
| 2. One-command MCP | An MCP client should launch TinySearch for you | uvx --from "tinysuite-search[server]" tinysearch | DDGS |
| 3. Docker + SearXNG | You want the full self-hosted stack and HTTP MCP | docker compose ... up -d | Bundled SearXNG |
Tiers 1 and 2 need no search service. Tier 3 adds a dedicated SearXNG service, persistent model storage, and a network MCP endpoint. See the installation guide for the Docker setup.
A search result is not yet useful evidence. Agents often have to open several pages, ingest navigation and boilerplate, and spend paid input tokens deciding which passages matter.
TinySearch moves that work in front of the model:
That lowers cost in three ways:
Search broadly. Read locally. Pay the model only for the evidence that matters.
Actual savings depend on the pages, evidence limits, client model, and provider pricing. TinySearch reduces the web content sent to the model; it does not control what the client does with that evidence afterward.
The cost panel uses an illustrative $3.00 per million input-token rate and excludes search, crawling, model output, and downstream agent use.
The naive baseline isn't a strawman product, it's the same pages TinySearch crawled for each query, fed to the model unfiltered, the way a generic "search, then fetch the page" tool (a plain web-search-plus-fetch loop, the kind built into most coding agents) would. Reproduce or rerun it yourself:
With uv installed, add TinySearch to any MCP
client:
The client launches TinySearch over stdio when it needs it. No repository clone, hosted account, or paid search key is required.
Fast search starts without Chromium or an embedding model. The first scrape
initializes Chromium; focused scraping and the legacy research tool also
initialize the configured embedding model. Pre-warm both ahead of time if you
will use those workflows:
Prefer Docker, a remote MCP endpoint, or a source checkout? Follow the installation guide.
| Tool | Use it when |
|---|---|
search(query) | You need fast, backend-ordered discovery without crawling or reranking |
scrape_urls(items) | You know one to five pages; each item may use * for its configured clean page-order token budget |
get_current_datetime() | A question depends on the current date or time |
research(query) | Legacy compatibility only; deprecated in favor of search followed by scraping |
TinySearch deliberately stays focused. It is a retrieval layer, not another agent, chat interface, hosted search product, or permanent web index.
See the complete MCP tool reference for parameters and response contracts.
TinySearch does not spend another model call writing the final answer. The
recommended flow is search for lightweight discovery, then scrape_urls for
the pages worth reading.
Successful MCP tool-result text is XML. A search result looks like this:
scrape_urls returns each page's selected Markdown chunks under one
<url_grounded_answers> batch root, and get_current_datetime returns
<current_datetime>. Dynamic values are escaped so retrieved content cannot
forge the XML boundaries around it.
MCP still uses its standard JSON-RPC transport envelope, including
protocol-level errors and optional structuredContent. Python and FastAPI keep
their structured JSON contracts for applications that need to store, inspect,
or transform the evidence.
search returns backend-ordered titles, URLs, previews, and upstream dates
without starting Chromium or an embedding model.scrape_urls reads one to five known pages concurrently. Omit an item's
query or use "*" to keep clean Markdown in page order within the
configured token budget.The deprecated MCP research tool retains the older all-in-one search, crawl,
and rerank pipeline for compatibility. New MCP integrations should compose
search with scrape_urls instead.
TinySearch also works as a regular Python package:
The Python API returns stable, JSON-serializable results. search accepts a
per-call limit from 1 to 50. scrape_urls accepts a per-call max_tokens
budget (4,000 by default); omit an item's scrape query or use "*" for
page-order mode. Rendering structured evidence into an LLM prompt is explicit,
so applications can store, inspect, transform, or budget the result first.
The optional FastAPI app mirrors these surfaces. POST /search and
POST /research accept output_format (prompt or json) and always respond
with JSON; prompt mode places rendered text in the answer field.
POST /scrape accepts one to five { "url", "query" } items and always
returns structured per-item outcomes.
The app also exposes /health, /current_datetime, and read-only /config;
configuration writes require explicit environment opt-in.
TinySearch selects a web-search backend from config, so you can start with no search service and add one later without changing code.
"ddgs" (native default): queries the ddgs
package's automatic backend selection in-process. No SearXNG deployment
required."searxng" (Docker default): queries a self-hosted SearXNG instance. Falls
back to ddgs on backend failure unless search_backend_fallback is set to
false."duckduckgo": skips SearXNG and queries ddgs in DuckDuckGo-only mode."auto": tries SearXNG, then falls back to ddgs on any backend failure.Set the BRAVE_SEARCH_API_KEY environment variable to add Brave's official
Web Search API as a keyed fallback for the ddgs and duckduckgo backends.
Brave is only consulted when the primary call errors or returns no results.
Full key reference, SearXNG JSON-output setup, and Compose details live in the configuration reference.
TinySuite is a product suite built around one idea: agents should spend tokens on useful work, not operational overhead.
Each tool focuses on a different part of the agent workflow and uses targeted techniques to reduce unnecessary context before it reaches the model. TinySearch handles the web-research layer by turning pages into a small, ranked, source-grounded evidence packet.
The README is the product overview. Detailed setup and operational material lives in the TinySuite documentation:
The repository also contains an annotated example configuration at
configs/tinysearch_config.json.
TinySearch is intentionally lightweight. Use a commercial search API, persistent crawler, or full search index when you need:
TinySearch supports Python 3.12 and newer. CI tests Python 3.12, 3.13, and 3.14 across Linux, macOS, and Windows.
tinysearch.search and tinysearch.scrape_urls: structured Python APItinysearch.research: legacy all-in-one structured Python research pipelinetinysearch.get_current_datetime: structured UTC date and timetinysearch.to_prompt: pure structured-evidence prompt renderertinysearch mcp: stdio MCP server (also the no-argument default)tinysearch serve: Streamable HTTP MCP servertinysearch.servers.fastapi_server:app: optional FastAPI applicationQuestions, ideas, and bug reports are welcome:
TinySearch reads public pages and returns selected excerpts to the calling client. Search, crawling, local embeddings, and reranking can run without sending page content to an embedding provider. If you choose an OpenAI-compatible embedding backend, that provider receives the text sent for vectorization.
TinySearch is available under the MIT License. Downloaded model weights remain subject to their respective model-card licenses. See NOTICE for third-party distribution details.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/tinysearch)<a href="https://allmcps.com/mcp/tinysearch"><img src="https://allmcps.com/api/badge/tinysearch?style=directory" alt="Tinysearch on AllMCPs" /></a>