PluginBench
MCP Server
Active
Apache-2.0

CodeNib MCP Server

ai.codenib/codenib

Source-linked code search and navigation for AI coding agents with local symbol graphs and ranked retrieval.

What is the CodeNib MCP server?

The CodeNib MCP server provides searchable codebase context for coding agents through source-linked CodeGraph exploration, ranked search, and static navigation. It builds incremental indexes (BM25, symbol graphs, dense vectors) from any repository and serves them via MCP tools without requiring cloud APIs or model keys.

CodeNib transforms a repository into a queryable knowledge base for AI agents. It detects repository languages, builds reusable BM25 and symbol-graph views, and exposes ranked search, definition lookup, dependency navigation, and bounded source-read tools via MCP. Agents can explore repository context with citations and structural understanding, while humans can inspect the same indexed content through a browser Wiki or CLI.

How to install CodeNib

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "codenib": {
      "command": "uvx",
      "args": [
        "codenib",
        "--with",
        "codenib[graph,mcp]==0.2.4",
        "mcp",
        "repository"
      ]
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • explore_context — Retrieve bounded, source-verified repository context for a query using capability-aware retrieval planning.
  • dependency_subgraph — Navigate caller impact or callee dependencies in the symbol graph.
  • ranked_search — Execute ranked BM25 search over indexed repository content.
  • definition_lookup — Resolve symbol definitions through SCIP/LSP or graph-backed fallback.
  • reference_search — Find references to a symbol in the codebase.
  • regex_search — Search repository content by regex or trigram patterns.
  • route_search — Navigate structural routes through the codebase.
  • bounded_source_read — Read bounded source regions with repository-relative citations.

Use cases

  • Help coding agents understand large codebases by providing ranked, source-linked context for bug fixes or feature implementation.
  • Navigate symbol dependencies and caller impact to understand code flow and refactoring scope.
  • Search repositories by keyword, regex, or symbol definition without external APIs or model keys.
  • Build searchable Wiki documentation from source code with hybrid BM25 and vector retrieval.
  • Integrate with agent frameworks (LocAgent, Agentless, OrcaLoca, RepoNavigator) using a single manifest.

CodeNib MCP server FAQ

What is CodeNib?

CodeNib is an MCP server that indexes repositories locally and serves ranked search, symbol navigation, and bounded context retrieval to coding agents. It builds BM25, dense-vector, and symbol-graph views incrementally and requires no cloud API or model key.

Is CodeNib free?

Yes, CodeNib is open-source under Apache 2.0 and runs entirely locally. The semantic (vector) path uses a cached Hugging Face model by default; a BYO OpenAI-compatible endpoint is optional.

How do I install CodeNib in Claude Code or Cursor?

Install via pip (`pip install 'codenib[graph,mcp]==0.2.1'`) and run `codenib codegraph init /path/to/repository`. This detects your installed agents (Codex, Claude Code) and registers the MCP server with their native CLIs automatically.

Does CodeNib require authentication or API keys?

No. CodeNib runs entirely locally and requires no API keys, model credentials, or cloud services. The default semantic path uses a cached Hugging Face embedding model.

What languages does CodeNib support?

CodeNib detects repository languages and manages package-level providers for supported languages. The capability matrix at docs.codenib.ai/language_capabilities/ lists chunking, graph, and incremental support per language.

Can I use CodeNib with other agents or frameworks?

Yes. CodeNib serves a single manifest compatible with LocAgent, Agentless, CoSIL, OrcaLoca, and the RepoNavigator jump contract. Python agents can also use the RepositoryContextExplorer API directly.

README (reference)

Source of truth, from the repository.

<!-- SPDX-FileCopyrightText: 2025-2026 CodeNib Contributors SPDX-License-Identifier: Apache-2.0 --> <!-- mcp-name: ai.codenib/codenib --> <div align="center"> <img src="https://raw.githubusercontent.com/sysevol-ai/CodeNib/main/assets/codenib_logo.svg" alt="CodeNib" width="560"> <h1>Searchable codebase wikis and context for coding agents</h1> <p> Point it at any repo, get a searchable Wiki and an MCP server for your coding agent. </p> <p> <a href="https://arxiv.org/abs/2607.25431"><img src="https://img.shields.io/badge/arXiv-2607.25431-b31b1b.svg?logo=arxiv&amp;logoColor=white" alt="arXiv 2607.25431"></a> <a href="https://huggingface.co/papers/2607.25431"><img src="https://img.shields.io/badge/Hugging_Face-%232_Paper_of_the_Day-FFD21E.svg?logo=huggingface&amp;logoColor=black" alt="Hugging Face: #2 Paper of the Day"></a> </p> <p> <a href="#quickstart">Quickstart</a> &nbsp;&middot;&nbsp; <a href="https://codenib.ai">Website</a> &nbsp;&middot;&nbsp; <a href="https://discord.gg/ySer6CGn4">Discord</a> &nbsp;&middot;&nbsp; <a href="https://docs.codenib.ai/">Documentation</a> &nbsp;&middot;&nbsp; <a href="https://docs.codenib.ai/codegraph/">CodeGraph</a> &nbsp;&middot;&nbsp; <a href="https://docs.codenib.ai/mcp/">MCP</a> &nbsp;&middot;&nbsp; <a href="https://docs.codenib.ai/agent_integrations/">Agent Integrations</a> &nbsp;&middot;&nbsp; <a href="https://docs.codenib.ai/language_capabilities/">Languages</a> </p> <p> <a href="https://github.com/sysevol-ai/CodeNib/actions/workflows/ci-full.yml"><img src="https://github.com/sysevol-ai/CodeNib/actions/workflows/ci-full.yml/badge.svg" alt="CI"></a> <a href="https://pypi.org/project/codenib/"><img src="https://img.shields.io/pypi/v/codenib.svg?cacheSeconds=300" alt="PyPI version"></a> <a href="https://docs.codenib.ai/codegraph/#one-command-setup"><img src="https://img.shields.io/badge/Claude_Code-D97757?logo=claude&amp;logoColor=fff" alt="Claude Code supported"></a> <a href="https://docs.codenib.ai/codegraph/#one-command-setup"><img src="https://img.shields.io/badge/Codex-000?logo=openai&amp;logoColor=fff" alt="Codex supported"></a> <a href="https://github.com/sysevol-ai/CodeNib/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-Apache_2.0-blue.svg" alt="License: Apache 2.0"></a> <a href="https://github.com/sysevol-ai/CodeNib/blob/main/pyproject.toml"><img src="https://img.shields.io/badge/Python-3.10%2B-3776AB.svg" alt="Python 3.10+"></a> <img src="https://img.shields.io/badge/Release-0.2.1-2563EB.svg" alt="CodeNib 0.2.1"> </p> </div>
python -m pip install "codenib[graph,mcp]==0.2.1"
codenib codegraph init /path/to/your/repo

That one command detects the repository languages, installs the pinned package-level graph providers it can manage, builds BM25 plus a source-linked symbol graph, and registers the resulting MCP server with installed Codex and Claude Code clients. It is local, open source, requires no model or cloud, and does not write configuration or indexes into the target repository.

News

  • 2026-08-13 — CodeNib 0.2.1 CodeGraph onboarding. One command prepares a repository graph and connects it to Codex and Claude Code, with idempotent status, safe uninstall, and installed-wheel MCP graph verification. CodeGraph guide
  • 2026-08-08 — RepoNavigator Jump adapter. The published single-tool RepoNavigator contract now resolves symbol definitions through a persisted SCIP occurrence or injected LSP signal, with graph-only resolution disclosed as a degraded fallback. Support boundary
  • 2026-08-05 — CodeNib 0.2.0. Build a static Wiki and reusable context artifact once, then serve it through Pages or the official MCP package. Hybrid retrieval and managed SCIP/LSP providers ship in the same CLI. Release notes
  • 2026-08-05 — SweRank recipe. Run SweRank retrieval and reranking over a local checkout. Example
  • 2026-08-04 — Native repository explorer. CodeNib's planner now targets the SWE-Explore source-region protocol. Validation
  • 2026-08-03 — Native LocAgent policy. LocAgent runs directly on CodeNib views without LocAgent, LiteLLM, or LlamaIndex dependencies. Support matrix
  • 2026-08-02 — OrcaLoca SearchAgent. OrcaLoca's six-tool search loop now reuses CodeNib's symbol graph. Support matrix

System Architecture

LayerResponsibility
Incremental compilerChunk source and materialize BM25, dense, graph, and navigation views; reuse or repair supported artifacts and rebuild when an update cannot be admitted
View manifestRecord repository identity, source fingerprint, builder profile, capabilities, status, and artifact location independently for each view
Context servingExecute lexical, semantic, hybrid, reranked, and structural query plans while preserving repository-relative source locations
Agent runtimeExpose capability-aware MCP and LSP-shaped tools, assemble bounded evidence, and return citations that agents and humans can inspect
repository change
  -> materialize or repair affected views
  -> publish a capability-bearing manifest
  -> plan repository queries
  -> deliver bounded, source-linked context

On a later commit, CodeNib can reuse unchanged vector content and patch supported graph transitions at file or symbol granularity. Unsupported, inconsistent, or unverified transitions fall back to a fresh build instead of publishing a partially updated view.

Quickstart

Requires Python 3.10+ and Git. For an agent-ready CodeGraph with no model or API key, install the graph and MCP extras and run one command:

python -m pip install "codenib[graph,mcp]==0.2.1"
codenib codegraph init /path/to/repository

codegraph init detects Codex and Claude Code, installs only the detected languages' package-managed providers, builds reusable bm25 and symbol_graph views, and asks each native client CLI to own its configuration. Run codenib codegraph status /path/to/repository to diagnose the complete path or codenib codegraph uninstall /path/to/repository to remove only the managed client registrations. The index remains reusable.

For a browser Wiki with hybrid BM25+dense retrieval, install the semantic extra:

python -m pip install "codenib[semantic]==0.2.1"
codenib wiki /path/to/repository

Both paths keep reusable state under ~/.codenib/repositories and leave the target checkout unchanged. Set CODENIB_HOME to relocate state. The 0.2.1 release notes record the upgrade boundary and installed-product evidence.

Preview the CodeGraph operations without installing, indexing, or configuring an agent:

codenib codegraph init /path/to/repository --dry-run

For a structural view, CodeNib detects the repository languages and manages only their package-level providers; operating-system and project prerequisites remain explicit:

python -m pip install "codenib[graph]==0.2.1"
codenib toolchain install /path/to/repository --scope graph
codenib doctor /path/to/repository --require graph

Export that indexed commit as a serverless Wiki when a live Ask backend is not needed:

codenib export /path/to/repository --output /tmp/repository-wiki

The export contains a versioned provenance manifest, precomputed Wiki pages, source citations, and available page-level dependency data. It contains no provider credential; interactive Ask and runtime graph exploration remain on the local or MCP serving path.

For a repository-hosted Wiki, CodeNib also ships a reusable GitHub workflow that incrementally builds the same manifest, deploys the static site to Pages, and uploads the matching commit-addressed context artifact. Its default semantic route builds BM25 and vector views with a cached local Hugging Face model and needs no API key. An explicit fast route avoids the model download; a BYO OpenAI-compatible endpoint can replace local embedding. Query-time search remains in the local or MCP runtime. See GitHub Pages. The published BM25/vector artifact can then be verified against an exact local checkout and served through MCP without rebuilding the repository views.

See the Quickstart for ports, advanced indexing, and troubleshooting.

<p align="center"> <img src="https://raw.githubusercontent.com/sysevol-ai/CodeNib/main/assets/codenib_wiki.png" alt="CodeNib Wiki showing the source-linked reverse proxy guide for Caddy" width="100%"> </p>

Serve An Agent

The recommended path configures installed Codex and Claude Code clients through their native CLIs:

python -m pip install "codenib[graph,mcp]==0.2.1"
codenib codegraph init /path/to/repository

Ask the agent to start with explore_context for bounded, source-verified repository context and use dependency_subgraph for caller impact or callee dependencies. The MCP server also exposes ranked BM25, regex, definition, reference, route, and bounded source-read tools. See the CodeGraph guide for client scopes, diagnostics, uninstall behavior, and language prerequisites, and the MCP Server for the complete tool contract.

The same planner is available directly to Python agents:

from codenib.agent import RepositoryContextExplorer

with RepositoryContextExplorer.from_repository(
    "/path/to/repository", policy="auto"
) as explorer:
    result = explorer.explore("where is request retry behavior implemented?", top_k=10)

Each result includes source-validated evidence plus the selected plan, capabilities, loaded views, fusion, graph, and reranking trace.

What CodeNib Provides

SurfacePurpose
Incremental compilerBuild independently managed views, reuse unchanged content, repair supported transitions, and conservatively rebuild outside those boundaries
Agent context runtimePlan capability-aware retrieval and navigation, then assemble bounded source-linked evidence
RetrievalBM25, dense-vector, regex/trigram, Zoekt, fusion, and reranking paths; see the validated model matrix
Structural contextSCIP/LSP-backed symbol graphs with source locations and typed edges
MCP and LSP-shaped toolsServe one manifest to coding agents without tying the runtime to one agent framework
Agent compatibilityReuse one manifest across revision-pinned LocAgent, Agentless, CoSIL, and OrcaLoca contracts, plus the published RepoNavigator jump contract over SCIP/LSP definition signals; see the support matrix
Benchmark compatibilityEvaluate native exploration against pinned external datasets and scorers, including SWE-Explore; see the dataset and benchmark matrix
Local inspectionAudit the same context through Wiki pages, Ask answers, citations, and the Dependency Map
Evaluation harnessMeasure retrieval, navigation, incremental maintenance, and context policies on the same artifacts

Language support varies by surface. The generated capability matrix records chunking, graph, incremental, and C++ decoder support.

Documentation

Build the documentation site locally with:

python -m pip install -e ".[dev]"
mkdocs serve

Development

git clone https://github.com/sysevol-ai/CodeNib.git
cd CodeNib
make dev
make test

The test suite is split into unit, integration, serial integration, core, graph-consumer, and slow tiers. See CI/CD before running the credential- or toolchain-dependent tiers.

Status

CodeNib 0.2.1 is a beta release. The CLI and manifest format are usable, but public interfaces may still change before a stable release. Historical research artifacts retain their published dataset identifiers; the maintained package, import namespace, commands, and repository use CodeNib. See Naming.

Citation

If you use CodeNib in your research, please cite our arXiv paper:

@misc{yu2026codenibmultiviewdataserving,
      title={CodeNib: A Multi-View Data System for Serving Repository Context to Coding Agents},
      author={Zhongming Yu and Hengjia Yu and Boqin Yuan and Shuting Zhao and Yizhao Chen and Aryan Dokania and Mihir Jagtap and Jiayu Chang and Yitong Ma and Yash Jayswal and Wentao Ni and Hejia Zhang and Zhaoling Chen and Gangda Deng and Jishen Zhao},
      year={2026},
      eprint={2607.25431},
      archivePrefix={arXiv},
      primaryClass={cs.SE},
      url={https://arxiv.org/abs/2607.25431},
}

Project

Website  ·  Changelog  ·  Contributing

License

CodeNib is licensed under the Apache License, Version 2.0.

Related MCP servers

COCofound logo

Cofound

Maintained

MCP-native co-founder directory your AI agent searches, screening inbound pitches for you.

0
JavaScript
MIT
View repository →

Pre-trade crypto intelligence: survival rating, order-book depth, unlocks and contract flags.

View repository →

Your Colaunched account: ideas scored for you, their evidence and your launch. OAuth sign-in.

Business ideas from real public demand, scored with dated evidence. No account needed.

Turn Contabo's VPS API into AI-ready MCP tools instantly—no rewrites, full API control.

9
HTML
MIT
View repository →

HAPI MCP server: Dynamically exposes OpenAPI REST APIs as MCP tools for AI assistants

View repository →