Skip to main content
Glama
sysevol-ai

CodeNib MCP Server

by sysevol-ai
README.md
<!--
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="440">
  <h1>Find the right code. Trace the calls.</h1>
  <p>Give Claude Code and Codex source context and typed graph navigation across languages.</p>
  <p>
    <strong>71.4% code-block Recall@5 on 100 real issues.</strong><br>
    Model-planned grep → Jev: +12.8 percentage points over the same grep candidates without reranking.<br>
    <a href="https://docs.codenib.ai/evaluation/grep_jev/">Experimental result · Method and limitations</a>
  </p>
  <p>
    <a href="#quickstart">Use with your agent</a>
    &nbsp;&middot;&nbsp;
    <a href="https://demo.codenib.ai">Browse a Wiki</a>
    &nbsp;&middot;&nbsp;
    <a href="https://docs.codenib.ai/language_capabilities/">Languages</a>
    &nbsp;&middot;&nbsp;
    <a href="https://docs.codenib.ai/agent_integrations/">Reproductions</a>
    &nbsp;&middot;&nbsp;
    <a href="https://github.com/sysevol-ai/CodeNib/releases">Releases</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://github.com/sysevol-ai/CodeNib/releases/latest"><img src="https://img.shields.io/github/v/release/sysevol-ai/CodeNib" alt="Latest GitHub Release"></a>
    <a href="https://arxiv.org/abs/2607.25431"><img src="https://img.shields.io/badge/arXiv-2607.25431-b31b1b.svg" alt="arXiv paper"></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="Apache 2.0 license"></a>
  </p>
</div>

<p align="center">
  <a href="https://github.com/sysevol-ai/CodeNib/blob/main/landing/assets/demos/codegraph-claude.mp4">
    <img src="https://raw.githubusercontent.com/sysevol-ai/CodeNib/main/landing/assets/demos/codegraph-claude.png" alt="Play a recorded Claude Code session on Requests: explore_context finds where authentication is stripped on redirects, then one dependency_subgraph call traces the four-hop caller chain from the public API" width="100%">
  </a>
</p>
<p align="center"><a href="https://github.com/sysevol-ai/CodeNib/blob/main/landing/assets/demos/codegraph-claude.mp4">▶ Watch the 15-second replay</a> · real CLI output · waits condensed ·
  <a href="https://docs.codenib.ai/codegraph/#recorded-agent-session">Pinned source, transcript and setup details</a>.
</p>

## Quickstart

Requires Python 3.10+, Git, a clean repository, and Claude Code or Codex.

```bash
python -m pip install "codenib[graph,mcp]"
codenib codegraph init /path/to/your/repo
```

Then ask your agent: **“Use CodeNib's `explore_context` to find where request
retry behavior is implemented. Cite the files and lines.”**

This shipping path builds local search and a typed symbol graph, then connects
installed agent clients. It needs no model, API key, or GPU for CodeNib;
your agent uses its own model. It is separate from the grep/Jev experiment
above. Language toolchain and project prerequisites vary.

[Setup and troubleshooting](https://docs.codenib.ai/codegraph/)
· [Source exclusions](https://docs.codenib.ai/codegraph/#select-the-repository-source-surface)
· [All MCP tools](https://docs.codenib.ai/mcp/)
· [Local Wiki](https://docs.codenib.ai/quickstart/)

## Why CodeNib

- **Inspect the evidence.** Retrieve bounded code context with file and line
  references, then follow callers, callees, definitions, and references.
- **Use the same tools across languages.** The registry tracks 14 language
  entries, including 12 with graph backends. Check capability and setup
  differences in the [language matrix](https://docs.codenib.ai/language_capabilities/).
- **Compare methods on the same source.** Pinned agent contracts, datasets,
  and scorer checks make the [reproduction surface](https://docs.codenib.ai/agent_integrations/)
  inspectable.
- **Share what you found.** Export a Wiki with source citations to your own
  [GitHub Pages](https://docs.codenib.ai/github_pages/), or browse the
  [public examples](https://demo.codenib.ai).

## How it compares

What an agent can ask each tool, checked against upstream docs on 2026-09-28.
This compares capabilities, not benchmark scores.

| Tool | Ask in plain language | Callers/callees beyond one hop | Relationships resolved by | Runs |
| --- | --- | --- | --- | --- |
| grep / read | No; literal or regex | No | Text match | Local |
| **CodeNib CodeGraph** | Yes; ranked source anchors (`explore_context`) | Yes; one call, depth ≤ 8 (`dependency_subgraph`) | SCIP/LSP indexers (compiler-resolved) | Local |
| [Serena](https://github.com/oraios/serena) | No; symbol name or regex | One level per call (`find_referencing_symbols`) | Live language server or IDE | Local |
| [CodeGraph (colbymchenry)](https://github.com/colbymchenry/codegraph) | Yes; FTS5 full-text (`codegraph_explore`) | Yes; call paths in `codegraph_explore` | Tree-sitter AST extraction | Local; telemetry opt-out |
| [DeepWiki public MCP](https://docs.devin.ai/work-with-devin/deepwiki-mcp) | Yes; generated answers (`ask_question`) | No structured graph tools | Generated Wiki | Hosted |

None of these repository tools needs its own model or API key; your agent
uses its own model. [Detailed comparison, sources and boundaries](https://docs.codenib.ai/comparison/).
CodeNib 0.2.4 also includes an optional [grep → Jev route](https://docs.codenib.ai/guides/grep-jev/)
using OpenRouter for planning and reranking; selected code goes to remote
models. Authorization previews remain opt-in. The historical research result
above is separate from the product evaluation and the model-free CodeGraph row.

## Languages

Graph backends: **Python, Go, Rust, C/C++, C#, Java, Ruby, PHP, Kotlin,
Scala, JavaScript, and TypeScript**. Swift and Lua support chunking/retrieval.
Provider prerequisites and coverage differ by language.

The [generated language matrix](https://docs.codenib.ai/language_capabilities/)
separates chunking, graph backends, incremental-backend support, and decoder
parity. The product currently reuses or rebuilds views; file-level delta
repair is not enabled.

## Results and reproductions

| Start here | What you can inspect |
| --- | --- |
| [grep → Jev result](https://docs.codenib.ai/evaluation/grep_jev/) | 100-issue retrieval comparison, candidate controls, model use and limitations |
| [Agent integration matrix](https://docs.codenib.ai/agent_integrations/) | Revision-pinned LocAgent, Agentless, CoSIL, OrcaLoca and RepoNavigator contracts; compatibility does not imply reproduced paper scores |
| [Dataset and benchmark matrix](https://docs.codenib.ai/evaluation/) | CodeNib Base/Synthesis, SWE-bench variants, Loc-Bench and SWE-Explore support |
| [SWE-Explore validation](https://docs.codenib.ai/evaluation/swe_explore/) | 1,020/1,020 real-output metric cells match the pinned official evaluator on a fixed 20-case run |
| [DGX Spark deployment](https://docs.codenib.ai/guides/reference-deployments/dgx-spark/) | Local Wiki, CodeGraph and model serving on GB10; a deployment guide, not a token-saving benchmark |

## Documentation and community

[Documentation](https://docs.codenib.ai/)
· [Architecture](https://docs.codenib.ai/concepts/architecture/)
· [Contributing](https://github.com/sysevol-ai/CodeNib/blob/main/CONTRIBUTING.md)
· [CI and testing](https://docs.codenib.ai/ci_cd/)
· [Changelog](https://github.com/sysevol-ai/CodeNib/blob/main/CHANGELOG.md)
· [Discord](https://discord.gg/ySer6CGn4)

CodeNib is in beta; public interfaces may change before a stable release.
Historical research artifacts retain their published dataset identifiers.

## Citation

If you use CodeNib in your research, please cite our
[arXiv paper](https://arxiv.org/abs/2607.25431):

```bibtex
@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},
}
```

CodeNib is licensed under [Apache 2.0](https://github.com/sysevol-ai/CodeNib/blob/main/LICENSE).