LocalNest MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
npm install -g localnest-mcp
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add localnest -- node "<FULL_PATH_TO_LOCALNEST>/dist/index.js"

Replace <FULL_PATH_TO_LOCALNEST>/dist/index.js with the actual folder you prepared in step 1.

README.md

A local-first MCP server for safe, scoped codebase access and hybrid search.

LocalNest MCP

Your codebase. Your AI. Your machine โ€” no cloud, no leaks, no surprises.

LocalNest is a local-first MCP server that gives AI agents safe, scoped access to your code โ€” with hybrid search, semantic indexing, and persistent memory that never leaves your machine.

๐Ÿ“– Full documentation ยท Architecture deep dive


Why LocalNest?

Most AI code tools phone home. LocalNest doesn't.

Everything โ€” file reads, vector embeddings, memory โ€” runs in-process on your machine. No cloud subscription, no rate limits, no data leaving your box. And because it speaks MCP, any compatible client (Cursor, Windsurf, Codex, Kiro, Gemini CLI) can plug in with one config block.

What you get How it works
Safe file access Scoped reads under your configured roots โ€” nothing outside
Instant lexical search ripgrep-backed symbol and pattern search (JS fallback if missing)
Semantic search Local vector embeddings via all-MiniLM-L6-v2 โ€” no GPU needed
Hybrid retrieval Lexical + semantic fused with RRF ranking for best-of-both results
Project awareness Auto-detects projects from marker files, scopes every tool call
Agent memory Durable, queryable knowledge graph โ€” your AI remembers what it learned

Quick Start

npm install -g localnest-mcp
localnest setup
localnest doctor

3. Drop this into your MCP client config

Setup auto-writes the config for detected tools. You'll also find a ready-to-paste block at ~/.localnest/config/mcp.localnest.json:

{
  "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_DB_PATH": "~/.localnest/data/localnest.db",
        "LOCALNEST_INDEX_PATH": "~/.localnest/data/localnest.index.json",
        "LOCALNEST_EMBED_PROVIDER": "huggingface",
        "LOCALNEST_EMBED_MODEL": "sentence-transformers/all-MiniLM-L6-v2",
        "LOCALNEST_EMBED_CACHE_DIR": "~/.localnest/cache",
        "LOCALNEST_EMBED_DIMS": "384",
        "LOCALNEST_RERANKER_PROVIDER": "huggingface",
        "LOCALNEST_RERANKER_MODEL": "cross-encoder/ms-marco-MiniLM-L-6-v2",
        "LOCALNEST_RERANKER_CACHE_DIR": "~/.localnest/cache",
        "LOCALNEST_MEMORY_ENABLED": "false",
        "LOCALNEST_MEMORY_BACKEND": "auto",
        "LOCALNEST_MEMORY_DB_PATH": "~/.localnest/data/localnest.memory.db"
      }
    }
  }
}

Windows: Use the config written by localnest setup โ€” it sets the correct command for your platform automatically.

Restart your MCP client. If it times out, set startup_timeout_sec: 30 in your client config.

Requirements: Node.js >=18 ยท ripgrep recommended but optional

AST-aware chunking ships by default for JavaScript, Python, Go, Bash, Lua, and Dart. Other languages still index cleanly with line-based fallback chunking.

The current stable runtime uses @huggingface/transformers for local embeddings and reranking. New setup defaults use huggingface, and older xenova configs remain accepted as a compatibility alias.

# macOS
brew install ripgrep

# Ubuntu/Debian
sudo apt-get install ripgrep

# Windows
winget install BurntSushi.ripgrep.MSVC

Upgrade

localnest upgrade              # latest stable
localnest upgrade stable       # latest stable
localnest upgrade beta         # latest beta
localnest upgrade <version>    # pin to a specific version
localnest version              # check current

How Agents Use It

Two workflows cover almost everything:

Fast lookup โ€” find it, read it, done

Best for pinpointing a file, symbol, or code pattern.

localnest_search_files   โ†’ fi

Tools (1)

localnest_search_filesPerforms a search across the codebase to find files, symbols, or patterns.

Environment Variables

LOCALNEST_CONFIGPath to the localnest configuration file
LOCALNEST_INDEX_BACKENDBackend engine for indexing
LOCALNEST_EMBED_PROVIDERProvider for vector embeddings
LOCALNEST_MEMORY_ENABLEDToggle for persistent agent memory

Configuration

claude_desktop_config.json
{"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_DB_PATH": "~/.localnest/data/localnest.db", "LOCALNEST_INDEX_PATH": "~/.localnest/data/localnest.index.json", "LOCALNEST_EMBED_PROVIDER": "huggingface", "LOCALNEST_EMBED_MODEL": "sentence-transformers/all-MiniLM-L6-v2", "LOCALNEST_EMBED_CACHE_DIR": "~/.localnest/cache", "LOCALNEST_EMBED_DIMS": "384", "LOCALNEST_RERANKER_PROVIDER": "huggingface", "LOCALNEST_RERANKER_MODEL": "cross-encoder/ms-marco-MiniLM-L-6-v2", "LOCALNEST_RERANKER_CACHE_DIR": "~/.localnest/cache", "LOCALNEST_MEMORY_ENABLED": "false", "LOCALNEST_MEMORY_BACKEND": "auto", "LOCALNEST_MEMORY_DB_PATH": "~/.localnest/data/localnest.memory.db"}}}}

Try it

โ†’Search for the implementation of the authentication middleware in my project.
โ†’Find all files related to the database schema definition.
โ†’Explain how the current project handles error logging based on the codebase.
โ†’Locate the function responsible for processing user input in the main module.

Frequently Asked Questions

What are the key features of LocalNest MCP?

Safe, scoped file access restricted to configured roots. Hybrid retrieval combining ripgrep lexical search and semantic vector embeddings. Local-first architecture with no data leaving the machine. Durable, queryable knowledge graph for agent memory. AST-aware chunking for multiple programming languages.

What can I use LocalNest MCP for?

Developers needing AI assistance on sensitive codebases without cloud exposure. Teams requiring high-performance semantic search across large local repositories. Building AI agents that need to maintain persistent context about project architecture.

How do I install LocalNest MCP?

Install LocalNest MCP by running: npm install -g localnest-mcp

What MCP clients work with LocalNest MCP?

LocalNest MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep LocalNest MCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare