AI kodlama ajanlarının MCP ve CLI aracılığıyla depo yapısını incelemesine, kod araması yapmasına ve proje kurallarını hatırlamasına olanak tanır.
Ayrıca bilinen adı PatrickSys/codebase-context
- Yıldızlar
- 68
- Araçlar
- —
- İndirmeler, 30 gün
- —
- En son sürüm
- —
- Son commit
- 7 Kas 2026
- Lisans
- —
Codebase Context MCP nedir?
Codebase Context bir MCP sunucusudur. AI kodlama ajanlarının MCP ve CLI aracılığıyla depo yapısını incelemesine, kod araması yapmasına ve proje kurallarını hatırlamasına olanak tanır.
Özet, projenin README dosyasından oluşturuldu
Codebase Context MCP sunucusu hakkında
codebase-context, özelleşmiş indeksleme ve geri çağırma araçları aracılığıyla AI kodlama ajanlarının karmaşık depoları anlamasına yardımcı olur. Geliştiriciler bu aracı, ajanlara üst düzey bir depo haritası, sembol referansları ve dosya ilişkileri sağlayarak, bir yapay zekanın herhangi bir düzenleme yapmaya çalışmadan önce proje yapısını incelemesine olanak tanımak için kullanır. stdio üzerinden yerel olarak veya gelişmiş bir HTTP kurulumu aracılığıyla çalışır; Claude Code, Cursor, Codex ve OpenCode gibi belirli istemciler için başlatılabilir.
Kullanıcılar, API key veya GPU gerektirmeyen varsayılan anahtar kelime tabanlı indeks ile embedding sağlayıcılarını kullanan isteğe bağlı semantik indeksleme modu arasında seçim yapabilirler. Sistem, kuralları saklamak için proje belleği ve Git diff'lerinden sınırlı bir paket oluşturan bir inceleme bağlamı aracı gibi benzersiz özellikler içerir. Anahtar kelime indeksi varsayılan olarak 5.000 aranabilir parça ile sınırlı olsa da, kullanıcılar bu sınırları yapılandırma üzerinden ayarlayabilir. Ajanların kod tabanlarında gezinme yeteneklerini artırmak için React, Next.js, Angular ve NestJS gibi framework'ler için özel analizörler sunar.
Neler yapabilirsiniz
- 1Depo yapısını haritalandırınBir göreve başlamadan önce bir AI ajanından proje organizasyonu ve modelleri hakkında üst düzey bir genel bakış oluşturmasını isteyin.
- 2Belirli kodları arayınSıralı arama sonuçlarını kullanarak bir yapay zekayı kod tabanı içindeki belirli sembolleri veya özellikleri bulması için yönlendirin.
- 3Proje kurallarını hatırlayınBellek araçlarını kullanarak bir ajana daha önce kaydedilmiş kararları veya mimari kuralları geri getirmesini söyleyin.
- 4Son değişiklikleri analiz edinOdaklanmış bir kod incelemesi gerçekleştirmesi için bir yapay zekaya son bir commit'ten gerekli bağlamı sağlayın.
Projenin README dosyasından alınmıştır. Her kullanım durumu, oradaki bir alıntı ile kontrol edilir.
Codebase Context MCP nasıl yüklenir
Biçimler 10 Kas 2026 tarihinde doğrulandıCursor'a ekleGoose'a ekleCodebase Context MCP'yi Claude Code içine yükleyin
$ claude mcp add codebase-context -- npx -y codebase-contextCodebase Context MCP'yi Cursor içine yükleyin
~/.cursor/mcp.json
{
"mcpServers": {
"codebase-context": {
"command": "npx",
"args": [
"-y",
"codebase-context"
]
}
}
}Codebase Context MCP'yi VS Code içine yükleyin
.vscode/mcp.json
{
"servers": {
"codebase-context": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"codebase-context"
]
}
}
}Codebase Context MCP'yi VS Code CLI içine yükleyin
$ code --add-mcp '{"name":"codebase-context","type":"stdio","command":"npx","args":["-y","codebase-context"]}'Codebase Context MCP'yi Claude Desktop içine yükleyin
claude_desktop_config.json
{
"mcpServers": {
"codebase-context": {
"command": "npx",
"args": [
"-y",
"codebase-context"
]
}
}
}Codebase Context MCP'yi Codex içine yükleyin
$ codex mcp add codebase-context -- npx -y codebase-contextCodebase Context MCP'yi Codex config.toml içine yükleyin
~/.codex/config.toml
[mcp_servers.codebase-context] command = "npx" args = ["-y", "codebase-context"]
Codebase Context MCP'yi Gemini CLI içine yükleyin
$ gemini mcp add -s user codebase-context npx -- -y codebase-contextCodebase Context MCP'yi Gemini settings.json içine yükleyin
~/.gemini/settings.json
{
"mcpServers": {
"codebase-context": {
"command": "npx",
"args": [
"-y",
"codebase-context"
]
}
}
}Otomatik kontroller
Çalıştırıldı 13 Kas 2026Tam rapor →Otomatik kontrollerimizden geçti. Bu bir güvenlik denetimi değildir: kodu okuyun ve sunucuya ihtiyaç duyduğu en dar erişimi verin. Kontroller nasıl çalışır · Daha fazla puan için nelerin düzeltileceği
- Kaynak deposu bağlantılı ve erişilebilirpatricksys/codebase-context is public and reachablegithub.com/patricksys/codebase-context ↗Geçti
- Paket, bu depoyu kaynağı olarak gösteriyorcodebase-context names patricksys/codebase-context as sourcenpmjs.com/package/codebase-context ↗Geçti
- Derleme kökeni (Sigstore onayı)Sigstore attestation for codebase-contextnpmjs.com/package/codebase-context/v/2.2.0#provenance ↗Geçti
- Açık kaynak lisansı (OSI)No licenseBulgu
- Son bir yıl içinde commit veya sürüm mevcutLast commit or release 2026-11-07github.com/patricksys/codebase-context ↗Geçti
- OpenSSF ScorecardKontrol edilmedi
- Paket adı popüler bir pakete yakın değilNo popular package one edit away from codebase-contextGeçti
- Pakette veya bağımlılıklarında kritik uyarı yokKontrol edilmedi
- Modele yönelik gizli talimat yok0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersGeçti
- Yıkıcı araçlar etiketlenmişKontrol edilmedi
- Uzak uç nokta MCP el sıkışmasına yanıt veriyorKontrol edilmedi
Codebase Context
Local repository maps, code search and symbol references for coding agents. Codebase Context exposes these through MCP and a CLI so an agent can inspect the repository before editing it.
Published beta: 2.3.1-beta.0 (stable: 2.2.0)
As checked on 4 November 2026, npm beta points to 2.3.1-beta.0, while npm latest remains 2.2.0. The beta requires Node.js 22 or newer. An unpinned npx -y codebase-context may use an already installed local version; without one, it resolves npm latest (currently the stable 2.2.0). To select the published beta explicitly, use npx -y codebase-context@2.3.1-beta.0 --version. A source checkout or a local tarball is separate from a verified registry release.
Fresh beta indexes use keyword search without downloading an embedding or reranker model. Existing indexes keep their recorded mode. Semantic indexing is an explicit option; its optional runtimes and model downloads are separate from the default path.
Try the beta or a local build from the terminal
Use an explicitly installed 2.3.1-beta.0, a built checkout (pnpm install, then pnpm build in the CBC checkout) or an installed local tarball. From the repository you want to inspect, point Node at that installation's actual entrypoint:
node /path/to/codebase-context/dist/index.js --version
node /path/to/codebase-context/dist/index.js map
node /path/to/codebase-context/dist/index.js search --query "a symbol or feature in this repository" --limit 5
node /path/to/codebase-context/dist/index.js status
Replace the paths and query with your own. For a tarball installed under /path/to/cbc-local, the entrypoint is /path/to/cbc-local/node_modules/codebase-context/dist/index.js. Quote paths containing spaces.
map builds an index when the folder has no previous index. It then returns a bounded repository map. Search returns ranked source locations; open the returned code before relying on it. Low confidence means weak matching evidence, not that an implementation is absent.
To refresh the index, use reindex. Omitting mode flags preserves the recorded mode; reindex --no-embeddings explicitly selects keyword-only indexing. reindex --embeddings selects the configured embedding provider and requires optional LanceDB storage. The default local provider also requires Transformers and may download models; an explicitly configured remote provider has its own connection requirements. Changing modes requires a full rebuild, including when --incremental is supplied.
Set up your AI client
From the target repository, the installed beta or built source can write project registrations for selected detected clients:
node /path/to/codebase-context/dist/index.js init
# Or select one client explicitly:
node /path/to/codebase-context/dist/index.js init --client codex --root /path/to/project --yes
The wizard recognizes Claude Code, Codex, Cursor and OpenCode. It saves the Node binary and package entrypoint that ran setup. If that installation or its npx cache is moved or removed, rerun setup. Writing a config does not prove that a native client connected or completed a coding task.
After registration, restart the client and ask:
Use Codebase Context to find [feature] in this repository. Pass this repository's absolute path as project, wait for indexing if needed, and open the relevant source files.
The client setup guide contains beta setup instructions and dated checks for the older stable package. Historical manual recipes, including Windsurf, retain their dated verification limits. For example, the following manual registration leaves the package version unpinned; it may use an already installed local version or fall back to npm latest, so it does not reliably select the beta:
claude mcp add --scope user --transport stdio codebase-context -- npx -y codebase-context
The default transport is stdio: the client starts the server. HTTP is an advanced option with client-specific setup. Explicit project selection is the portable default. A successful selection becomes active for later calls in that server process; select again after restarting or changing repositories.
What your agent can inspect
- Repository map: structure, detected patterns and example files before narrowing to a task.
- Code search: bounded, ranked results with source locations and search-quality information. The default compact response contains at most six results.
- Symbol references: static identifier occurrences. They are not a runtime call graph.
- File relationships: TypeScript/JavaScript imports and re-exports, with unresolved or stale edges reported. Python and Go import navigation are not supported.
- Team patterns: file-level frequencies and example files. These are observations about the repository, not prescriptions about code quality.
- Project memory:
rememberandget_memorystore and retrieve project conventions, decisions, gotchas and failures. - Review context:
codebase-context-reviewbuilds a bounded packet from a committed Git diff. It does not review code or establish reviewer quality. The review-context guide retains a separate historical version preview; it is not evidence of this candidate's publication.
Dedicated analyzers in the source cover Angular, React, Next.js and NestJS. Other files use the generic analyzer and available parsers. See the capabilities reference for scope and limitations.
Privacy and storage
The default keyword index is built locally. Docker, a GPU and an API key are not required. Optional local embeddings also run on the machine. If you explicitly configure a remote embedding provider, code chunks are sent to that provider.
Your AI client may send returned code to its own model provider; CBC does not control that connection. Project memory also travels with the repository if you commit and push it.
Generated index data should stay out of version control. To share project memory while ignoring the generated index:
.codebase-context/*
!.codebase-context/memory.json
Evidence and limits
The benchmark report and prior report archive describe separate historical experiments. These are retrieval observations, not a winner or a coding-quality claim. This historical evidence does not establish patch correctness or end-to-end coding quality. Versions, fixtures and failure records matter; these reports do not certify this candidate. This draft makes no claim that CBC beats text search, improves coding outcomes, or reduces time or tokens.
The default keyword path can miss natural-language questions when their vocabulary differs from the code. A returned file and a high score are not proof that an answer is correct. Inspect the cited implementation. Optional semantic search has not established a retrieval-quality advantage for this candidate.
Other practical limits:
- The default keyword index holds at most 5,000 searchable chunks per project.
projects[].parsing.maxChunkscan raise that limit. - Search has bounded candidate inspection. Narrow a query when the candidate budget is exhausted; refresh when source files changed or became unavailable.
- Existing formats or incomplete generations can require an explicit rebuild or recovery choice. A failed operation is not a successful recovery.
- Setup evidence differs by client. Config writing, protocol connectivity and native-client task completion are separate checks.
- Stdio routing checks do not establish concurrent HTTP client isolation.
Reference
- Client setup — candidate registration, dated checks and limits
- Capabilities — tools, routing, configuration and optional modes
- CLI — local-candidate commands and historical illustrations
- Benchmark — historical methods, observations and failures
- Contributing — local development and evaluation commands
- Changelog — candidate changes and historical entries
Elastic-2.0. See LICENSE.
Codebase Context MCP soruları
Codebase Context MCP'yi Claude Code'a nasıl eklerim?
Terminalinizde claude mcp add codebase-context -- npx -y codebase-context komutunu çalıştırın. Her projede kullanılabilir olması için --scope user ekleyin.
Codebase Context MCP'yi Cursor'a nasıl eklerim?
~/.cursor/mcp.json dosyasını açın ve yukarıdaki yükleme bölümünde gösterilen Cursor yapılandırmasını kullanarak sunucuyu mcpServers altına ekleyin.
Codebase Context ile bir AI ajanı neleri inceleyebilir?
Ajan bir depo haritasını görüntüleyebilir, sıralı kod araması yapabilir, sembol referanslarını ve dosya ilişkilerini bulabilir, ekip modellerini gözlemleyebilir ve proje belleğini saklayabilir veya geri çağırabilir.
Codebase Context için Docker, GPU veya bir API key gerekir mi?
Hayır. Varsayılan anahtar kelime indeksi; Docker, GPU veya bir API key gerektirmeden yerel olarak oluşturulur. İsteğe bağlı embedding işlemleri de siz açıkça uzak bir sağlayıcı yapılandırmadığınız sürece yerel olarak çalışır.
Codebase Context hangi AI istemcilerini otomatik olarak kurabilir?
Başlatma sihirbazı Claude Code, Codex, Cursor ve OpenCode'u tanır ve bunlar için proje kayıtlarını yazar.
Varsayılan bir kod araması kaç sonuç döndürür?
Varsayılan kompakt arama yanıtı en fazla altı sıralı sonuç içerir.
Oluşturulan indeks verileri versiyon kontrol sistemine dahil edilmeli mi?
Hayır. Oluşturulan indeks verilerini versiyon kontrol sisteminin dışında tutmalısınız; isteğe bağlı olarak sadece proje bellek dosyasını commit edebilirsiniz.