AST-based semantic code search; results ship with their call graph (calls + callers).
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Stop grepping. Find the exact code your AI agent needs by intent, not keywords. semhood is an AST-aware semantic code search engine that retrieves code by what it does, complete with call-graph context and optional LLM enrichment.
Runs fully offline with zero API keys β or plug in cloud embeddings β Voyage's code-specialized models, or OpenAI's strong general-purpose (natural-language) embeddings β for higher-quality retrieval. Optional LLM enrichment adds a logic summary and developer queries to each chunk that you commit once and share β and every result ships with its call graph (what it calls + what calls it).
Why semhood Β· Install Β· Quickstart Β· MCP Setup Β· Architecture Β· Config Β· Troubleshooting
semhood indexes your codebase the way a developer thinks about it: every function, method, and class becomes a chunk, with its call graph, docstring, and signature attached. You search by intent ("how do we retry transient payment failures?") and get back the few chunks that actually answer the question.
Two stages: structural (always, free, ~seconds) and enrichment (optional, LLM or code agent, drains a pending queue). The index is queryable after stage 1; stage 2 just makes natural-language matches sharper.
The package ships an MCP server so Claude Desktop, Cursor, Cline, Continue, Kiro, Zed, and any other MCP-aware client can call semhood as a tool β your AI agent gets search, find_symbol, and get_chunk_context next to its built-in read_file and grep.
Most code search embeds your raw source and hopes a natural-language query lands near it. semhood adds two things plain vector search and grep can't:
An LLM reads each function and class and writes two artifacts, each stored as its own search vector:
This is the part that makes retrieval click. When you search with a question, you're matching against questions the code was pre-labeled to answer β so the right chunk wins even when it shares zero keywords with your query. You generate the enrichment once, commit it to git, and your whole team β and every AI agent β retrieves better for free. β Portable enrichment
Why enrichment matters: some code has no words to search. Plain semantic search only works when the source contains language close to your question. Plenty of important code doesn't β terse names, raw math, business rules. Consider a function like:
Ask "how do we calculate compound interest?" and plain vector search comes up empty β there's no "interest", no "compound", nothing in the source that means anything close to the question. Enrichment reads the code and generates:
Now your question matches a pre-written question that means the same thing, and _calc ranks first β despite sharing zero words with your query. The cryptic-but-critical functions are exactly the ones plain semantic search misses and enrichment rescues.
Each chunk knows what it calls and what calls it. So a result isn't just "here's the function" β it's the function plus its neighborhood. One get_chunk_context call returns the body, calls, and called_by together, so your AI agent gets the caller/callee context in the same response instead of opening files and tracing references by hand.
code, description, developer_queries) + BM25 sparse, all in one queryread_file + grep calls with one search--changed re-indexes only what git diff touchedPrefer an isolated CLI install? pipx keeps semhood and its deps out of your global environment β recommended for a command-line tool:
Just want to try it without installing? With uv, run it straight from PyPI:
Requires Python 3.11+. First index downloads the embedding model (~420 MB for the default
all-mpnet-base-v2) and caches it.
No config files, no API keys, no setup. semhood works offline with a local
embedder by default. Just cd into any project and index it:
The first command auto-starts a background daemon that loads the embedding
model once and keeps it warm β so every later search (from any terminal or
your editor) is instant. Each project gets its own index automatically under
~/.semhood/indexes/, keyed by repo root. One global config lives at
~/.semhood/config.yaml (created on first run); there is no per-project
config file to manage.
| Command | What it does |
|---|---|
semhood index <path> | Stage 1: parse + embed + upsert. No LLM. |
semhood index <path> --changed | Incremental β only files in git diff HEAD~1. |
semhood index <path> --reset | Rebuild from scratch (after changing the embedding model). |
semhood enrich | Stage 2: drain pending chunks through an LLM. |
semhood enrich --force | Re-enrich every chunk. |
semhood compact | Prune orphaned records from .semhood/enrichment.jsonl. |
semhood search "query" | Pure retrieval. --format json/paths/compact/table. |
semhood query "question" | Full RAG: retrieval + answer generation. |
semhood status | Per-state chunk counts + provider summary. |
semhood projects | List every indexed project in ~/.semhood/indexes/. |
semhood serve | Run the daemon in the foreground (it otherwise auto-starts). |
semhood stop | Stop the background daemon. |
semhood doctor | Daemon + config health check. |
Factual signals from GitHub, npm, and our automated checks β not a rating.
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/semhood)<a href="https://allmcps.com/mcp/semhood"><img src="https://allmcps.com/api/badge/semhood?style=directory" alt="Semhood on AllMCPs" /></a>