localnest

LocalNest is a comprehensive MCP server that combines code intelligence, a knowledge graph, and persistent AI memory in a single local package.

<h1 align="center">LocalNest MCP</h1> <p align="center"> <strong>Code Intelligence + Knowledge Graph + AI Memory — One Local MCP Server</strong> </p> <p align="center"> <a href="https://www.npmjs.com/package/localnest-mcp"><img src="https://img.shields.io/npm/v/localnest-mcp.svg?style=for-the-badge&color=success" alt="npm version"></a> <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-gold.svg?style=for-the-badge" alt="License: MIT"></a> <a href="https://github.com/wmt-mobile/localnest/actions/workflows/quality.yml"><img src="https://img.shields.io/github/actions/workflow/status/wmt-mobile/localnest/quality.yml?branch=main&style=for-the-badge&label=Quality" alt="Quality"></a> </p> <p align="center"> The only MCP server that unifies <b>semantic code search</b>, a <b>temporal knowledge graph</b>, and <b>persistent AI memory</b> in a single local-first package.<br/> 74 tools. Zero cloud. Pure SQLite. </p>

Why LocalNest?

Every other MCP server forces you to choose: memory or code intelligence. Never both.

LocalNest is the first to combine all three pillars into one server that runs entirely on your machine:

PillarWhat it doesWhy it matters
Code IntelligenceHybrid BM25+vector search, AST-aware chunking, symbol finding (defs/usages/callers)Your AI understands code structure, not just text
Knowledge GraphTemporal entity-triple store with multi-hop traversal and as_of time-travel queriesArchitectural decisions, dependencies, and facts — versioned over time
Persistent MemoryCross-session recall, semantic dedup, agent-scoped isolation, conversation ingestionYour AI remembers what you taught it — forever

How LocalNest Compares

No other MCP server covers all three pillars. Here's how the landscape breaks down:

vs Memory-Only Servers

LocalNestMem0Basic MemoryMCP Memory ServiceAgentMemory
Persistent AI memoryYesYesYesYesYes
Knowledge graphYesNoNoNoNo
Semantic code searchYesNoNoNoNo
Symbol finding (defs/usages)YesNoNoNoNo
AST-aware chunkingYesNoNoNoNo
Local-first / no cloudYesHybridYesYesYes
MCP tools748~102443

Mem0 has 41k stars and $24M in funding — but it's memory-only with no code intelligence. Basic Memory integrates with Obsidian but can't search code. AgentMemory has auto-capture hooks but zero code features.

vs Code Intelligence Servers

LocalNestGitNexusclaude-contextcodebase-memory-mcpCodeGraphContext
Semantic code searchYesYesYesYesYes
Knowledge graphYesCode-onlyNoCode-onlyYes
Persistent AI memoryYesNoNoNoNo
Cross-session recallYesNoNoNoNo
Symbol findingYesYesNoYesYes
Temporal time-travel queriesYesNoNoNoNo
Conversation ingestionYesNoNoNoNo
Local-first / no cloudYesYesPartialYesYes
MCP tools7416~514~10

GitNexus (27k stars) has strong code search but no memory. claude-context (Zilliz, 5.9k stars) is Milvus-backed with no KG or memory. codebase-memory-mcp (DeusData) is the closest competitor — code + KG in a single binary — but has no AI memory layer.

Full Feature Matrix

FeatureLocalNestcodebase-memory-mcpGitNexusclaude-contextBasic MemoryMem0
Semantic code search (hybrid BM25+vec)YesYesYesYesNoNo
Knowledge graph (entities + triples)YesCode-onlyCode-onlyNoNoNo
Persistent AI memoryYesNoNoNoYesYes
Symbol finding (defs/usages/callers)YesYesYesNoNoNo
AST-aware chunkingYesYesYesYesNoNo
Temporal time-travel queriesYesNoNoNoNoNo
Multi-hop graph traversalYesNoNoNoNoNo
Conversation ingestionYesNoNoNoNoNo
Agent-scoped isolationYesNoNoNoNoNo
Semantic dedupYesNoNoNoNoNo
Hooks system (pre/post callbacks)YesNoNoNoNoNo
Interactive TUI dashboardYesNoNoNoNoNo
Local-first / no cloudYesYesYesPartialYesHybrid
MCP tools741416~5~108
Zero external depsNo (Node.js)Yes (binary)NoNoNoNo

LocalNest is the only server that checks every box in the first three rows.


Quick Start

# Install
npm install -g localnest-mcp

# Setup workspace + embeddings
localnest setup

# Verify
localnest doctor

Interactive dashboard:

localnest dashboard

MCP Client Config

After setup, add this to your AI client config:

{
  "mcpServers": {
    "localnest": {
      "command": "localnest-mcp",
      "startup_timeout_sec": 30,
      "env": {
        "MCP_MODE": "stdio",
        "LOCALNEST_CONFIG": "~/.localnest/config/localnest.config.json",
        "LOCALNEST_INDEX_BACKEND": "sqlite-vec",
        "LOCALNEST_MEMORY_ENABLED": "true"
      }
    }
  }
}

Works with Claude Code, Cursor, Windsurf, Cline, Continue, Gemini CLI, and any MCP-compatible client.


Tool Suites

LocalNest exposes 74 specialized MCP tools, organized into focused suites:

<details> <summary><b>Workspace & Discovery</b> — file navigation, project summaries, scoped reads</summary> <p><code>project_tree</code>, <code>read_file</code>, <code>file_changed</code>, <code>list_projects</code>, <code>list_roots</code>, <code>summarize_project</code></p> </details> <details> <summary><b>Search & Code Intelligence</b> — hybrid search, symbols, AST-aware queries</summary> <p><code>search_hybrid</code>, <code>search_code</code>, <code>search_files</code>, <code>find</code>, <code>find_definition</code>, <code>find_usages</code>, <code>find_callers</code>, <code>find_implementations</code>, <code>get_symbol</code>, <code>rename_preview</code></p> </details> <details> <summary><b>Memory & Recall</b> — persistent cross-session memory with semantic dedup</summary> <p><code>memory_store</code>, <code>memory_recall</code>, <code>memory_get</code>, <code>memory_update</code>, <code>memory_delete</code>, <code>memory_list</code>, <code>memory_store_batch</code>, <code>memory_delete_batch</code>, <code>memory_related</code>, <code>memory_suggest_relations</code>, <code>memory_add_relation</code>, <code>memory_remove_relation</code>, <code>memory_capture_event</code>, <code>memory_events</code>, <code>memory_status</code>, <code>memory_check_duplicate</code></p> </details> <details> <summary><b>Knowledge Graph</b> — temporal triples, time-travel, multi-hop traversal</summary> <p><code>kg_add_entity</code>, <code>kg_add_triple</code>, <code>kg_query</code>, <code>kg_invalidate</code>, <code>kg_as_of</code>, <code>kg_timeline</code>, <code>kg_stats</code>, <code>kg_add_entities_batch</code>, <code>kg_add_triples_batch</code>, <code>kg_backfill_links</code>, <code>graph_traverse</code>, <code>graph_bridges</code></p> </details> <details> <summary><b>Organization</b> — nests, branches, agent isolation, diary</summary> <p><code>nest_list</code>, <code>nest_branches</code>, <code>nest_tree</code>, <code>diary_write</code>, <code>diary_read</code></p> </details> <details> <summary><b>Ingestion & Hooks</b> — conversation import, lifecycle callbacks</summary> <p><code>ingest_markdown</code>, <code>ingest_json</code>, <code>hooks_stats</code>, <code>hooks_list_events</code></p> </details> <details> <summary><b>Agent Context</b> — priming, teaching, outcomes, task context</summary> <p><code>agent_prime</code>, <code>teach</code>, <code>capture_outcome</code>, <code>task_context</code>, <code>whats_new</code></p> </details> <details> <summary><b>System</b> — health, indexing, updates, embedding status</summary> <p><code>health</code>, <code>server_status</code>, <code>index_project</code>, <code>index_status</code>, <code>embed_status</code>, <code>update_self</code>, <code>update_status</code>, <code>audit</code>, <code>backup</code>, <code>restore</code>, <code>help</code>, <code>usage_guide</code></p> </details>

Full parameter reference: Tool Documentation


Agentic Workflows

LocalNest is designed as the foundational context layer for AI coding agents:

  • Cold startagent_prime instantly hydrates the context window with relevant memories, recent changes, and project state.
  • Deep investigationfind runs fused search across code fragments and historical design decisions in a single call.
  • Continuous learningteach saves architectural rules that persist across sessions, ensuring agents never repeat mistakes.
  • Outcome capturecapture_outcome records what worked and what didn't, building an experience base over time.

Enterprise-Grade Quality

  • OIDC Trusted Publishing for verifiable npm provenance
  • Continuous CodeQL static analysis on all branches
  • OpenSSF Scorecard monitoring and proactive Dependabot updates

Troubleshooting

<details> <summary><b>Installing from GitHub fails</b></summary>

Direct npm install -g git+https://... may fail with TAR_ENTRY_ERRORS. This is a known npm limitation.

Fix: clone, pack, install

git clone https://github.com/wmt-mobile/localnest.git
cd localnest && npm pack
npm install -g ./localnest-mcp-*.tgz
</details> <details> <summary><b>Semantic search not working</b></summary>
cd $(npm root -g)/localnest-mcp && npm install --no-save @huggingface/transformers
localnest doctor
</details>

Resources


<div align="center"> <strong>Code intelligence. Knowledge graph. AI memory. One server. Your machine.</strong> </div>