claude-context
CLAUDE.md13k starsChanged 16 months agoMITView on GitHub
Claude Context is an MCP plugin that adds semantic code search to AI coding agents. A codebase is split into chunks, embedded, and stored in a Milvus/Zilliz vector database; queries are answered by semantic (hybrid dense + sparse) search instead of loading whole directories into the model's context. pnpm workspace (packages/*, examples/*). Requires Node >=20 <24 and pnpm >=10. Packages depend on core via workspace:*, so rebuild core (pnpm build:core) before testing mcp/vscode against core changes — they consume core/dist,…
- Reads credentials
- Installs packages
Trending
Quiet since September.about the whole repository
Who's talking about zilliztech/claude-context
- yologdev/yoyo-evolve“Manage context”GitHub · Mar 6, 2026 · 4 reactions
- @chrisshort.net“zilliztech/claude-context: Code search MCP for Claude Code. Make entire codebase the context for any coding …”Bluesky · Apr 22, 2026 · 3 likes
- @dailygithubtrends.bsky.social“今日のGitHubトレンド zilliztech/claude-context Claude Contextは、Claude …”Bluesky · Apr 23, 2026 · 2 likes
- UfoMiao/zcf“Miscellaneous set of tools”GitHub · Aug 18, 2025 · 2 reactions
- @github-trending-js.bsky.social“🎉 Celebrating! 🎉 (500+ new stars) 📦 zilliztech / claude-context ⭐ 8,806 (+706) 🗒 TypeScript Code search …”Bluesky · Apr 24, 2026 · 1 likes
The biggest 5 of 37 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 37
Talked about on GitHub and Bluesky (37 times).
On GitHub · 32
- Mar 6, 2026Manage context — yologdev/yoyo-evolve4 reactions · 4 comments
- Aug 18, 2025Miscellaneous set of tools — UfoMiao/zcf2 reactions · 1 comment
- Sep 10, 2026feat(bench): agent-level A/B harness — grep-only vs neuronav-wired task runs — robbe1912/neuronav0 reactions
- Jun 13, 2026feat: add provider contract audit and event stream groundwork — nyldn/claude-octopus0 reactions · 3 comments
- May 31, 2026chore(deps): bump the dependencies group across 1 directory with 4 updates — chrisfentiman/claude-context-cli0 reactions
27 more on GitHub
- May 16, 2026documentation — kalisio/knowledge0 reactions
- May 15, 2026Tracking: AI workflow patterns & companion plugins — brenthaertlein/universal-skills0 reactions · 1 comment
- May 3, 2026improve Summary — qaqland/vibe-commit-msg0 reactions · 1 comment
- May 3, 2026docs: Claude Context ビジュアルページを再構成 — 53able/docs-site0 reactions
- May 3, 2026docs: Claude Context ページに docs-site 連携とレビューゲートを追記 — 53able/docs-site0 reactions
- May 2, 2026Phase 2: claude-context-style RAG MCP server on penguin-1 — chf3198/megingjord-harness0 reactions · 8 comments
- Apr 24, 2026📱 SNS 콘텐츠 - 2026-04-24 17:05 KST — leaf468/autothreads0 reactions
- Apr 24, 2026🤖 AI 트렌드 리포트 - 2026-04-24 17:05 KST — leaf468/autothreads0 reactions
- Apr 22, 2026📱 SNS 콘텐츠 - 2026-04-22 16:49 KST — leaf468/autothreads0 reactions
- Apr 22, 2026🤖 AI 트렌드 리포트 - 2026-04-22 16:49 KST — leaf468/autothreads0 reactions
- Apr 19, 2026chore(deps): bump the dependencies group across 1 directory with 3 updates — chrisfentiman/claude-context-cli0 reactions · 1 comment
- Mar 20, 2026Startup failed: codebase-search: Stdio process startup timeout: no data received within 5000ms — AIWerk/mcp-bridge0 reactions · 3 comments
- Dec 2, 2025feature request Qdrant RAG / code base indexing/ semantic search. — preset-io/agor0 reactions · 4 comments
- Oct 31, 2025Disable automatic indexing — pleaseai/context-please0 reactions · 1 comment
- Oct 31, 2025Case Sensitivity Issue: Windows Path Casing Causes Separate Collections in Milvus — pleaseai/context-please0 reactions · 1 comment
- Oct 31, 2025feat(core): Add comprehensive retry mechanism and batch fallback for Gemini embeddings — pleaseai/context-please0 reactions · 5 comments
- Oct 28, 2025Aggressive ignore file loading breaks code indexing for production-oriented projects — pleaseai/context-please0 reactions · 1 comment
- Oct 28, 2025fix(mcp): resolve search_code failure when snapshot is out of sync — pleaseai/context-please0 reactions · 3 comments
- Oct 27, 2025claude-context MCP search_code fails despite successful indexing — pleaseai/context-please0 reactions · 1 comment
- Oct 20, 2025feat: Add comprehensive retry mechanism and batch fallback for Gemini embeddings — pleaseai/context-please0 reactions
- Oct 20, 2025feat(core): Add --dry-run option for file discovery validation — pleaseai/context-please0 reactions
- Oct 15, 2025feat(core): Add PostgreSQL (with pgvector) as vector engine backend — pleaseai/context-please0 reactions · 1 comment
- Sep 8, 2025inspired by https://github.com/zilliztech/claude-context ? — FarhanAliRaza/claude-context-local0 reactions · 1 comment
- Sep 7, 2025claude-context-mcp 0.1.14 (new formula) — chenrui333/homebrew-tap0 reactions · 1 comment
- Sep 5, 2025zilliztech/claude-context: Code search MCP for Claude Code. Make entire codebase the context for any coding agent. — st01cs/moke-bookmarks0 reactions · 5 comments
- Aug 8, 2025代码仓库上下文 — Pines-Cheng/blog0 reactions
- Aug 5, 2025add claude-context — hesreallyhim/awesome-claude-code0 reactions · 6 comments
On Bluesky · 5
- Apr 22, 2026zilliztech/claude-context: Code search MCP for Claude Code. Make entire codebase the context for any coding agent. #devopsish — @chrisshort.net3 likes and reposts · 1 reply
- Apr 23, 2026今日のGitHubトレンド zilliztech/claude-context Claude Contextは、Claude CodeなどのAIコーディングエージェントにセマンティックコード検索機能を追加するMCPプラグインです。… — @dailygithubtrends.bsky.social2 likes and reposts
- Apr 24, 2026🎉 Celebrating! 🎉 (500+ new stars) 📦 zilliztech / claude-context ⭐ 8,806 (+706) 🗒 TypeScript Code search MCP for Claude Code. Make… — @github-trending-js.bsky.social1 likes and repost · 1 reply
- Apr 20, 2026📦 zilliztech / claude-context ⭐ 6,057 (+74) 🗒 TypeScript Code search MCP for Claude Code. Make entire codebase the context for any coding… — @github-trending-js.bsky.social1 likes and repost
- Oct 6, 2025コードベース全体を意味論的に検索し、関連コードをAIのコンテキストに直接取り込むことで、開発効率とコストを改善できるっぽい。 yug1224 starred zilliztech/claude-context… — @yug1224.com1 likes and repost
In this repositoryOne other file it gives its agents.
- AGENTS.mdAGENTS.md
The file
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Overview
Claude Context is an MCP plugin that adds semantic code search to AI coding agents. A codebase is split into chunks, embedded, and stored in a Milvus/Zilliz vector database; queries are answered by semantic (hybrid dense + sparse) search instead of loading whole directories into the model's context.
Monorepo Layout
pnpm workspace (packages/*, examples/*). Requires Node >=20 <24 and pnpm >=10.
packages/core(@zilliz/claude-context-core) — the indexing engine. All real logic lives here; the other packages are thin frontends over it.packages/mcp(@zilliz/claude-context-mcp) — stdio MCP server, the primary product. ESM ("type": "module").packages/vscode-extension(semanticcodesearch) — VSCode extension. Bundled with webpack; stubs out Node-only deps (Milvus gRPC, native AST) insrc/stubs/.packages/chrome-extension— browser build; overrides@zilliz/milvus2-sdk-nodetofalse(no gRPC in browser).examples/basic-usage— runnable library example.
Commands
pnpm install
pnpm build # build all packages (examples built last)
pnpm build:core # build a single package: also build:mcp, build:vscode
pnpm dev # watch all; or dev:core / dev:mcp / dev:vscode
pnpm lint # eslint across packages; lint:fix to autofix
pnpm typecheck # tsc --noEmit across packages
pnpm clean # rimraf dist in every packagePackages depend on core via workspace:*, so rebuild core (pnpm build:core) before testing mcp/vscode against core changes — they consume core/dist, not its source.
Tests
- core uses Jest + ts-jest. Test files are colocated as
*.test.tsinsrc/.pnpm --filter @zilliz/claude-context-core test # all (runs in band) pnpm --filter @zilliz/claude-context-core test -- context.abort # by filename pnpm --filter @zilliz/claude-context-core test -- -t "pattern" # by test name - mcp uses the Node built-in test runner via tsx (no Jest):
pnpm --filter @zilliz/claude-context-mcp test # runs src/**/*.test.ts
Running the MCP server locally
pnpm --filter @zilliz/claude-context-mcp start # tsx src/index.tsConfiguration is entirely via environment variables (see .env.example and packages/mcp/src/config.ts). Key vars: EMBEDDING_PROVIDER (OpenAI | VoyageAI | Gemini | Ollama | OpenRouter), provider API key, EMBEDDING_MODEL, MILVUS_ADDRESS and/or MILVUS_TOKEN (address can be auto-resolved from a Zilliz token), CODE_CHUNKS_COLLECTION_NAME_OVERRIDE.
Architecture
Core: the Context orchestrator (packages/core/src/context.ts)
Context ties together three pluggable interfaces injected through its constructor config:
- Embedding (
src/embedding/) —base-embedding.tsinterface withOpenAIEmbedding,VoyageAIEmbedding,GeminiEmbedding,OllamaEmbeddingimplementations. - VectorDatabase (
src/vectordb/) —MilvusVectorDatabase(gRPC, Node-only) andMilvusRestfulVectorDatabase(HTTP, browser-safe).zilliz-utils.ts(ClusterManager) can provision a free Zilliz cluster and resolve an address from a token. - Splitter (
src/splitter/) —AstCodeSplitter(tree-sitter, the default at 2500/300 chunk/overlap) which falls back toLangChainCodeSplitterfor unsupported languages or parse failures.
The public surface (indexCodebase, reindexByChange, semanticSearch, clearIndex, hasIndex) is re-exported from src/index.ts. Indexing reads files honoring ignore rules, splits them, embeds in batches, and upserts vectors. Collection name is derived from a hash of the absolute codebase path (overridable).
Two error types carry control-flow meaning and should be preserved when touching the pipeline:
IndexAbortError— cooperative cancellation viaAbortSignal.EmbeddingError— always re-thrown to halt the whole pipeline, unlike per-file read/parse errors which are logged and skipped. This prevents silent partial indexing (Milvus getting zero vectors while the snapshot marks files done).
Incremental sync (packages/core/src/sync/)
FileSynchronizer builds a Merkle DAG (merkle.ts) of file hashes to compute {added, removed, modified} between runs. Snapshots persist to ~/.context/merkle/<md5-of-path>.json. reindexByChange uses this so re-indexing only touches changed files. The MCP server can also run a background sync loop (CLAUDE_CONTEXT_BACKGROUND_SYNC, CLAUDE_CONTEXT_SYNC_INTERVAL_MS).
Ignore patterns
Layered: built-in DEFAULT_IGNORE_PATTERNS + config + env (CUSTOM_IGNORE_PATTERNS) + on-disk ignore files (.gitignore, .contextignore, .xxxignore, and a global ~/.context/.gitignore). utils/ignore-matcher.ts implements matching including gitignore negation (!) semantics — covered by context.ignore-patterns.test.ts.
Env resolution (packages/core/src/utils/env-manager.ts)
envManager.get(name) resolves with priority process.env > ~/.context/.env file. Use it instead of reading process.env directly so the .env file fallback keeps working.
MCP server (packages/mcp/src/)
index.ts— entry point. Critically, it redirectsconsole.log/console.warnto stderr at the very top, because stdout is reserved for the MCP JSON protocol. Never write non-protocol output to stdout in this package.handlers.ts(ToolHandlers) — implements the tools:index_codebase,search_code,clear_index,get_indexing_status.snapshot.ts(SnapshotManager) — tracks per-codebase indexing state across server restarts.sync.ts(SyncManager) — drives incremental re-indexing.config.ts,embedding.ts— buildContext(embedding provider + Milvus) from environment variables.
Conventions
Commits follow Conventional Commits with these scopes: core, vscode, mcp, examples, docs (e.g. fix(core): support gitignore negation patterns). All code and comments are written in English.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

