ChunkHound
ChunkHound’s MCP server lets you search the indexed codebase/git history and monitor indexing health.
Search code chunks by regex patterns, with optional path scoping and pagination.
The search description also advertises semantic/concept search, though the input schema currently only allows
type: "regex".Search commit-specific diffs via
commit_hash, revision ranges viacommit_range, or recent history vialast_n_commits.Control git-search scope with
vector_source:diff,both, ordb.Check daemon startup, scan progress, realtime indexing health, and whether the index is query-ready via
daemon_status.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ChunkHound Explain how the authentication flow interacts with the session management logic."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Requirements
Python 3.10+
uv — install via
curl -LsSf https://astral.sh/uv/install.sh | shAPI keys (optional — regex search works without any):
Related MCP server: Atlas
Enterprise-scale research without an enterprise platform
Local code intelligence is often treated as a small-project compromise. Enterprise-scale systems are usually proprietary, hosted, and priced by seat or query. ChunkHound breaks that tradeoff: it has researched production codebases of up to 180 million lines from one developer laptop.
The runtime and index remain under your control. ChunkHound is MIT licensed, stores its database locally, and requires no hosted ChunkHound corpus, platform license, seat, or query fee. Your model APIs and hardware may still have their own costs.
One engine across engineering evidence
ChunkHound connects the sources needed to understand large software systems instead of treating each as a separate shallow lookup.
Current code at enterprise scale
Build a persistent structural index, combine exact and semantic retrieval, and trace behavior across large, multi-language repositories.
Git history through the same research pipeline
Investigate commits, diffs, branches, tags, and ranges with the retrieval and synthesis used for current code. Git diff research currently has a hard cap; streaming git research is proposed in #336, not shipped.
Technical web pages and documents
Research rendered web pages and PDFs, then connect cited external evidence to implementation and change history. Web discovery and fetching contact DuckDuckGo and source websites.
Cited synthesis for any agent
Use ChunkHound directly from the CLI or expose the same local research engine to higher-level AI agents through MCP over stdio or HTTP.
Own the deployment and its boundaries
Ownership — keep the runtime, project database, deployment, and provider choices under your control.
Privacy — indexing and research execute locally; choose local embedding, reranking, and LLM providers to keep model processing local.
Cost control — the software is free and open source, with no mandatory ChunkHound license, seat, query, or index fee.
Provider transparency — remote model providers receive the content required for their requests; external APIs and hardware may cost money.
What you can ask
Ground an agent before edits
chunkhound research "How does authentication work?"
chunkhound search "JWT refresh token validation"
chunkhound research "What changed in auth recently?" --last-n 20Understand a large PR or release
chunkhound research "Summarize the behavior changes on this branch for reviewers" --commit-range main..HEAD
chunkhound research "Draft changelog bullets for billing since v2.4" --commit-range v2.4..HEAD
chunkhound search "database migration" --commit-hash abc1234Get context before resolving conflicts
chunkhound research "Why did auth session handling change on each side?" --commit-range main..feature/auth
chunkhound search "session refresh conflict" --last-n 50Trace a bug with external constraints
chunkhound research "why would webhook retries fail?"
chunkhound research "what changed in webhook handling this week?" --last-n 30
chunkhound websearch "Stripe webhook retry schedule"Explain product behavior
chunkhound research "What happens when a user cancels a subscription?"
chunkhound research "What changed in billing since v2.4?" --commit-range v2.4..HEADWhat powers deep understanding
Semantic code search — find relevant code by meaning, not only exact text
Cited code research — explain behavior across files with source citations
Git history research — ask by last N commits, commit hash, tag, branch, or range to understand large PRs and releases
Pinpoint web research — bring cited external docs, APIs, issues, and articles into the same workflow as local code research
Autodoc — generate shareable docs from code-backed research
Local-first indexing — keep code search and indexing under your control
Python, JavaScript, TypeScript, Java, Go, Rust, C/C++, and more via Tree-sitter
Install
uv tool install chunkhoundTry it
chunkhound index .
chunkhound research "How does authentication work?"Index once, ask a real architecture question, and get a grounded answer with citations. Regex search works without providers. Semantic search requires an embedding provider. Deep research requires an LLM provider and an embedding provider with reranking support; web research uses the same provider stack. Choose local providers for zero-code-egress setups.
For a full configurable setup, create .chunkhound.json in your project root:
{
"embedding": { "provider": "voyageai", "api_key": "your-key" },
"llm": { "provider": "claude-code-cli" }
}For editor integration, all provider options, and advanced configuration:
→ chunkhound.ai/docs/getting-started
Search git history
In addition to searching your indexed codebase, ChunkHound can search code changes across git history — useful for understanding what changed in a PR, a release, or since a specific commit.
# Last N commits
chunkhound search "authentication changes" --last-n 20
# Changes introduced by a specific commit
chunkhound search "database migration" --commit-hash abc1234
# Custom git range
chunkhound search "API changes" --commit-range v2.0..HEAD
# Deep research over recent changes
chunkhound research "what changed in the auth module?" --last-n 50
--vector-sourcecontrols scope:diff(default, changed code only),both(merges diff + DB),db(ignore diff).
Good fit
ChunkHound is especially useful for:
large repos and monorepos
multi-language codebases
legacy systems
local-only or security-sensitive environments
engineering teams that want agents, support, and product questions grounded in the same code index
Community
ChunkHound is MIT licensed, open source, and community built.
License
MIT
Available Tools
2 toolsdaemon_statusA
Report daemon startup, scan, and realtime indexing health.
USE FOR:
Checking whether initial indexing has completed
Inspecting backend-neutral realtime health and resync state
Debugging degraded daemon behavior without opening log files
OUTPUT: {status, query_ready, scan_progress}
Inputs: no named parameters.
searchA
Pinpoint specific code locations — find exact symbols, patterns, or concepts in the indexed codebase. Returns structurally-parsed code chunks (functions, classes) — large definitions may span multiple results.
TYPE — choose one:
regex: Match exact patterns against code content. Use for known identifiers, imports, or string literals. Examples: "def authenticate", "class.*Handler", "import.*pandas", "TODO:.*refactor"
semantic: Find code by meaning via embedding similarity. Use for concepts or when exact identifiers are unknown. Examples: "authentication logic", "retry with exponential backoff", "database connection pooling"
DECISION GUIDE:
Known symbol or pattern → regex
Concept or behavior → semantic
STRATEGY (type='semantic'): Optional. Omit it to let the provider choose. 'single_hop' runs one vector search with no expansion or reranking — fast, for callers that rerank results themselves. 'multi_hop' forces expansion with reranking. A valid value has no effect for type='regex'; an invalid value raises.
OUTPUT: Markdown blocks — file path, line range, symbol name, code block, pagination footer.
Inputs: type (required), query (required), path, offset, +6 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools are completely distinct: daemon_status reports indexing/daemon health while search queries the index for code. There is no plausible way to confuse one with the other.
daemon_status uses a noun_status form while search is a bare verb, so the pattern isn't strictly uniform. With only two tools this is a minor deviation and both names remain clear and readable.
Two tools is thin for a codebase indexing/search server; a status probe plus one search entrypoint leaves little room for narrower operations. It is defensible as a minimalist surface, but borderline under-scoped.
The core read path (search) and health check are covered, but there is no way to trigger or force a reindex/resync, list indexed files, or fetch a specific chunk by symbol/id. These are notable gaps an agent may hit when the index is stale or when it wants a full definition rather than a search hit.
Maintenance
Related MCP Connectors
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Codebase intelligence for AI coding agents: graph, git history, docs, decisions, code health.
Shared context for your codebase: a hosted code knowledge graph over MCP. Free plan, OAuth sign-up.
Related MCP Servers
- AlicenseCqualityCmaintenanceLocal-first codebase intelligence engine providing AI coding agents with a typed MCP toolset for understanding and navigating code repositories.10054Apache 2.0
- AlicenseNot gradedqualityDmaintenanceA local-first codebase intelligence layer for AI coding agents, providing a persistent, queryable model of a repository via an MCP server and CLI to enable structure queries instead of reading many files.1Apache 2.0
- AlicenseNot gradedqualityCmaintenanceLocal repository intelligence MCP server that builds a reusable graph of code structure for AI coding agents, providing 34 network-free tools for understanding, searching, and analyzing repositories without data leaving the machine.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to locally search, query, and understand codebases with token-efficient context, dependency graphs, history, architecture diagrams, and metrics through MCP.15 npm3MIT