Federated local-first search across transcripts, files, KG, vectors, web and YouTube for AI agents.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
A federated search engine β the search engine an AI agent or LLM reaches for when it needs to find something true to reason over.
Ever had your computer reboot on you, or a power outage hit mid-session? Every thread your agent was holding β gone. Now you have the tool to get it back. Never forget what your agent lost again. Magpie indexes everything your AI has ever worked through, locally, so a crash is a hiccup instead of amnesia.
A normal search engine looks in one place. Magpie takes one question and fans it across everything that matters at once β the AI's entire conversation history, the files on the machine, a structured knowledge graph, a vector store, and the live web β and pulls the answer back from wherever it actually lives. Five sources, one call.
And it searches each one the right way. It can grep for an exact string or regex when you know the precise token β a file path, an error, a line of code. It can search by keyword. It can search by meaning, so it finds the thing even when the words don't match. It can do all of that at once.
Then it does the part that makes it trustworthy: it fuses everything into a
single ranked answer, and every result carries a trust tier β fact > reference > lead > stale. The solid sources rise, the loose ones are marked as
leads to verify, duplicates collapse, and it's all trimmed to fit so it never
floods the AI's context. Ask it to go deep and it expands one question into many,
reads the pages, and tells you how many independent sources agree β a full
research sweep without an army of agents.
It runs entirely on the machine. No server, no account, and no telemetry unless you turn it on. The AI's transcripts and files never leave. It plugs into whatever AI is running over MCP, so the agent can reach all six sources the instant it needs them.
It is a tool for an AI β an agent or an LLM.
At its core is a local index of the AI's transcripts: a SQLite database with two structures built side by side β
sqlite-vec) of 384-dim embeddings produced locally by a
small all-MiniLM-L6-v2 model.Everything is redacted at ingest β a scrubber strips ~30 classes of secrets (keys, tokens, private keys, connection strings) before a single byte hits the index.
On top of that index sit the five search modes:
| Mode | What it does |
|---|---|
grep | literal / regex match (exact tokens: paths, errors, code) |
lexical | FTS5 / BM25 keyword |
semantic | embedding K-NN, cosine distance in the vector index |
hybrid | lexical + semantic fused by RRF |
rerank | hybrid, then a cross-encoder (jina-reranker) re-scores each candidate |
Around that sits the federation layer β the part that makes it federated:
Hit objects tagged with a trust
tier.fact Γ3, reference Γ2, lead Γ1, stale Γ0.3), damping constant 60. This is the math that merges six heterogeneous
sources into one honest ranking.And it exposes all of this to an AI over an MCP server β the tools it hands
an agent are exactly: search, recent, session, list_sessions, stats,
reindex. Note what's not in that list: nothing that writes an answer.
RAG = Retrieval-Augmented Generation. It's a two-stage pipeline, and the defining stage is the second one: a retriever finds chunks β they're stuffed into a prompt β a language model generates the prose answer. The "G" is the whole point of the name; without a generator writing the answer, it isn't RAG.
Magpie has no G:
Plug Magpie into an AI and the pair can form a RAG β Magpie is the R, the AI you bring is the G. But Magpie by itself ships only the R, and a stronger R than usual. It finds and ranks the truth; it never generates the answer.
The expensive part of "deep research" is reasoning, and the multi-agent approach pays for it N times over β one full LLM context per agent, often millions of tokens for a single question. But reasoning doesn't need to fan out; one capable model already in context can synthesize. Only the searching needs breadth β and searching the web is pure retrieval, zero LLM tokens.
magpie-search deepweb is built on that asymmetry. It fires several sub-queries
at the web in parallel, fuses them by trust-weighted RRF + dedup-by-URL into one
compact, token-budget-trimmed source set, optionally reads the top pages' text
(still token-free), and reports how many independent domains corroborate the
result β an agent-free version of the verification a research swarm pays agents
to do.
So you get the breadth, page-reading, and corroboration of a multi-agent deep search, but your model only pays for a single synthesis pass over a trimmed result set.
Token cost, measured β one deep question:
| Approach | Tokens the model pays |
|---|---|
| Multi-agent deep-research swarm (N agents each read pages into their own context) | ~2,000,000 |
magpie-search deepweb --thorough (6 angles β 12 sources, 12 full pages read) | ~1,050 |
That's ~2,000Γ fewer tokens β about 1/2000th the cost β because the searching and page-reading are pure retrieval (zero model tokens); your model only does the final synthesis pass over the trimmed, corroborated set.
The model in your loop then does one synthesis pass over the merged, corroborated set. That's the whole saving: the breadth is free, you pay only for the answer.
Or install the latest straight from source (pulls all dependencies):
Optional β add the local-LLM features (the cross-encoder reranker runs on the base install; the session summarizer needs Ollama):
Python 3.10+ on Windows, macOS, and Linux.
Magpie speaks the Model Context Protocol, so any MCP-capable agent can call it. Point your client at the bundled server:
The agent then has search, recent, session, list_sessions, stats, and
reindex available β federated, trust-ranked, context-budgeted.
| Command | What |
|---|---|
magpie-search index | Incremental indexing pass over ~/.claude/projects/ |
magpie-search search "q" | Search β --mode grep|lexical|semantic|hybrid|rerank |
magpie-search recent --n 30 | Latest 30 messages of the newest session |
magpie-search session SESSION-ID | Full transcript of one session |
magpie-search list | Recent sessions |
magpie-search stats | Index size, last-indexed time, row counts |
magpie-search backup | Back up ~/.claude/projects/ to a configurable destination |
No reviews yet β be the first to share how this listing worked for you.
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/magpie-search)<a href="https://allmcps.com/mcp/magpie-search"><img src="https://allmcps.com/api/badge/magpie-search?style=directory" alt="Magpie Search on AllMCPs" /></a>