SkillAgentSearch skills...

LxDIG MCP

Dynamic Intelligence Graph (DIG) MCP server for AI coding agents. Persistent code knowledge graph, a code RAG improvement, with hybrid Graph + Vector + BM25 retrieval, agent memory, multi-agent coordination, and impact-scoped test selection. Works with Claude Code, VS Code Copilot, and Cursor.

Install / Use

/learn @lexCoder2/LxDIG MCP

README

<div align="center"> <img src="docs/brain-logo.svg" alt="lxDIG MCP — MCP server for code graph intelligence, persistent agent memory, and multi-agent coordination" width="180" /> <h1>lxDIG MCP — Code Graph Intelligence & Persistent Agent Memory for AI Coding Assistants</h1> <em>Stop RAGing, start DIGging.</em> <br/><br/> <p><strong>Dynamic Intelligence Graph · Agent Memory · Multi-Agent Coordination</strong></p> <p>An open-source <a href="https://modelcontextprotocol.io">Model Context Protocol (MCP)</a> server that gives AI coding assistants<br/>persistent memory, structural code graph analysis, and safe multi-agent coordination — beyond static RAG and GraphRAG.</p> </div> <div align="center">

MCP npm Node.js TypeScript Memgraph Qdrant License: MIT Tests Transport Status

</div>

Works with: VS Code Copilot · Claude Code · Claude Desktop · Cursor · any MCP-compatible AI assistant

Supported languages: TypeScript · JavaScript · TSX/JSX · Python · Go · Rust · Java Databases: Memgraph (graph) · Qdrant (vector) Transports: stdio (local) · HTTP (remote/fleet)


What is lxDIG MCP?

An open-source Model Context Protocol (MCP) server that adds a persistent code intelligence layer to AI coding assistants — Claude Code, VS Code Copilot, Cursor, and Claude Desktop. Unlike static RAG or batch-oriented GraphRAG, lxDIG MCP is a live, incrementally-updated intelligence graph that turns any repository into a queryable knowledge graph — so agents can answer architectural questions, track decisions across sessions, coordinate safely in multi-agent workflows, and run only the tests that actually changed — without re-reading the entire codebase on every turn.

It is purpose-built for the agentic coding loop: the cycle of understand → plan → implement → verify → remember that AI agents (Claude, Copilot, Cursor) repeat continuously.

The core problem it solves: most AI coding assistants are stateless and architecturally blind. They re-read unchanged files on every session, miss cross-file relationships, forget past decisions, and collide when multiple agents work in parallel. lxDIG MCP is the memory and structure layer that fixes all four.


Table of Contents


Why Use a Code Graph MCP Server? Problems lxDIG Solves

Most code intelligence tools solve one of these problems. lxDIG solves all of them together:

| Problem | Without lxDIG | With lxDIG | | ----------------------------------- | ------------------------------------------------- | ---------------------------------------------------------- | | Context loss between sessions | Agent re-reads everything on restart | Persistent episode + decision memory survives restarts | | Architecturally blind retrieval | Embeddings miss cross-file relationships | Graph traversal finds structural dependencies | | Probabilistic search misses | Semantic search returns nearest chunks, not facts | Hybrid graph + vector + BM25 fused with RRF | | Multi-agent collisions | Two agents edit the same file simultaneously | Claims/release protocol with conflict detection | | Wasted CI time | Full test suite on every change | Impact-scoped test selection — only affected tests run | | Stale architecture knowledge | Agent guesses at layer boundaries | Graph-validated architecture rules + placement suggestions | | Queries eat context budget | Raw file dumps, hundreds of tokens per answer | Cross-file answers in compact, budget-aware responses |


Key Capabilities: Code Graph, Agent Memory & Multi-Agent Coordination

1. Code graph intelligence

Turn your repository into a queryable property graph of files, functions, classes, imports, and their relationships. Ask questions in plain English or Cypher.

  • Natural-language + Cypher graph queries (graph_query)
  • Symbol-level explanation with full dependency context (code_explain)
  • Pattern detection and architecture rule validation (find_pattern, arch_validate)
  • Architecture placement suggestions for new code (arch_suggest)
  • Semantic code slicing — targeted line ranges from a natural query (semantic_slice)
  • Find duplicate or similar code across the codebase (find_similar_code, code_clusters)

2. Persistent agent memory

Your agent remembers what it decided, what it changed, what broke, and what it observed — even after a VS Code restart or a Claude Desktop session ends.

  • Episode memory: observations, decisions, edits, test results, errors, learnings (episode_add, episode_recall)
  • Decision log with semantic query (decision_query)
  • Reflection synthesis from recent episodes (reflect)
  • Temporal graph model: query any past code state with asOf, compare drift with diff_since

3. Multi-agent coordination

Run multiple AI agents in parallel on the same repository without conflicts.

  • Claim/release protocol for file, function, or task ownership (agent_claim, agent_release)
  • Fleet-wide coordination view — see what every agent is doing (coordination_overview, agent_status)
  • Context packs that assemble high-signal task briefings under strict token budgets (context_pack)
  • Blocker detection across agents and tasks (blocking_issues)

4. Test and change intelligence

Stop running your full test suite on every change. Know exactly what's affected.

  • Change impact analysis — blast radius of modified files (impact_analyze)
  • Selective test execution — only the tests that can fail (test_select, test_run)
  • Test categorization for parallelization and prioritization (test_categorize, suggest_tests)

5. Documentation as a first-class knowledge source

Your READMEs, ADRs, and changelogs become searchable graph nodes, linked to the code they describe.

  • Index all markdown docs in one call (index_docs)
  • Full-text BM25 search across headings and content (search_docs?query=...)
  • Symbol-linked lookup — every doc that references a class or function (search_docs?symbol=MyClass)
  • Incremental re-index: only changed files are re-parsed

6. Architecture governance

Enforce architectural boundaries automatically and get placement guidance for new code.

  • Layer/boundary rule validation (arch_validate)
  • Graph-topology-aware placement suggestions (arch_suggest)
  • Circular dependency and unused-code detection (find_pattern)

7. One-shot project setup

Go from a fresh clone to a fully wired AI assistant in one tool call.

  • init_project_setup — sets workspace, rebuilds graph, generates Copilot instructions
  • setup_copilot_instructions — generates .github/copilot-instructions.md from your repo's topology
  • Works with VS Code Copilot, Claude Code, Claude Desktop, and any MCP-compatible client

How lxDIG MCP Works: Graph + Vector + BM25 Hybrid Retrieval

lxDIG runs as an MCP server over stdio or HTTP and coordinates three data planes behind a single tool interface:

┌─────────────────────────────────────────────────────────────┐
│                     MCP Tool Surface (39 tools)              │
│  stdio transport (local)  │  HTTP transport (remote/fleet)   │
└──────────────┬────────────┴────────────────┬────────────────┘
               │                             │
   ┌───────────▼────────────┐   ┌────────────▼────────────┐
   │   Graph Plane          │   │   Vector Plane           │
   │   Memgraph (Bolt)      │   │   Qdrant                 │
   │   ─────────────────    │   │   ─────────────────────  │
   │   FILE · FUNC · CLASS  │   │   Semantic embeddings    │
   │   IMPORT · CALL edges  │   │   Nearest-neighbor search│
   │   Temporal tx history  │   │   Natural-language code  │
   └────────────────────────┘   └─────────────────────────┘
               │
   ┌───────────▼────────────────────────────────────────────┐
   │   Hybrid Retrieval (RRF fusion)                         │
   │   Graph expansion + Vector similarity + BM25 lexical   │
   └────────────────────────────────────────────────────────┘

When you call graph_query in natural language mode, retrieval runs as

View on GitHub
GitHub Stars3
CategoryDevelopment
Updated7d ago
Forks0

Languages

TypeScript

Security Score

75/100

Audited on Mar 14, 2026

No findings