System Design
How Devscriptor Works
High-performance code analysis platform built in Rust with 36 language parsers, 70 MCP tools, and 4-tier LSP detection.
System at a Glance
A modular architecture built for performance, extensibility, and universal language support.
High-performance implementation with memory safety and zero-cost abstractions
Programming language parsers via individual tree-sitter-* crates
MCP Tools total: 27 Core + 38 LSP + 5 Architecture
LSP Detection system with automatic language server discovery
Module Architecture
Four primary crates organized by responsibility. Each module can be used independently or together.
Core Module
The heart of Devscriptor. Handles parsing, analysis, storage, and embeddings.
Individual parser per language for universal code analysis
ripgrep's engine for bulletproof file filtering
Intelligent file prioritization for optimal processing
Single-file database with HNSW vector indexing
Dead code, complexity, clones, smells detection
Local semantic search without API keys
LSP Module
Language Server Protocol integration with 4-tier auto-detection.
Project files → LSP configs → CLI tools → Manual fallback
Start, stop, and monitor language servers
38 LSP tools exposed via MCP protocol
Pre-configured language server definitions
MCP Module
Model Context Protocol server implementation with 70 total tools.
Scan, search, analyze, context management
Navigation, completion, diagnostics, refactoring
System info, configuration, health checks
Both JSON-RPC and rmcp 0.5 SDK support
CLI Module
Command-line interface for direct codebase interaction.
Scan directories and build the database
Execute analyzers and generate reports
Start servers, check status, run diagnostics
How Data Flows
Understanding the journey from source code to AI-accessible knowledge.
Codebase Scanning Flow
Directory Discovery
CLI receives path, validates existence
Gitignore Filtering
ignore crate filters files using ripgrep engine
Priority Sorting
Files sorted: entry points → core → source → tests
Tree-sitter Parsing
36 parsers extract AST for each language
Entity Extraction
Functions, classes, variables identified
Relationship Mapping
Calls, imports, inheritance detected
SQLite Storage
Code graph persisted to single database file
Vector Embeddings
Jina embeddings generated for semantic search
Technology Stack
Carefully chosen technologies for performance, reliability, and maintainability.
Parsing
- Individual tree-sitter-* crates
- 36 language parsers
- Tree-sitter 0.25
Database
- SQLite
- sqlite-vec (vectors)
- HNSW indexing
Embeddings
- jinaai/jina-embeddings-v2-base-code
- Local inference
- No API keys required
Async Runtime
- tokio
- rayon
- True parallelism
MCP Protocol
- rmcp 0.5
- JSON-RPC legacy
- Dual SDK support
LSP Protocol
- lsp-types 0.97
- 36 language servers
- 4-Tier detection
Crate Structure
Visual representation of how the crates interact and depend on each other.
Claude Desktop, Cline, Continue, etc.
MCP Server · 70 Tools · rmcp 0.5 SDK
Parsing · Analysis · Storage
LSP Client · 36 Languages
Commands · Interface