sdl-mcp  by GlitterKill

Code context engine for AI agents

Created 2 months ago
284 stars

Top 91.9% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

Provides AI coding agents with precise, token-efficient code context by indexing codebases into a searchable symbol graph. It addresses the problem of AI agents consuming excessive tokens by feeding them entire files, offering a "cards-first" approach that significantly reduces token usage, accelerates workflows, and enhances agent output quality.

How It Works

SDL-MCP indexes code into a graph database using "Symbol Cards," compact metadata records for code entities. Agents query this graph for context, leveraging the "Iris Gate Ladder" – a four-rung escalation path from ~100-token Symbol Cards to full source code. This controlled context retrieval ensures agents receive only necessary information, achieving substantial token savings (4-20x) by avoiding the need to read entire files for most queries.

Quick Start & Requirements

  • Install: npm install -g sdl-mcp (or npx --yes sdl-mcp@latest)
  • Initialize: sdl-mcp init -y --auto-index
  • Serve: sdl-mcp serve --stdio
  • Prerequisites: Node.js 24+, TypeScript 5.9+ (strict ESM). Rust for native indexing (Tree-sitter fallback). LadybugDB embedded graph database.
  • Links: Full Getting Started Guide, Complete MCP Tools Reference

Highlighted Details

  • Iris Gate Ladder: Four-rung context escalation (Symbol Card to Raw Code) achieves 4-20x token savings by avoiding full file reads.
  • Symbol Cards: Compact metadata (~100 tokens) for code entities, including signatures, summaries, dependencies, and confidence-scored call resolution.
  • Graph Slicing: Traverses the dependency graph for cross-cutting context, prioritizing relevant symbols within a token budget.
  • Delta Packs & Blast Radius: Provides semantic diffs and PR risk analysis to identify code impact and affected components.
  • Live Indexing: Real-time updates from editor buffers are parsed and reflected instantly without manual re-indexing.
  • Governance & Policy: Enforces proof-of-need for raw code access and sandboxes runtime execution.
  • Development Memories: Opt-in, graph-backed persistence for agent knowledge across sessions, linked to code symbols.
  • SCIP Integration: Augments Tree-sitter parsing with compiler-grade cross-references for precise symbol resolution and external dependencies.
  • CLI Tool Access: All 32 flat SDL action tools are directly accessible via the sdl-mcp tool command.

Maintenance & Community

No explicit community channels (Discord/Slack) or contributor details are provided in the README. GitHub commit activity is indicated by a badge.

Licensing & Compatibility

This project is source-available under a Community License for free use, including internal business operations. A separate commercial license is required for distribution, bundling, embedding, or selling the software as part of a monetized product. Contact gmullins.gkc@gmail.com for commercial licensing. Compatible with various AI clients (Claude Code, Cursor, Gemini CLI, etc.) via stdio or HTTP.

Limitations & Caveats

Commercial distribution or embedding necessitates obtaining a specific commercial license. Development Memories are an opt-in feature and disabled by default. The README focuses on features, with no explicit mention of known bugs or alpha status.

Health Check
Last Commit

9 hours ago

Responsiveness

Inactive

Pull Requests (30d)
3
Issues (30d)
9
Star History
183 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.