loading…
Search for a command to run...
loading…
Architectural memory layer for AI coding. Automatically extracts decisions, detects security gaps, and analyzes git history from your codebase in one command.
Architectural memory layer for AI coding. Automatically extracts decisions, detects security gaps, and analyzes git history from your codebase in one command.
Type-Aware Architectural Memory for AI Coding
LORE is a plugin-based code archaeology engine for TypeScript projects. It parses your AST, maps dependencies, detects circular deps, tracks async chains, scores type safety, and feeds architectural intelligence to AI coding assistants through the Model Context Protocol (MCP).
Built by EliotShift · Battle-tested on 16 real-world projects · 100% pass rate.
AI coding assistants write fast, but they lack architectural memory. They can't remember:
LORE solves this by giving your AI assistant a deep understanding of your codebase architecture — through CLI analysis and MCP server integration.
| # | Analyzer | What It Does |
|---|---|---|
| 1 | AST Parser | Full TypeScript/TSX parsing with ts-morph + regex hybrid |
| 2 | Dependency Graph | Maps all imports, exports, re-exports across your project |
| 3 | Circular Dependency Detector | Finds cycles and ranks them by severity |
| 4 | Dependency Direction Checker | Enforces layer rules (e.g., no controller → DB imports) |
| 5 | Shannon Entropy | Complexity scoring per file (simple → very-complex) |
| 6 | Hotspot Analysis | Git-churn detection — files that change too often |
| 7 | Import Impact Analyzer | Shows the blast radius of every import |
| 8 | Type Safety Scorer | Grades your any usage, explicit types, strictness |
| 9 | Hidden Coupling Detector | Finds implicit dependencies through shared types |
| 10 | AI Recommendations | Prioritized fix suggestions (P0–P3) |
| 11 | Tooling Config Checker | Validates ESLint, Prettier, tsconfig settings |
| 12 | Breaking Change Detector | Flags high-risk deprecation patterns |
| 13 | Architectural Gap Finder | Identifies missing abstractions and patterns |
Expose LORE to Claude Desktop, VS Code, Cursor, or any MCP client:
| Tool | Description |
|---|---|
analyze |
Full project analysis — scores, violations, complexity, hotspots |
get-scores |
Health scores: overall, type safety, tooling, architecture |
get-violations |
Circular deps, layer violations, architectural gaps |
get-recommendations |
AI improvement suggestions (P0–P3) |
get-hotspots |
Files with high git churn (red/yellow/green) |
get-entropy |
Shannon entropy complexity report |
query-file |
File imports, exports, consumers, complexity |
analyze_architecture |
Deep TS analysis: framework, layers, async chains, type flow |
| Resource | Description |
|---|---|
lore://analysis |
Latest analysis results (JSON) |
lore://architecture |
Deep architecture graph (JSON) |
lore://config |
Environment and cache status (JSON) |
lore [path] Analyze project (default: cwd)
lore analyze [path] Explicit analysis
lore init Extract architectural decisions
lore status View decisions by category
lore diff Diff against saved baseline
lore doctor Environment + tooling check
lore doctor --fix Auto-fix project setup
lore ignore List/manage ignore patterns
lore watch Watch + re-analyze on change
lore mcp inspect Inspect MCP server setup
lore mcp config Claude Desktop config snippet
lore version Show version
Website: eliotshift.github.io/lore-mcp
| Page | Description |
|---|---|
| Landing Page | Full feature overview, badges, and quick start |
| Installation Guide | npm, npx, and Docker installation |
| Command Reference | All CLI commands: init, status, doctor, watch, diff, etc. |
| MCP Integration | Claude Desktop, Cursor, and Windsurf setup |
| Examples | Real-world analysis of Express, NestJS, Next.js, and more |
| FAQ | Common questions answered |
npm install -g lore-mcp
# Analyze current project
lore
# Analyze a specific project
lore ./my-typescript-project
# Check environment and auto-fix
lore doctor --fix
# Watch for changes
lore watch --filter src/
# Diff from last baseline
lore diff
Add this to your Claude Desktop config:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"lore": {
"command": "npx",
"args": ["-y", "lore-mcp"]
}
}
}
Or if installed globally:
{
"mcpServers": {
"lore": {
"command": "lore",
"args": ["mcp"]
}
}
}
Restart Claude Desktop, then ask:
"Analyze my project architecture" → LORE runs
analyze_architecture"What are the circular dependencies?" → LORE runsget-violations"Which files are hotspots?" → LORE runsget-hotspots"What are the AI recommendations?" → LORE runsget-recommendations
lore-mcp/
├── src/
│ ├── algorithm/ # LoreGraph, AST parser, async chain builder, type tracker
│ ├── algorithms/ # AI recommendations, hotspot analysis, entropy, scoring
│ ├── analyzer/ # Dependency parsers, circular deps, direction, imports
│ ├── commands/ # CLI: doctor, diff, ignore, init, status, watch
│ ├── core/ # Plugin system, pipeline runner, graph engine
│ ├── lib/ # Hidden coupling, gaps, middleware chain, ontology
│ ├── mcp/ # MCP server + architecture bridge
│ ├── output/ # Formatter, markdown, SARIF, logger
│ ├── plugins/built-in/ # 13 built-in analysis plugins
│ ├── storage/ # Cache and decision store
│ ├── types/ # TypeScript type definitions
│ ├── cli.ts # CLI entry point
│ └── index.ts # MCP server entry point
├── package.json
└── tsconfig.json
LORE uses a plugin-based architecture — every analyzer is a plugin:
interface LorePlugin {
name: string;
version: string;
analyze(context: AnalysisContext): Promise<PluginResult>;
}
Built-in plugins include: circular-deps, coupling-matrix, dep-direction, entropy, gaps, hidden-coupling, hotspot, import-impact, middleware-chain, breaking-changes, type-safety, tooling-config, ai-recommendations.
.ts/.tsx files using a hybrid ts-morph + regex parser| Project | Files | Result |
|---|---|---|
| Express | 42 | 100% Pass |
| Next.js | 68 | 100% Pass |
| Fastify | 55 | 100% Pass |
| NestJS | 38 | 100% Pass |
| Prisma | 45 | 100% Pass |
| Zod | 35 | 100% Pass |
| TypeORM | 60 | 100% Pass |
All 16 test projects: 100% pass rate, zero crashes.
.ts and .tsx files)| Component | Technology |
|---|---|
| Language | TypeScript 5.5+ |
| AST Parsing | ts-morph 21 |
| Protocol | Model Context Protocol (MCP) SDK 1.0 |
| Transport | Stdio (Claude Desktop / IDE compatible) |
| Validation | Zod schemas |
| Output | ANSI terminal, Markdown, SARIF |
MIT © 2025 EliotShift
LORE — Because your AI should understand your architecture, not just your code.
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"lore-mcp": {
"command": "npx",
"args": []
}
}
}