Skip to main content
Glama

DevLens MCP

npm version License: MIT MCP Protocol TypeScript

DevLens MCP is a high-performance, security-hardened Model Context Protocol (MCP) server engineered for AI coding agents (Claude, Cursor, Cline, Windsurf). It performs zero-execution, AST-based static analysis, symbol location, dependency tracing, change impact analysis, and risk assessment on TypeScript and JavaScript codebases.


🚀 Key Features & 8 MCP Tools

  1. analyze_project: High-level structural scan, entry points, module systems, and tech stack detection.

  2. find_symbol: Precise location of classes, functions, interfaces, and types across the entire project.

  3. trace_dependencies: Deep dependency tree analysis with import/export resolution and circular dependency detection.

  4. analyze_impact: Calculates the exact blast radius and affected files before modifying a target file.

  5. detect_dead_code: Identifies unreferenced symbols, orphan files, and unreachable exports.

  6. assess_change_risk: Evaluates cyclomatic complexity, blast radius, and test coverage to assign risk scores (LOW/MEDIUM/HIGH/CRITICAL).

  7. get_project_context: Compact, token-optimized codebase summary designed specifically for LLM context windows.

  8. get_project_diagnostics: Aggregates architectural warnings, circular imports, and deep inheritance trees.


Related MCP server: Semantic JS MCP

🔒 Security Architecture

  • Path Traversal Protection: Enforces strict canonical path verification against the designated workspace root; rejects null-bytes, relative symlink escapes, and directory climbing attempts.

  • Credential & Secret Redaction: Automatically suppresses .env*, id_rsa, .pem, and hidden secrets from scanning indices.

  • Zero-Execution Static AST: Uses TypeScript compiler APIs strictly in passive inspection mode—no arbitrary code execution.


📦 Quickstart

Running via npx

npx devlens-mcp /path/to/your/project

Available Tools

8 tools
analyze_impactC

Identify files affected by modifying a target module (blast radius).

Inputs: filePath (required).

analyze_projectA

Map project structure, detect frameworks, package manager, and language distribution.

Inputs: no named parameters.

assess_change_riskB

Assess modification risk (LOW/MEDIUM/HIGH/CRITICAL) using complexity and dependency signals.

Inputs: filePath (required).

detect_dead_codeB

Identify unreferenced exports within the project.

Inputs: no named parameters.

find_symbolC

Locate functions, classes, interfaces, types, and variables across the project.

Inputs: name (required), exactMatch.

get_project_contextC

Return concise, token-optimized project context for AI coding agents.

Inputs: no named parameters.

get_project_diagnosticsB

Report broken imports and circular dependency loops.

Inputs: no named parameters.

trace_dependenciesB

Trace incoming, outgoing, and external dependencies of a file.

Inputs: filePath (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 8 tools

    Disambiguation4/5

    Most tools target clearly distinct analysis concerns (symbol lookup, dependency tracing, dead code, diagnostics). However, analyze_project vs get_project_context overlap in returning project-level information, and analyze_impact vs assess_change_risk are closely related, though their descriptions (blast radius vs risk rating) help differentiate.

    Naming Consistency5/5

    All eight tools follow a consistent snake_case verb_noun pattern (analyze_project, find_symbol, trace_dependencies, detect_dead_code, assess_change_risk, get_project_context, get_project_diagnostics). Verb variation (analyze/find/trace/detect/assess/get) is intentional and readable rather than inconsistent.

    Tool Count5/5

    Eight tools is well within the ideal 3-15 range. Each tool maps to a distinct analysis capability (structure, symbols, dependencies, impact, dead code, risk, context, diagnostics) with no redundant entries.

    Completeness4/5

    The surface covers a broad code-intelligence lifecycle: structure mapping, symbol search, dependency tracing, impact/risk assessment, diagnostics, and context generation. Minor gaps exist, such as a dedicated find-references or file-content retrieval operation, but agents can work around these via existing tools.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Enables AI assistants to understand and navigate codebases through structural analysis. Provides code mapping, symbol search, and impact analysis using ast-grep for accurate parsing of Python, JavaScript, TypeScript, and Go projects.
      4
      52
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to semantically navigate codebases via an AST index, supporting symbol search, usage lookup, module exploration, and dependency analysis.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to navigate and refactor a codebase through an AST index, offering project overviews, symbol and usage search, module dependency exploration, and LSP-backed operations such as rename, go-to-definition, diagnostics, and extract-method. Supports TypeScript/JavaScript and C# with automatic reindexing and watch mode.
      MIT