Skip to main content
Glama

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.


Why LORE?

AI coding assistants write fast, but they lack architectural memory. They can't remember:

  • Which files are tightly coupled

  • Where circular dependencies live

  • Which types are spreading across boundaries

  • Which files change too often (hotspots)

  • What the architectural layers are

LORE solves this by giving your AI assistant a deep understanding of your codebase architecture — through CLI analysis and MCP server integration.


Related MCP server: Continuum

Features

13 Analyzers

#

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

MCP Integration (8 Tools + 3 Resources)

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)

CLI Commands

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

Documentation

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


Quick Start

Install

npm install -g lore-mcp

CLI Usage

# 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

MCP Integration (Claude Desktop)

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 runs get-violations "Which files are hotspots?" → LORE runs get-hotspots "What are the AI recommendations?" → LORE runs get-recommendations


Architecture

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

Plugin System

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.


How It Works

  1. Parse — LORE parses all .ts/.tsx files using a hybrid ts-morph + regex parser

  2. Build Graph — Constructs a dependency graph with typed edges (import, type-ref, decorator, async-chain, implements, extends)

  3. Run Plugins — 13 analyzers run in parallel through the plugin pipeline

  4. Score — Computes health scores (type safety, tooling, architecture, overall 0–100)

  5. Recommend — AI engine generates prioritized suggestions (P0 critical → P3 nice-to-have)

  6. Serve — Results available via CLI output, MCP tools, or SARIF format


Validation

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.


Requirements

  • Node.js >= 18.0.0

  • TypeScript project (analyzes .ts and .tsx files)

  • Git (optional, for hotspot analysis)

  • ripgrep (optional, for faster file discovery)


Tech Stack

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


License

MIT &copy; 2025 EliotShift


Available Tools

3 tools
get_contextA

Get all architectural decisions for this project. Call this at the START of every session to understand the codebase.

ParametersJSON Schema
NameRequiredDescriptionDefault
categoryNoFilter by category (optional)
queryNoSearch for specific decisions (optional)

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the tool retrieves decisions but doesn't describe key behaviors: whether it returns all decisions at once or paginates, what format the output is in, if there are rate limits, or authentication requirements. The instruction to call at session start implies it's foundational but lacks operational details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is highly concise and front-loaded: two sentences with zero waste. The first sentence states the purpose, and the second provides usage guidance, both earning their place without redundancy or fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is incomplete for a tool that likely returns complex data (architectural decisions). It covers purpose and high-level usage but lacks details on output format, error handling, or behavioral constraints. For a retrieval tool with 2 parameters and no structured output info, this is minimally adequate but has clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both optional parameters ('category' and 'query') with descriptions. The description doesn't add any meaning beyond what the schema provides—it doesn't explain how filtering or searching works, example categories, or query syntax. Baseline 3 is appropriate when the schema handles parameter documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get all architectural decisions for this project.' It specifies the resource (architectural decisions) and scope (this project). However, it doesn't explicitly differentiate from sibling tools like 'get_gaps' or 'record_decision' beyond implying this is for retrieval rather than recording.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage guidance: 'Call this at the START of every session to understand the codebase.' This gives clear context for when to use it (session initialization). However, it doesn't specify when NOT to use it or mention alternatives like the sibling tools, leaving some gaps in comparative guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_gapsB

Find architectural gaps — decisions that were made but may not be fully implemented.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions 'Find architectural gaps' but does not disclose behavioral traits such as what data sources are used, whether it's a read-only operation, potential side effects, or output format. This leaves significant gaps in understanding how the tool behaves.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and wastes no space, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of finding architectural gaps, no annotations, and no output schema, the description is incomplete. It lacks details on how gaps are identified, what the output includes, or any behavioral context, making it insufficient for an agent to fully understand the tool's operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the schema fully documents the lack of inputs. The description does not add parameter details, but this is acceptable as there are no parameters to explain, maintaining clarity without redundancy.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Find') and resource ('architectural gaps'), explaining these as 'decisions that were made but may not be fully implemented.' It distinguishes from siblings like 'get_context' and 'record_decision' by focusing on gap identification rather than context retrieval or decision recording.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance is provided on when to use this tool versus alternatives. The description implies usage for finding architectural gaps but does not specify prerequisites, exclusions, or comparisons to sibling tools, leaving the agent to infer context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

record_decisionA

Record an architectural decision. Call this whenever you make a technical choice that affects the codebase structure.

ParametersJSON Schema
NameRequiredDescriptionDefault
categoryYesCategory: database, authentication, architecture, api, testing, deployment, security, performance, other
decisionYesShort description of the decision made
reasonYesWhy this decision was made
alternativesNoAlternatives that were considered and rejected
constraintsNoConstraints or rules that should not be violated
authorNoWho made this decision

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states the action ('record') but doesn't disclose behavioral traits like how the decision is stored, if it's immutable, requires permissions, or has side effects. This is a significant gap for a tool with mutation implications.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the purpose and usage without any wasted words. It's appropriately sized for the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description adequately covers purpose and usage but lacks details on behavior, return values, or error handling. For a mutation tool with 6 parameters, it's minimally viable but has clear gaps in completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all parameters. The description adds no additional meaning beyond implying the tool is for recording decisions, which aligns with the schema but doesn't enhance parameter understanding. Baseline 3 is appropriate as the schema handles the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('record') and resource ('architectural decision'), specifying it's for technical choices affecting codebase structure. It distinguishes from siblings like 'get_context' and 'get_gaps' by focusing on recording rather than retrieving, but doesn't explicitly differentiate beyond that.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides clear context on when to use ('whenever you make a technical choice that affects the codebase structure'), which implicitly distinguishes it from sibling tools that likely retrieve information. However, it lacks explicit exclusions or named alternatives for similar recording tasks.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 3 tool updatesv0.1.5
    • First observedget_context
    • First observedget_gaps
    • First observedrecord_decision

TDQS

A3.7/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: get_context retrieves existing decisions, get_gaps identifies implementation issues, and record_decision logs new choices. There is no overlap in functionality, making tool selection straightforward for an agent.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern (get_context, get_gaps, record_decision) with clear, descriptive names. The naming style is uniform and predictable throughout the set.

Tool Count4/5

Three tools are appropriate for the server's purpose of managing architectural decisions, covering retrieval, gap analysis, and recording. While slightly minimal, each tool serves a distinct and necessary function without redundancy.

Completeness4/5

The tool set covers the core lifecycle of architectural decisions: retrieving context, identifying gaps, and recording new decisions. A minor gap exists in updating or deleting decisions, but agents can likely work around this for basic workflows.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides persistent memory for AI coding assistants, storing and retrieving architectural decisions, patterns, and solutions across sessions using semantic search, while also offering git integration for commit messages and code expertise mapping.
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Automatically extracts architectural decisions, patterns, and insights from Git commits to build a local, structured project memory. It exposes this living context to AI tools via MCP, allowing them to understand the historical reasoning and evolution behind your codebase.
    11
    7
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Local-first memory layer for AI coding agents — captures issues, attempts, fixes, and decisions, and warns at git commit before you repeat a mistake.
    15
    794
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides AI coding assistants with persistent, context-rich memory of a codebase, including documentation and git history, enabling recall across sessions.
    104
    Apache 2.0

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/EliotShift/lore-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server