
Codeseeker
io.github.jghiringhelli由 GitHub 帳號 jghiringhelli 發布v2.1.2更新於 Oct 24, 2026
Graph-powered code intelligence with semantic search and knowledge graph for AI assistants
概覽
一個本機 MCP 伺服器,為程式碼庫建立索引,讓 AI 助理取得混合語意搜尋、符號查詢、相依知識圖譜與程式碼品質分析能力
- 可以做什麼
- 在指定的專案根目錄內搜尋程式碼:支援 BM25 與向量嵌入融合的混合檢索、純向量檢索、純關鍵字檢索,可回傳程式碼片段或只做存在性判斷。依名稱查詢類別與函式,並檢視其圖譜鄰居。從檔案或語意查詢出發,走訪由匯入、呼叫與繼承關係構成的知識圖譜。分析專案,辨識編碼慣例、重複或相似程式碼區塊,以及未使用匯出、孤立檔案等死程式碼。建立、同步、排除路徑並查看索引狀態,列出或安裝 Tree-sitter 剖析器。
- 適用情境
- 當助理需要瀏覽無法全部放進上下文的程式碼庫,而 grep 式文字搜尋又不足時適用:依語意尋找程式碼、追蹤相依與繼承關係,或在刪除前確認程式碼是否仍被使用。最適合 TypeScript、JavaScript、Python 與 C# 專案;其他語言也能索引,但結構圖譜品質較弱。
- 執行需求
- 以 npm 套件 codeseeker 透過 stdio 在本機執行,需要 Node.js 18 或更新版本。可全域安裝或透過 npx 執行;README 指出 npx 首次啟動較慢。文件中的設定會將環境變數 CODESEEKER_STORAGE_MODE 設為 embedded。每次工具呼叫都必須傳入專案絕對根路徑,且專案需先建立索引,首次搜尋時會自動開始。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Codeseeker,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
CodeSeeker
Four-layer hybrid search and knowledge graph for AI coding assistants.
BM25 + vector embeddings + RAPTOR directory summaries + graph expansion — fused into a single MCP tool that gives Claude, Copilot, and Cursor a real understanding of your codebase.
[npm version] [License: Apache 2.0] [TypeScript]
Works with Claude Code, GitHub Copilot (VS Code 1.99+), Cursor, Windsurf, and Claude Desktop.
One command to index; the Claude Code plugin keeps it in sync from there.
Built by PragmaWorks as part of Generative Specification — the discipline for building software with AI that doesn't drift. Two sibling MCP servers compose with this one, each solving a different half of the same problem:
They are independent: install one, or all three.
When you stop needing this
CodeSeeker solves a retrieval problem, and that problem is shrinking.
If you run a spec-driven loop with a real harness — a specification precise enough that a stateless model derives from it, and quality gates that verify the result against a live system — or an intent-driven one, your assistant is being handed the structure it would otherwise have to go find. A sentinel tool that routes actions instead of sprawling across a dozen endpoints removes another slice of the searching. Frontier models with better navigation and larger effective context remove more. Past a certain point, semantic search over your own code stops being the bottleneck, and this server becomes something you could uninstall without noticing.
That is the intended outcome, not a defect: a method that works should make its own scaffolding unnecessary. Most teams do not start there, though, and until the process is in place CodeSeeker is the cheaper substitute — one command instead of a discipline.
If you would rather have the process than the substitute, start with the field guide: Generative Specification — Field Guide (PDF).
The Problem
AI assistants are powerful editors, but they navigate code like a tourist:
- Grep finds text — not meaning.
"find authentication logic"returns every file containing the word "auth" - File reads are isolated — Claude sees a file but not its dependencies, callers, or the patterns your team established
- No memory of your project — every session starts from scratch
CodeSeeker fixes this. It indexes your codebase once and gives AI assistants a queryable knowledge graph they can use on every turn.
How It Works
A 4-stage pipeline runs on every query:
The knowledge graph is built from AST-parsed imports at index time. It's what powers the graph action, dead-code detection, and graph expansion in every search.
What Makes It Different
What LSP tools can't do:
- "Find code that handles errors like this" → semantic pattern search
- "What validation approach does this project use?" → auto-detected coding standards
- "Show me everything related to authentication" → graph traversal across indirect dependencies
What vector-only search misses:
- Direct import/export chains
- Class inheritance hierarchies
- Which files actually depend on which
Installation
Recommended: install once, configure once
--scope user makes it available in every project you open, not just the current one.
Why global rather than npx -y: on a machine that has never seen the package, npx
downloads it and builds native dependencies before the server can answer, which measured
13.7 seconds to a completed MCP handshake. Clients that give up sooner report that as
a connection failure. A global install answers in 759 ms — the download happens once,
at a moment when you are expecting it to.
npx (no install)
Portable, and fine once the package is cached. Expect a slow first start.
Add this to your MCP config file (see below for per-client locations) and restart your editor.
Other editors
🔌 Claude Code Plugin
For Claude Code CLI users — adds auto-sync hooks and slash commands:
Slash commands: /codeseeker:init, /codeseeker:reindex
☁️ Devcontainers / GitHub Codespaces
✅ Verify
Ask your AI assistant: "What CodeSeeker tools do you have?"
You should see a single tool named codeseeker. That is intentional: one tool with an
action routing key keeps per-request token overhead low (ADR-002). The actions are
search, sym, graph, analyze and index.
Advanced Installation Options
📋 MCP Configuration by client
The MCP config JSON is the same for all clients — only the file location differs:
🖥️ CLI Standalone Usage (without AI assistant)
What You Get
CodeSeeker exposes one MCP tool, codeseeker. You pick behaviour with action and
fill only the matching nested parameter group:
Always pass project (the absolute project root) — an MCP server cannot detect your
working directory.
You don't invoke these manually—Claude uses them automatically when searching code or analyzing relationships.
How Indexing Works
You do not have to index anything first. Searching a project CodeSeeker has never seen starts the index automatically and says so. Indexing runs in the background, so the call returns at once rather than blocking your assistant:
So the first question you ask a new project answers with "indexing started, retry shortly"
rather than with results. A small project is ready in a couple of seconds; a large one
takes several minutes. Check with index({op:"status"}) rather than guessing.
You can still index deliberately, and it is worth doing for a big repository so the wait happens when you expect it:
name is the only thing an explicit init gives you that the automatic one cannot know —
otherwise the project is registered under its directory name.
Keeping the index current
The index is a snapshot. Nothing watches your filesystem, so after files change there are three ways it gets back in step:
Without the plugin, an index that drifts will keep returning results; they will simply be
from the code as it was. The stale_index signal is what surfaces that.
Search Quality Research
📊 Component ablation study (v2.0.0) — measured impact of each retrieval layer
Setup
18 hand-labelled queries across two real-world codebases:
Each query has one or more mustFind targets (exact file basenames) and optional mustNotFind targets (scope leak check). Queries were run on a real index built from source — real Xenova embeddings, real graph, real RAPTOR L2 nodes — to reflect production conditions.
Metrics: MRR (Mean Reciprocal Rank), P@1 (Precision at 1), R@5 (Recall at 5), F1@3.
Ablation results
What each layer actually does
BM25 + embedding fusion (RRF)
The workhorse. Handles ~94% of ranking quality on its own. BM25 catches exact symbol names and camelCase tokens; vector embeddings catch semantic similarity when names differ. Fused with Reciprocal Rank Fusion to combine both signals without manual weight tuning.
RAPTOR (hierarchical directory summaries)
Generates per-directory embedding nodes by mean-pooling all file embeddings in a folder. Acts as a post-filter: when a directory summary scores ≥ 0.5 against the query, results are narrowed to that directory's files. Measured contribution: +0.3% MRR on symbol queries. Fires conservatively — only when the directory is an obvious match. Its real value is on abstract queries ("what does the payments module do?") which don't appear in this benchmark; for those queries it prevents broad scattering across the entire codebase.
Knowledge graph (import/dependency edges)
Average connectivity: 20.8 file→file edges per node across both TS and C# codebases. Measured ranking impact: ±0% MRR for 1-hop expansion. The graph doesn't move MRR because the semantic layer already finds the right files — the graph's neighbors are usually already in the top-15. Its value is structural: the analyze dependencies action and explicit graph search type give Claude traversable import chains, inheritance hierarchies, and dependency paths that embeddings alone cannot provide.
Type boost / penalty scoring
Source files get +0.10 score boost; test files get −0.15 penalty; lock files and docs get −0.05 penalty. Without this, integration.test.ts would rank above dag-engine.ts for exact symbol queries because test files import and exercise every symbol in the source. The penalty corrects this without eliminating test files from results.
Monorepo directory exclusion fix
The single highest-impact change in v1.12.0: removing packages/ from the default exclusion list. For pnpm/yarn/lerna monorepos where all source lives under packages/, this exclusion was silently dropping all source files. Effect: 10% → 72% MRR on the Conclave monorepo benchmark.
Known limitations
Benchmark script
Reproduce with:
Requires C:\workspace\claude\conclave and C:\workspace\ImperialCommander2 to be present locally (or update paths in scripts/real-bench.js).
Auto-Detected Coding Standards
CodeSeeker analyzes your codebase and extracts patterns:
Detected pattern categories:
- validation: Zod, Yup, Joi, validator.js, custom regex
- error-handling: API error responses, try-catch patterns, custom Error classes
- logging: Console, Winston, Bunyan, structured logging
- testing: Jest/Vitest setup, assertion patterns
- react-patterns: Hooks (useState, useEffect, useMemo, useCallback, useRef)
- state-management: Redux Toolkit, Zustand, React Context, TanStack Query
- api-patterns: Fetch, Axios, Express routes, Next.js API routes
When Claude writes new code, it follows your existing conventions instead of inventing new ones.
Managing Index Exclusions
If Claude notices files that shouldn't be indexed (like Unity's Library folder, build outputs, or generated files), it can dynamically exclude them:
Exclusions are persisted in .codeseeker/exclusions.json and automatically respected during reindexing.
Code Cleanup Tools
CodeSeeker helps you maintain a clean codebase by finding duplicate code and detecting dead code.
Finding Duplicate Code
Ask Claude to find similar code blocks that could be consolidated:
CodeSeeker uses vector similarity to find semantically similar code—not just exact matches. It detects:
- Copy-pasted functions with minor variations
- Similar validation logic across files
- Repeated patterns that could be extracted into utilities
Finding Dead Code
Ask Claude to identify unused code that can be safely removed:
CodeSeeker analyzes the knowledge graph to find:
- Exported functions/classes that are never imported
- Internal functions with no callers
- Orphaned files with no incoming dependencies
Example workflow:
Language Support
Every language is indexed and searchable — chunking and embeddings do not depend on a parser. What the parser changes is the knowledge graph: how accurately CodeSeeker knows which symbol is a declaration and what depends on what.
Regex extraction is a real limitation, not a smaller version of the same thing. It finds declarations by shape, so it misses anything written unusually and cannot tell a declaration from a call. Import edges stay reliable for TypeScript and JavaScript, where Babel parses them; call edges are heuristic everywhere.
The ratings above are measured, not asserted. scripts/corpus-bench.js indexes seven
real projects and scripts/graph-quality.js reports how much of each resulting graph is
plausibly a real declaration. Java carries no rating of its own because no Java project is
in that corpus; it shares Python's Tree-sitter code path, and that is all we can claim.
Measured on the four RealWorld Conduit implementations — the same application written four times, so a gap between them is language handling and not task difficulty — mean reciprocal rank over 30 labelled queries is TypeScript 83.3%, Python 81.5%, JavaScript 77.1%, C# 70.5%.
Adding a parser for your language
If your project is mostly Go, Rust, C++ or Ruby, you can install the Tree-sitter grammar for it:
Then ask your assistant, or run:
The response marks each parser with wired: true or wired: false. Only a parser
marked wired: true is consumed by the graph builder — installing one marked false
changes nothing today, and the response says so rather than letting you find out by not
noticing an improvement.
Currently wired: TypeScript, JavaScript, Python, Java, C#. The others are honest false.
Wiring one is a small, self-contained change — a parser implementing
ILanguageParser registered in extensionToParser
(src/mcp/indexing-service.ts) — and contributions are
welcome. scripts/graph-quality.js measures whether a new parser actually improved the
graph, so the improvement is demonstrable rather than assumed.
Keeping the Index in Sync
With Claude Code Plugin
The plugin installs hooks that automatically update the index:
You don't need to do anything—the plugin handles sync automatically.
With MCP Server Only (Cursor, Claude Desktop)
- Claude-initiated changes: Claude can call
codeseeker({action:"index", index:{op:"sync"}}) - Manual changes: Not automatically detected—ask Claude to reindex periodically
Sync Summary
When CodeSeeker Helps Most
Good fit:
- Large codebases (10K+ files) where Claude struggles to find relevant code
- Projects with established patterns you want Claude to follow
- Complex dependency chains across multiple files
- Teams wanting consistent AI-generated code
Less useful:
- Greenfield projects with little existing code
- Single-file scripts
- Projects where you're actively changing architecture
Architecture
All data stored locally in .codeseeker/. No external services required.
For large teams (100K+ files, shared indexes), server mode supports PostgreSQL + Neo4j. See Storage Documentation.
For the complete technical internals — exact scoring formulas, MCP tool schema, graph edge types, RAPTOR threshold logic, pipeline stages, analysis confidence tiers — see the Technical Architecture Manual.
Troubleshooting
MCP server not connecting
- Verify npm and npx work:
npx -y codeseeker --version - Check MCP config file syntax (valid JSON, no trailing commas)
- Restart your editor/Claude application completely
- Check that Node.js is installed:
node --version(need v18+)
Indexing seems slow
First-time indexing of large projects (50K+ files) can take 5+ minutes. Subsequent uses are instant.
Tools not appearing in Claude
- Ask Claude: "What CodeSeeker tools do you have?"
- If no tools appear, check MCP config file exists and has correct syntax
- Restart your IDE completely (not just reload window)
- Check Claude/Copilot MCP connection status in IDE
Still stuck?
Open an issue: GitHub Issues
Documentation
- Integration Guide - How all components connect
- Architecture - Technical deep dive
- CLI Commands - Full command reference
Supported Platforms
Claude Code and GitHub Copilot share the same
.vscode/mcp.json— configure once, works for both.
Support
If CodeSeeker is useful to you, consider sponsoring the project.
License
Apache License 2.0. See LICENSE and NOTICE.
Free for any use, commercial included — no company-size or revenue limits. Apache-2.0 adds an explicit patent grant over MIT, which is why it is the choice here.
Running CodeSeeker across a team
Everything above is the local, single-developer setup: the index lives in .codeseeker/
on your machine and never leaves it.
There is a centralized deployment for teams — one shared index over your organisation's repositories (PostgreSQL + pgvector, Neo4j), so engineers aren't each paying to reindex the same code, and so the graph spans service boundaries instead of stopping at one repo. It also surfaces what the local tool structurally cannot: how code understanding is actually distributed across a codebase and where the knowledge gaps sit.
If that's useful to your team, get in touch: https://pragmaworks.dev
CodeSeeker gives Claude the code understanding that grep and embeddings alone can't provide.
Part of Generative Specification
An Apache-2.0 tool behind Generative Specification (GS) — the discipline for building software with AI that doesn't drift: you author a specification precise enough that a stateless AI derives correct code from it, and a harness verifies it against a live system.
- 📄 White paper (open access): https://doi.org/10.5281/zenodo.21726017
- 📕 Field guide — the short, practical on-ramp: https://github.com/jghiringhelli/generative-specification/blob/main/docs/white-paper/GenerativeSpecification_FieldGuide.pdf
- 🧭 Start here — method, tools, testimonials: https://pragmaworks.dev
- 🔨 The Forge — 2-day hands-on GS workshop for your team: https://forgeworkshop.dev
來源:README.md,提交 adc85db
工具
0版本歷史
3- v2.1.2最新Sep 23, 2026
- v2.1.1Sep 18, 2026
- v2.0.2Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分