Context7
ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว
คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)
Federated local-first search across transcripts, files, KG, vectors and the web for AI agents.
สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน
ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry
เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง
ต้องเตรียมก่อน
คุณใช้แอปไหน
เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”
เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json
{
"mcpServers": {
"magpie-search": {
"command": "uvx",
"args": [
"magpie-search",
"magpie-search-mcp"
]
}
}
}พิมพ์คำสั่งนี้ใน Terminal
claude mcp add magpie-search -- uvx magpie-search magpie-search-mcpวางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json
{
"mcpServers": {
"magpie-search": {
"command": "uvx",
"args": [
"magpie-search",
"magpie-search-mcp"
]
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
วางในไฟล์ .vscode/mcp.json ของโปรเจกต์
{
"servers": {
"magpie-search": {
"type": "stdio",
"command": "uvx",
"args": [
"magpie-search",
"magpie-search-mcp"
]
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น
ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี
ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README
รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง
เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 8 พ.ย. 2569
ชื่อใน registry ยืนยันด้วยบัญชี GitHub xfloukiex-lab ซึ่งเป็นเจ้าของ repo
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต
ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน
รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต
เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo
จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น
registry ไม่ได้ระบุว่าต้องใช้กุญแจ แต่บางตัวจะขอให้ล็อกอินตอนใช้ครั้งแรก
รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)
repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (1.3.1) เข้า registry 2 เดือนที่ผ่านมา
โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Python (uv) ในเครื่องด้วย
ในหมวดเดียวกันมี Context7, Codebase Memory, Exa
server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว
อ่านการ์ด:↓ ดาวน์โหลดต่อสัปดาห์i★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi
ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
Connect AI agents to Exa for web search, content fetching, and multi-step research.
ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ
Magpie Search
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.
# one question, several angles, read the top pages — all token-free retrieval
magpie-search deepweb "the question" --q "another angle" --q "a third angle" --thorough
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.
pip install magpie-search
Live web search and `deepweb` need the `web` extra:
pip install "magpie-search[web]"
Without it, --sources web and deepweb return no results — the web provider is designed to fail soft so it can never break a federated search, so a missing dependency looks exactly like a search that found nothing. As of 1.3.1 it also prints a one-line reason on stderr instead of failing silently.
Or install the latest straight from source:
pip install "git+https://github.com/xfloukiex-lab/magpie-search.git#egg=magpie-search[web]"
Optional — add the local-LLM features (the cross-encoder reranker runs on the base install; the session summarizer needs Ollama):
# 1. Install Ollama (free, runs entirely locally) — https://ollama.com/download
ollama pull phi3.5
Python 3.10+ on Windows, macOS, and Linux.
magpie-search index # build the index (incremental)
magpie-search search "that retry backoff thing" # keyword search magpie-search search --mode hybrid "..." # keyword + semantic, fused magpie-search search --mode rerank "..." # + cross-encoder rerank magpie-search stats # sanity-check the index
Magpie speaks the Model Context Protocol, so any MCP-capable agent can call it. Point your client at the bundled server:
// e.g. an MCP client config
{ "mcpServers": { "magpie": { "command": "magpie-search-mcp" } } }
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 |
Add --help to any command for full options.
import magpie_search
results = magpie_search.search("retry backoff", mode="hybrid", k=5) for h in results["hits"]: print(h["trust"], h["source"], h["snippet"])
import magpie_search.llm ranked = magpie_search.llm.search_rerank(query="retry backoff", k=3, pool=10) summary = magpie_search.llm.summarize(session_id="abc-123", n_messages=80)
magpie-search backup copies your transcript tree to a destination of your choice — a local folder (default, zero config), a remote SSH target (NAS / home server), or a remote SSH target with VM boot/suspend. Configure it in ~/.magpie-search/backup.env:
MAGPIE_SEARCH_BACKUP_SSH_HOST=user@nas.local
MAGPIE_SEARCH_BACKUP_SSH_DEST=~/claude-transcripts/
Useful flags: --dry-run, --no-suspend, --show-config. Backup copies; it never deletes originals.
Everything is environment-variable driven with sensible defaults.
| Var | Default | What |
|---|---|---|
MAGPIE_SEARCH_HOME | ~/.magpie-search | Data directory (DB, models, logs) |
MAGPIE_SEARCH_MODELS_DIR | $MAGPIE_SEARCH_HOME/models | fastembed model cache |
MAGPIE_SEARCH_OLLAMA_HOST | http://localhost:11434 | Ollama server URL |
MAGPIE_SEARCH_TOKENIZER | heuristic | Set to tiktoken for precise budget counting |
MAGPIE_SEARCH_AUDIT_LOG | $MAGPIE_SEARCH_HOME/llm-audit.jsonl | Per-call audit log |
The summarizer passes through a 6-probe guardrail stack (length, proper-noun-safety, identifier-safety, refusal-drif
ตัดมาแค่ช่วงต้น อ่านต่อใน repo