codenib.mcp
¶
CodeNib MCP server - exposes backbone capabilities over stdio.
Provides MCP tools for semantic indexing, CodeGraph, and hybrid retrieval (vector, BM25, regex, Zoekt trigram) for external agent frameworks.
Modules:
| Name | Description |
|---|---|
context |
ServerContext - loads a RepoManifest and available index objects from disk. |
prompts |
MCP prompt resource - guidance for calling agents. |
server |
CodeNib MCP server - stdio transport. |
tools |
MCP tool implementations. |
Classes:
| Name | Description |
|---|---|
ServerContext |
Runtime context for the MCP server. |
ServerContext
dataclass
¶
ServerContext(
manifest: RepoManifest,
symbol_graph: CodeGraph | None = None,
bm25: BM25CodeIndexer | None = None,
regex_index: RegexNodeIndex | None = None,
zoekt: ZoektSearcher | None = None,
vector: CodeVectorStore | None = None,
errors: dict[str, str] = dict(),
)
Runtime context for the MCP server.
Holds the loaded manifest and runtime-loaded index objects. Missing or
failed indexes stay None; tools check at call time and return
descriptive errors.
Methods:
| Name | Description |
|---|---|
load |
Load a manifest and all available indexes. |
load
classmethod
¶
load(manifest_path: str | Path) -> ServerContext
Load a manifest and all available indexes.
Each index is loaded independently; a failure in one does not
block the others. Failed indexes are recorded in errors.