Skip to content

vijaytank/NakshAstraMCP-Docs

Repository files navigation

NakshAstraMCP - AI Code Context Engine Banner

NakshAstraMCP

The ultimate high-performance local code context engine for AI-native software development.

License Status OS Support Release


What is NakshAstraMCP?

NakshAstraMCP is an ultra-fast, local-first Model Context Protocol (MCP) server built to empower AI coding assistants β€” including Claude, Cursor, Windsurf, and Antigravity IDE β€” with deep, AST-accurate, structural understanding of your codebases.

Unlike generic text searches or broad file dumps that inflate LLM token costs and dilute context quality, NakshAstraMCP parses class hierarchies, function boundaries, and cross-file reference graphs to supply AI agents with the exact context needed to solve complex programming tasks β€” safely and precisely.


🧭 Documentation Hub

πŸš€ Setup Guide πŸ“– User Guide πŸ€– Agent Guide
Step-by-step Installation & Platform Setup Advanced Usage, CLI Reference & Configuration AI Agent Behavioral Instructions
πŸ“œ License πŸ›‘οΈ Security Policy πŸ’¬ Community Discussions
Usage Terms Local Privacy & Safety Q&A, Ideas & Feedback
🎯 MCP-First Skill πŸ› οΈ Troubleshooting πŸ“‹ Global Agent Config
AI Assistant Rule Profile Diagnosis & Recovery Custom AI Instructions Block

⚑ Performance Benchmarks

  • Search Latency: ~0.68ms (p95) across medium-to-large codebases.
  • Semantic Alignment: CPU-bound FlashRank reranker aligns results to programming intent.
  • Memory Footprint: Runs under < 150 MB idle RAM with automatic garbage collection.
  • Language Coverage: Deep AST parsing for Python, JavaScript, TypeScript (TSX), Java, Kotlin, and Swift out of the box β€” plus runtime addon support for Go, Rust, Ruby, and more.
  • Token Savings: Reduces LLM context payload sizes and costs by up to 75%.

πŸ“Š Context Retrieval: With vs. Without NakshAstraMCP

Tested on a commercial codebase with over 10,000 source files:

Metric With NakshAstraMCP Manual Search Efficiency Gain
Context Fidelity High: specific AST symbols & 1-hop neighbors Low: scattered keyword-only search High-Precision Context
LLM Token Cost $0.09 $0.37 75% Cost Reduction
Wall Clock Time 1m 21s 2m 05s 35% Speed Increase

NakshAstraMCP Search Interface Dashboard

Sleek multi-repository hybrid search with instant lexical routing.


✨ Core Features

Feature Description
πŸ” Multi-Repo Hybrid Search Search and merge context across all your projects simultaneously.
🧠 Semantic Reranking FlashRank cross-encoder (CPU-based) re-orders results by conceptual intent.
🌳 AST-Aware Snippets Returns complete, syntactically valid functions/classes β€” no arbitrarily sliced text.
πŸ“Š PageRank Relevance Grades code importance based on cross-file call frequency and import patterns.
πŸ€– Agent Orchestration Auto-provisions AGENTS.md instructions and MCP-First Skill Profile for AI assistants.
πŸ›‘οΈ Path Jail Strictly sandboxed to registered workspace roots β€” protects sensitive environments.
πŸ‘οΈ Real-Time Watcher Debounced filesystem updates with automatic mass-update safeguards.
🧩 Runtime Language Addons Add new Tree-sitter grammars (e.g., Go, Rust) without rebuilding.
🧹 Memory Guard Background process prevents RAM leaks during long indexing runs.
πŸ“ˆ Nebula UI Dashboard Streamlit visualization tool for interactive codebase graph exploration.
πŸŒ‰ Dual Transport Bridge Serve multiple AI clients simultaneously from a single background session.
NakshAstraMCP System Monitoring Analytics Dashboard

Real-time indexing statistics and memory usage tracking.


πŸš€ Quick Start

Step 1 β€” Install uv (Fast Python Package Manager)

# Windows (PowerShell)
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

Step 2 β€” Install the Secure Binary Wheel

πŸ“₯ Download v3.20.0 Secure Wheel from the Releases Page

# Recommended (uv) β€” auto-isolates the tool globally:
uv tool install https://github.com/vijaytank/NakshAstraMCP-Docs/releases/download/v3.20.0/nakshastramcp-3.20.0-cp313-cp313-win_amd64.whl --force

Step 3 β€” Register & Index Your Workspace

# Navigate to your project root, then:
nakshastramcp start --workspace .

Step 4 β€” Verify Health

nakshastramcp doctor   # Runs 13 pre-flight environment diagnostics
nakshastramcp status   # View active workspaces and server state

Next step: Connect NakshAstraMCP to your AI client. See the User Guide β†’ Client Configuration.


πŸ’» System Requirements

Tier Hardware Features Enabled
Minimal 2 CPU Cores / 4 GB RAM Core keyword search, aggressive Memory Guard cleanups
Recommended 4 CPU Cores / 8 GB RAM + Tantivy FTS, CPU FlashRank Semantic Reranking
Optimal 8+ CPU Cores / 16 GB RAM + PageRank graph calculations, deep AST relationship mapping

πŸŒ‰ Multi-Client Bridge

NakshAstraMCP features a Dual Transport Bridge that lets multiple IDEs and AI clients share one background session with zero performance contention.

  • Host Session: Your primary editor (e.g., Antigravity or Cursor) spawns the host via stdio transport.
  • HTTP Bridge: The host automatically exposes a streamable HTTP connection on port 2102.
  • Secondary Clients: Other tools (VS Code extensions, scripts) can connect simultaneously via:
    • URL: http://127.0.0.1:2102/mcp
    • Type: streamable-http

πŸ›‘οΈ Security & Privacy

  • 100% Local Execution: No code, index data, or metadata ever leaves your machine.
  • Secret Detection: Integrated secret scanner blocks API keys and passwords from being indexed.
  • Jailed Paths: Strict sandboxing blocks symbolic link exploits and out-of-workspace traversal.
  • User-Space Only: Runs entirely within user-space β€” no administrator/root privileges required.

About

High-performance, low-latency MCP server for local code context. Features AST-aware symbol graphs, semantic reranking, and PageRank-scored search for AI agents (Claude, Cursor, and more).

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors