# Fabric Indexer

**MCP server that turns any codebase into a typed knowledge graph for AI assistants.**

## What it is

`fabric-indexer` is a local-first [Model Context Protocol](https://modelcontextprotocol.io) server that parses your source tree into a typed graph of modules, functions, types, tests, dependencies, contracts, and tech debt. It exposes that graph to any MCP-compatible AI client (Claude Code, Cursor, Codex, Claude Desktop) as structural-query tools. The graph lives in an embedded local store on your machine, persists across sessions, and is incrementally maintained via a file watcher.

The Indexer is one subsystem of the authenticated Fabric beta. The same
connector also exposes the required governed Fractal memory engine.

## Quickstart

```bash
cd /path/to/your/project
npx -y @cognisos/fabric-mcp@beta-candidate setup
```

Setup signs in through Cognisos, provisions the pinned Fractal runtime, performs
the full initial index, starts the watcher, and installs verified private
wrappers for detected clients. See the integration pages for details:

* [Claude Code](/integrations/claude-code)
* [Cursor](/integrations/cursor)

Once configured, ask your client to run `fabric_status`, then try
`fabric_explain` or `fabric_impact`. Lifecycle indexing is daemon-owned;
`fabric_index` and `fabric_reindex` are not exposed in local mode.

The Fabric Code Indexer daemon is required and should report ready. The separate
Fractal background capture daemon is optional and off by default, so its
`not_running` status does not by itself mean setup failed.

## What it indexes

13 languages with tree-sitter parsing. Modules, functions, types, interfaces, tests, and dependencies as graph nodes; structural edges (`Contains`, `Imports`, `Tests`, `Implements`, `Extends`, `Exports`) between them.

* **Full call-graph resolution** — TypeScript, Python, Go, Rust, Java
* **Structural extraction** — C, C++, C#, Ruby, PHP, Swift, Kotlin, Scala
* **Regex fallback** — Shell, Lua, R, Perl, and others

The daemon's full index and watcher respect `.gitignore` and `.fabricignore`.

For the full tool surface, see the [MCP reference](/mcp).

## Performance

Median **73 K LoC/sec** with **\< 70 MB peak RSS**, measured cold-cache against production OSS repos on M-series macOS.

## Status

Public beta. Pin to a version tag (`@cognisos/fabric-mcp@<version>`) for production use. See the [changelog](/changelog/fabric-mcp).

## License

MIT or Apache-2.0, at your option.
