NestWeaver
io.github.Kehl-io/nestweaver · 12 stars · Rust · MIT
MCP server Local code knowledge graph: search symbols, trace callers, and inspect change impact across repos.
Install
The repo has no one-line install. Follow its README.
Published as
- npm
nestweaverstdio
From the server's entry in the official MCP Registry.
Files
Your codebase as a queryable graph — built for AI agents.
Website · Docs · npm · Releases
NestWeaver indexes source code and Markdown into a local knowledge graph.
Search symbols, trace callers and dependencies, and get task-focused context
from the CLI or your AI coding tool through MCP.
NestWeaver uses Tree-sitter to parse 32 languages and resolves cross-file references with confidence scores. Its graph helps you explore an unfamiliar repository, assess a change's impact, and give an agent relevant symbols and relationships. Indexing and structural queries run locally; semantic embeddings and shared-server connections are optional.
Quick Start · Install options · CLI reference · MCP server · Agent setup verification · Upgrade guidance
Index a repo and query it in seconds
|
32 Languages |
Markdown Brain |
|
Intent-Aware Context |
43-Tool MCP Server |
|
PR Impact & Dead Code |
16 AI Tool Integrations |
|
Agent Interaction Memory |
Quick Start
1. Install the CLI
Upgrading an existing database? Stop the old daemon and back up with the previous binary first.
With Node.js 18+ on macOS 13.3+ or Linux with glibc 2.35+ (x86_64 or arm64):
npm install --global nestweaver nestweaver --version
npm installs the matching prebuilt binary as an optional dependency; no Rust compiler or install-time script is needed. Keep optional dependencies enabled. Windows and musl/Alpine do not have published binaries. For a verified GitHub Release archive or a source build, see Install and INSTALL.md.
2. Index and query your repository
Run these commands from your repository root:
nestweaver index --repo . --db "$(pwd)/nestweaver.lbug" nestweaver search "main" --db ./nestweaver.lbug # Replace processPayment with a symbol name found in your search results nestweaver context processPayment --db ./nestweaver.lbug
search finds symbols by name; context returns related symbols and their
relationships around a name, UID, or repo-relative file path. The database and
its sidecars stay on disk so subsequent queries can reuse the index. A local
background daemon owns the database and starts automatically on first use.
Index reports its selected database target on stderr unless --quiet is set;
the target is not a field in the --json payload. When querying from another
directory, pass the same absolute database path with --db. The first
command uses an absolute path for daemon startup. Explicit
--db keeps these examples bound to the same graph even if you have other
instances configured.
3. Connect your AI coding tool (optional)
From the same repository root:
nestweaver setup --db "$(pwd)/nestweaver.lbug" # Or choose a specific installed integration: nestweaver setup claude-code --db "$(pwd)/nestweaver.lbug"
setup detects supported tools and writes their MCP registration and
instructions. Use an absolute database path so clients launched from another
directory still query the same graph. It supports 16 integrations, including Claude Code, Cursor,
Codex, Gemini CLI, and GitHub Copilot in VS Code. Most config files are written in the repo;
Windsurf uses its user-level config, and Cline gets a printed snippet to paste.
setup attempts every tool, lists what it wrote for each, and exits non-zero
if any tool failed. Restart or reload your client and check
its tool list to confirm activation. Cursor gets the six-tool lite set; other
MCP integrations use the full set. For a client you configure manually, launch
nestweaver mcp --db /absolute/path/to/nestweaver.lbug as its stdio server; see
MCP Server for tool filtering and lifecycle details.
The first interactive
indexrun from inside your repo also offers setup. The prompt is skipped in CI, scripts, and non-TTY runs;index --setupexplicitly requests setup at the indexed repo root. Usesetup --forceonly when you want to overwrite customized skill/guide files or rebind an existing registration to a different--db(a changed--dbis reported otherwise). It never overwrites.github/copilot-instructions.md, or anAGENTS.mdwithout NestWeaver's begin/end markers.
# Keep the graph current as you edit (runs until interrupted) nestweaver watch . --db ./nestweaver.lbug
Run nestweaver --help for the full command list. Most commands support
--json for machine-readable output. Existing users should read the upgrade
notes below before using an older database with a new binary.
Upgrading — re-index before you trust a ranking
Upgrading an existing database? Check compatibility before querying it:
Builds with LadybugDB 0.22.3 read the 0.21.2 database format, but a writable open/checkpoint can upgrade its storage format from 47 to 49. Stop the old daemon and back up with the previous binary before upgrading. To downgrade, reinstall that binary and restore the pre-upgrade backup; do not point it at the upgraded file. See the storage upgrade guidance.
Previous release 12.2.6 uses resolver generation 22 and parsed cache 16. LadybugDB 0.22.1 is unchanged from 12.2.5. Anonymous JavaScript/TypeScript default functions now own calls in their bodies; Svelte, Vue and Astro function spans skip destructured/default parameters. Generation 21/cache 15's PHP static-method ownership and inheritance facts and the preceding Dart/PowerShell grammar updates remain included. Force re-index each repository once after upgrading to publish the new parser facts; invalidating the parse cache alone does not replace symbols and edges already stored in the graph.
12.2.7 uses LadybugDB 0.22.3 (the same storage format 49), resolver
generation 23 and parsed cache 17. Scala grammar 0.26.9 repairs Scala 2
given/enum identifiers and other grammar boundaries. Force-index each
repository once after upgrading from generation 22 as well.
12.2.8 uses resolver generation 24 and parsed cache 18. Re-index each repository to pick up corrected declaration spans, Rust module call edges, and partial SQLite parse diagnostics. Markdown derivation version 4 refreshes eligible vaults on daemon startup.
Canonical publication PageRank now consistently covers the unified code and notes graph after indexing, watching and rebuilding. Older canonical sidecars with a code-only scope are disclosed and recomputed lazily on the first ranked query; no graph rebuild is required for this ranking migration alone. Explicit scoped ranking APIs retain their requested scope.
daemon status --json reports both client and daemon resolver generations.
An older daemon without this provenance reports null; differing builds with
the same product version disclose skew without automatically replacing a writer.
- A database from before LadybugDB 0.21 needs a publication rebuild, not just a forced index. Back it up and follow the error's recovery command and storage-engine upgrade guide.
- For a compatible database, run
nestweaver stale-check --db <db>. 12.2.8 requires resolver generation 24 (12.2.7 used 23). If your binary reports a generation-stale graph, runnestweaver index --repo <path> --db <db> --forcefor each repository. A plain incremental index does not repair generation-stale graphs. - Generation 16 preserves declaring-package origin through Go factory-call receiver chains and revisits unchanged importers when Go package methods are added or recreated. Existing graphs may retain missing CALLS edges until the forced index above.
- Generation 17 confines Go initializer and case-clause bindings to their statement or clause, restoring valid calls after those scopes end. Cached parses are invalidated to discard the old lexical lifetimes; existing graphs need the forced repository index above. Resolution-dependency format is unchanged.
- Generation 18 and parsed cache 12 invalidate Scala parses from
before the grammar 0.26.3 update, which recovers declarations such as local
case classes and Scala 2
exportidentifiers. After upgrading to a release containing this change, force re-index each repository using the command above. An unchanged incremental run does not repair an older graph;stale-checkcontinues to report it as outdated until the forced index succeeds. - 12.2.4 generation 19 and parsed cache 13 additionally repair PHP function
resolution by namespace across directories, including
use functionaliases and duplicate refusal. Existing graphs need the forced repository index above. PHP changes conservatively re-resolve repository PHP callers because a new declaration can satisfy a previously unresolved call or create ambiguity. Ordinary index/watcher scans reuse valid cached parses; Git/server incremental repair reparses PHP peers. No-change runs remain no-ops. - Markdown derivation version 3 repairs percent-encoded Markdown URL paths and
proven absolute in-vault note paths. Eligible vaults disclose stale derivation
until re-derived; run
nestweaver brain refresh <vault> --db <db>after upgrading. This is separate from repository resolver generation; literal wikilinks keep their existing spelling semantics. - The current source also infers method receivers from typed Go slice range
elements, including qualified types and exact factory returns. Generation 14
requires the same forced repository re-index to add the missing call edges;
generation15 additionally handles inferred
varslices, parenthesized range sources and single named factory results. Parsed cache10 reparses unchanged declarations for normalized return types and complete var/const/parameter shadow guards. - Upgrading to 12.2.8 needs a forced re-index of every repository. Run
nestweaver index --repo <path> --forceonce per repository, using your usual--dband--configbindings. Plain incremental indexing can leave an unchanged graph on its old generation.stale-checkexits 2 until repaired. - Refresh any vault that still reports stale Markdown derivation. Run
nestweaver brain refresh <vault>with the same bindings to re-derive note-to-code relationships against the rebuilt graph. If upgrading from before 12.2.2, this also repairs frontmatter wikilinks and block references. - New databases do not need migration. Vaults do not carry a code resolver generation; see the detailed notes for separate Markdown derivation changes.
Facts
- Kind
- MCP server
- Group
- Uncategorized
- Stars
- 12
- License
- MIT
- Language
- Rust
- Last push
- 2026-11-23
- Forks
- 10
- MCP Registry
- io.github.Kehl-io/nestweaver
- Homepage
- nestweaver.kehl.io
Also new this week
- 73rust-anythingio.github.erkamyaman/rust-anythingRewrite an app in Rust one piece at a time, checked against the original's recorded behavior.8.1k
- 144obsidian-wikiio.github.Ar9av/obsidian-wikiMemory for agents in a markdown vault you own: search, read, write, recap, context packs.3.8k
- 150Z-Libraryio.github.heartleo/zlibSearch and download Z-Library books, fix e-book metadata, and send books to Kindle or WeRead.3.5k
- 178LearnHouseapp.learnhouse/learnhouseBuild, edit and run courses, learning paths and communities in your LearnHouse academy.2.5k
- 183MR Officeai.mroffice/officeCreate, open and edit documents, spreadsheets and PDFs in MR Office's editor, inline in chat.2.4k
- 227Seal Open Datafr.sealopendata/open-dataFrench public open data (data.gouv.fr) cross-referenced by commune, EPCI and department.1.7k