tosin2013/mcp-adr-analysis-server

๐Ÿ’ป Developer Tools
0 Views
0 Installs

๐Ÿ“‡ โ˜๏ธ ๐Ÿ  - AI-powered architectural analysis server for software projects. Provides technology stack detection, ADR management, security checks, enhanced TDD workflow, and deployment readiness validation with support for multiple AI models.

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "tosin2013-mcp-adr-analysis-server": {
      "command": "npx",
      "args": [
        "-y",
        "tosin2013-mcp-adr-analysis-server"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

MCP (Model Context Protocol) ADR (Architectural Decision Record) Analysis Server

GitHub License NPM Version Node.js TypeScript Good First Issues

AI-powered architectural analysis for intelligent development workflows. Returns actual analysis results, not prompts to submit elsewhere.

What is MCP?

The Model Context Protocol (MCP) is an open standard that enables seamless integration between AI assistants and external tools and data sources. Think of it as a universal adapter that lets AI assistants like Claude, Cline, and Cursor connect to specialized analysis servers. This server enhances AI assistants with deep architectural analysis capabilities, enabling intelligent code generation, decision tracking, and development workflow automation.

TL;DR

What: MCP server that provides AI-powered architectural decision analysis and ADR management
Who: AI coding assistants (Claude, Cline, Cursor), enterprise architects, development teams
Why: Get immediate architectural insights instead of prompts, with 95% confidence scoring
How: npm install -g mcp-adr-analysis-server โ†’ Configure with OpenRouter API โ†’ Start analyzing

Key Features: Tree-sitter AST analysis โ€ข Security content masking โ€ข Test-driven development โ€ข Deployment readiness validation

Key Terms
TermDefinition
ADRArchitectural Decision Record โ€” A document that captures an important architectural decision along with its context, alternatives considered, and consequences.
MCPModel Context Protocol โ€” An open standard enabling AI assistants to connect to external tools and data sources.
Tree-sitterAn incremental parsing library that provides AST (Abstract Syntax Tree) analysis for 50+ languages. Used for semantic code understanding, extracting function signatures, and identifying architectural patterns.
Knowledge GraphA graph database maintained by the server that tracks relationships between ADRs, code implementations, and architectural decisions. Enables intelligent code linking and impact analysis.
Smart Code LinkingAI-powered discovery of code files related to ADRs and architectural decisions, using keyword extraction and semantic search.
FirecrawlWeb page extraction/search service used by optional research tools (FIRECRAWL_API_KEY).
ADR AggregatorOptional SaaS integration for syncing and sharing ADR context across teams (ADR_AGGREGATOR_API_KEY).

Author: Tosin Akinosho | Repository: GitHub

โœจ Core Capabilities

๐Ÿค– AI-Powered Analysis - Immediate architectural insights with OpenRouter.ai integration ๐Ÿ—๏ธ Technology Detection - Identify any tech stack and architectural patterns ๐Ÿ“‹ ADR Management - Generate, suggest, and maintain Architectural Decision Records ๐Ÿ”— Smart Code Linking - AI-powered discovery of code files related to ADRs and decisions ๐Ÿ›ก๏ธ Security & Compliance - Detect and mask sensitive content automatically ๐Ÿงช TDD Integration - Two-phase Test-Driven Development with validation ๐Ÿš€ Deployment Readiness - Zero-tolerance test validation with hard blocking

๐Ÿ“– View Full Capabilities โ†’ ยท ๐Ÿ“œ Release policy โ†’ ยท ๐Ÿ—’๏ธ Changelog โ†’

Prerequisites

Before installing, verify you have:

node --version  # Should show v20.0.0 or higher
npm --version   # Should show 9.0.0 or higher (included with Node.js 20+)

Required:

Network Requirements

  • Internet access required during npm install for native module compilation (tree-sitter incremental code parsers for YAML and TypeScript)
  • If behind a corporate proxy, set HTTP_PROXY and HTTPS_PROXY environment variables
  • Offline fallback: If native builds fail, the server operates in reduced mode without tree-sitter code analysis

๐Ÿ“ฆ Quick Installation

# Option 1: Global installation (recommended for frequent use)
npm install -g mcp-adr-analysis-server

# Option 2: Use npx (no installation required)
npx mcp-adr-analysis-server

# Option 3: From source (for development or customization)
git clone https://github.com/tosin2013/mcp-adr-analysis-server.git
cd mcp-adr-analysis-server && npm install && npm run build

# Option 4: RHEL 9/10 systems (special installer)
curl -sSL https://raw.githubusercontent.com/tosin2013/mcp-adr-analysis-server/main/scripts/install-rhel.sh | bash

Note: When installing from source, npm run build is required before running the server since the bin entry points to ./dist/src/index.js.

๐Ÿ“– Detailed Installation Guide โ†’ | RHEL Setup โ†’

โšก Quick Setup (3 Steps)

  1. Get API Key: Sign up at OpenRouter.ai/keys โ€” OpenRouter is an API gateway that provides access to multiple AI models (Claude, GPT, etc.) through a single key. No API key? The server still works in prompt-only mode โ€” see Execution Modes below.
  2. Set Environment: OPENROUTER_API_KEY=your_key + EXECUTION_MODE=full
  3. Configure Client: Add to Claude Desktop, Cline, Cursor, or Windsurf
{
  "mcpServers": {
    "adr-analysis": {
      "command": "mcp-adr-analysis-server",
      "env": {
        "PROJECT_PATH": "/path/to/your/project",
        "OPENROUTER_API_KEY": "your_key_here",
        "EXECUTION_MODE": "full"
      }
    }
  }
}

Claude Desktop users: Save this JSON to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows).

Config locations for other clients
ClientConfig file location
Claude Desktop (macOS)~/Library/Application Support/Claude/claude_desktop_config.json
Claude Desktop (Windows)%APPDATA%\Claude\claude_desktop_config.json
Cline (VS Code)VS Code Settings โ†’ Cline โ†’ MCP Servers (or .vscode/cline_mcp_settings.json)
CursorCursor Settings โ†’ MCP โ†’ Add Server
With ADR Aggregator (Optional)
{
  "mcpServers": {
    "adr-analysis": {
      "command": "mcp-adr-analysis-server",
      "env": {
        "PROJECT_PATH": "/path/to/your/project",
        "OPENROUTER_API_KEY": "your_key_here",
        "EXECUTION_MODE": "full",
        "ADR_AGGREGATOR_API_KEY": "agg_your_key_here"
      }
    }
  }
}

Get your API key at adraggregator.com

๐Ÿ“– Full Configuration Guide โ†’ | Client Setup โ†’

Execution Modes

Full ModePrompt-Only Mode
Requires API key?Yes (OPENROUTER_API_KEY)No
ReturnsActual analysis results with confidence scoresPrompts you can paste into any AI chat
Set viaEXECUTION_MODE=fullEXECUTION_MODE=prompt-only (default)
Best forProduction use, automationTrying it out, no-cost exploration
Available FeaturesAll 73 tools, AI analysis, confidence scoring, Smart Code Linking, Knowledge GraphAnalysis prompts, templates, local file operations, ADR discovery
Unavailable Featuresโ€”AI execution, confidence scores, Smart Code Linking, web research

Tip: Start with prompt-only mode to explore the tool catalog โ€” you can analyze projects, discover ADRs, and generate templates without an API key. Add an API key when you're ready for AI-powered analysis with confidence scoring.

๐Ÿš€ Usage Examples

Just ask your MCP client in natural language โ€” no code required:

"Analyze this React project's architecture and suggest ADRs for any implicit decisions"

"Generate ADRs from the PRD.md file and create a todo.md with implementation tasks"

"Check this codebase for security issues and provide masking recommendations"

The server returns actual analysis results instead of prompts to submit elsewhere!

Programmatic Usage (Advanced)

If you're integrating the server into your own tooling via the MCP SDK:

// Basic project analysis
const analysis = await analyzeProjectEcosystem({
  projectPath: '/path/to/project',
  analysisType: 'comprehensive',
});

// Generate ADRs from requirements
const adrs = await generateAdrsFromPrd({
  prdPath: 'docs/PRD.md',
  outputDirectory: 'docs/adrs',
});

// Smart Code Linking - Find code related to ADR decisions
const relatedCode = await findRelatedCode(
  'docs/adrs/001-auth-system.md',
  'We will implement JWT authentication with Express middleware',
  '/path/to/project',
  {
    useAI: true, // AI-powered keyword extraction
    useRipgrep: true, // Fast text search
    maxFiles: 10, // Limit results
    includeContent: true, // Include file contents
  }
);

๐Ÿ“– Complete Usage Guide โ†’ | API Reference โ†’

Try it out: This repo includes a sample-project/ directory with example ADRs and source code. Point PROJECT_PATH at it to experiment without affecting your own codebase.

Note: The sample project is only available when cloning from source (Option 3 above). If you installed via npm (Option 1 or 2), create your own test project or clone the repo separately to access the sample: git clone --depth 1 https://github.com/tosin2013/mcp-adr-analysis-server.git sample-test

๐ŸŽฏ Use Cases

๐Ÿ‘จโ€๐Ÿ’ป AI Coding Assistants - Enhance Claude, Cline, Cursor with architectural intelligence
๐Ÿ’ฌ Conversational AI - Answer architecture questions with confidence scoring
๐Ÿค– Autonomous Agents - Continuous analysis and rule enforcement
๐Ÿข Enterprise Teams - Portfolio analysis and migration planning

๐Ÿ“– Detailed Use Cases โ†’

๐Ÿ› ๏ธ Technology Stack

Runtime: Node.js 20+ โ€ข Language: TypeScript โ€ข Framework: MCP SDK โ€ข Testing: Jest (>80% coverage) Search: ripgrep (fast recursive text search) + fast-glob (file matching) โ€ข AI Integration: OpenRouter.ai โ€ข Web Research: Firecrawl (web page extraction API) โ€ข Code Analysis: tree-sitter (incremental code parser) + Smart Code Linking

๐Ÿ“– Technical Details โ†’ | CE-MCP Migration Playbook โ†’

๐Ÿ“ Project Structure

src/tools/     # 73 MCP tools for analysis
docs/adrs/     # Architectural Decision Records
tests/         # >80% test coverage
.github/       # CI/CD automation

๐Ÿ“– Full Structure โ†’

๐Ÿงช Testing

npm test              # Run all tests (>80% coverage)
npm run test:coverage # Coverage report

๐Ÿ“– Testing Guide โ†’

๐Ÿ”ฅ Firecrawl Integration (Optional โ€” Skip for Getting Started)

Enhanced web research capabilities for comprehensive architectural analysis.

Note: You don't need Firecrawl for basic ADR analysis. The server works fully without it. Only configure Firecrawl if you need web research features like the perform_research tool with external sources.

When is Firecrawl useful?
  • ADR research โ€” automatically pull best practices from official docs when generating ADRs
  • Technology evaluation โ€” compare frameworks by crawling their documentation and changelogs
  • Security audits โ€” check CVE databases and security advisories for your dependencies
  • Migration planning โ€” gather migration guides and breaking-change notes from upstream projects
# Option 1: Cloud service (recommended)
export FIRECRAWL_ENABLED="true"
export FIRECRAWL_API_KEY="fc-your-api-key-here"

# Option 2: Self-hosted
export FIRECRAWL_ENABLED="true"
export FIRECRAWL_BASE_URL="http://localhost:3000"

# Option 3: Disabled (default - server works without web search)

๐Ÿ“– Firecrawl Setup Guide โ†’

๐ŸŒ ADR Aggregator Integration (Optional)

ADR Aggregator is a platform for cross-team ADR visibility and governance. It provides:

  • Cross-repository knowledge graphs โ€” See how architectural decisions relate across projects
  • Governance dashboards โ€” Track ADR compliance, staleness, and review cycles
  • Template library โ€” Access domain-specific ADR templates (security, API, database, etc.)
  • Team collaboration โ€” Share architectural decisions organization-wide

Note: ADR Aggregator is optional. All core analysis features work without it.

# Set your API key (get one at adraggregator.com)
export ADR_AGGREGATOR_API_KEY="agg_your_key_here"

Available Tools

ToolDescriptionFreePro+Team
sync_to_aggregatorPush local ADRs to platformโœ…โœ…โœ…
get_adr_contextPull ADR context from platformโœ…โœ…โœ…
get_staleness_reportGet ADR governance/health reportsโœ…โœ…โœ…
get_adr_templatesRetrieve domain-specific templatesโœ…โœ…โœ…
get_adr_diagramsGet Mermaid diagrams for ADRsโ€”โœ…โœ…
validate_adr_complianceValidate ADR implementationโ€”โœ…โœ…
get_knowledge_graphCross-repository knowledge graphโ€”โ€”โœ…

Workflow for New Repos

# 1. Analyze codebase for implicit architectural decisions
suggest_adrs(analysisType: 'implicit_decisions')

# 2. Generate ADR files from suggestions
generate_adr_from_decision(decisionData)

# 3. Save ADRs to docs/adrs/

# 4. (Optional) Sync to adraggregator.com
sync_to_aggregator(full_sync: true)

Benefits: Cross-team visibility โ€ข Staleness alerts โ€ข Compliance tracking โ€ข Organization-wide knowledge graph

๐Ÿ“– ADR Aggregator Guide โ†’ | ๐Ÿ“– MCP Integration Guide โ†’

๐Ÿ”ง Development

git clone https://github.com/tosin2013/mcp-adr-analysis-server.git
cd mcp-adr-analysis-server
npm install && npm run build && npm test

Quality Standards: TypeScript strict mode โ€ข ESLint โ€ข >80% test coverage โ€ข Pre-commit hooks

Viewing Documentation Locally

API documentation is generated with TypeDoc:

npm install          # Required once after cloning (installs typedoc)
npm run docs:build   # Generate API docs into docs/api/
npm run docs:serve   # Serve locally via Python HTTP server

Then open http://localhost:8080 in your browser. Markdown documentation lives in docs/ and can be browsed directly on GitHub.

๐Ÿ“– Development Guide โ†’ | Contributing โ†’

๐Ÿ”ง Troubleshooting

Common Issues:

  • RHEL Systems: Use special installer script
  • Tools return prompts: Set EXECUTION_MODE=full + API key
  • Module not found: Run npm install && npm run build
  • Permission denied: Check file permissions and project path

๐Ÿ“– Complete Troubleshooting Guide โ†’

๐Ÿ”’ Security & Performance

Security: Automatic secret detection โ€ข Content masking โ€ข Local processing โ€ข Zero trust
Performance: Multi-level caching โ€ข Incremental analysis โ€ข Parallel processing โ€ข Memory optimization

๐Ÿ“– Security Guide โ†’ | Performance โ†’

๐Ÿ” Security Vulnerability Reporting

Found a security issue? Please read our Security Policy for responsible disclosure procedures. Do not create public issues for security vulnerabilities.

๐Ÿค Contributing

We welcome contributions! Whether you're fixing bugs, adding features, or improving documentation, your help is appreciated.

๐ŸŒŸ Quick Start for Contributors

  1. Fork the repository
  2. Clone your fork: git clone https://github.com/YOUR_USERNAME/mcp-adr-analysis-server.git
  3. Create a branch: git checkout -b feature/your-feature-name
  4. Make your changes with tests
  5. Test: npm test (maintain >80% coverage)
  6. Submit a Pull Request

๐Ÿ‘ถ First Time Contributing?

Looking for a good first issue? Check out our good first issues - these are beginner-friendly tasks perfect for getting started!

New to open source? Our Contributing Guide walks you through the entire process step-by-step.

๐Ÿ“ Reporting Issues

Use our issue templates when reporting bugs or requesting features. Templates help us understand and resolve issues faster.

Standards: TypeScript strict โ€ข >80% coverage โ€ข ESLint โ€ข Security validation โ€ข MCP compliance

๐Ÿ“– Full Contributing Guide โ†’ | Code of Conduct โ†’

๐Ÿ”— Resources

Official: MCP Specification โ€ข MCP SDK
Community: MCP Registry โ€ข Discord
Project: ADRs โ€ข Progress โ€ข Publishing Guide

๐Ÿ“„ License

MIT License - see LICENSE file for details.

๐Ÿ™ Acknowledgments

  • Anthropic for creating the Model Context Protocol
  • The MCP Community for inspiration and best practices
  • Contributors who help make this project better

Built with โค๏ธ by Tosin Akinosho for AI-driven architectural analysis

Empowering AI assistants with deep architectural intelligence and decision-making capabilities.

Related MCP Servers

Moxie-Docs-MCPโ˜… Featured

MCP & Agent Skills for Automated Documentation, and codebase conventions + context

๐Ÿ’ป Developer Tools2 views
3KniGHtcZ/codebeamer-mcp

๐Ÿ“‡ โ˜๏ธ ๐ŸŽ ๐ŸชŸ ๐Ÿง - Codebeamer ALM integration for managing work items, trackers, and projects. Provides 17 tools for reading and writing items, associations, references, comments, and risk management data via Codebeamer REST API v3.

๐Ÿ’ป Developer Tools1 views
21st-dev/Magic-MCP

Create crafted UI components inspired by the best 21st.dev design engineers.

๐Ÿ’ป Developer Tools0 views
a-25/ios-mcp-code-quality-server

๐Ÿ“‡ ๐Ÿ  ๐ŸŽ - iOS code quality analysis and test automation server. Provides comprehensive Xcode test execution, SwiftLint integration, and detailed failure analysis. Operates in both CLI and MCP server modes for direct developer usage and AI assistant integration.

๐Ÿ’ป Developer Tools0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Not checked yet

We have not completed a health check for this listing yet.

No check timestamp yet.

Unclaimed listing (imported or pending owner verification). Claim it โ†’
โ˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.