Skip to content

A sophisticated Model Context Protocol (MCP) server for analyzing Architectural Decision Records (ADRs) and providing deep architectural insights to AI agents.

License

Notifications You must be signed in to change notification settings

tosin2013/mcp-adr-analysis-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

MCP ADR Analysis Server

GitHub License NPM Version Node.js TypeScript

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

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


Author: Tosin Akinosho | Repository: GitHub

What is MCP?

The Model Context Protocol enables seamless integration between AI assistants and external tools. This server enhances AI assistants with deep architectural analysis capabilities, enabling intelligent code generation, decision tracking, and development workflow automation.

✨ 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 β†’

πŸ“¦ Quick Installation

# Global installation (recommended)
npm install -g mcp-adr-analysis-server

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

πŸ“– Detailed Installation Guide β†’ | RHEL Setup β†’

⚑ Quick Setup (3 Steps)

  1. Get API Key: OpenRouter.ai/keys
  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"
      }
    }
  }
}

πŸ“– Full Configuration Guide β†’ | Client Setup β†’

πŸš€ Usage Examples

Ask Claude (or any MCP client):

"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!

// 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 β†’

🎯 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-glob β€’ AI Integration: OpenRouter.ai β€’ Web Research: Firecrawl β€’ Code Analysis: Smart Code Linking

πŸ“– Technical Details β†’

πŸ“ Project Structure

src/tools/     # 23 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)

Enhanced web research capabilities for comprehensive architectural analysis.

# 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)

Benefits: Real-time research β€’ Enhanced ADRs β€’ Best practices discovery β€’ Intelligent web scraping

πŸ“– Firecrawl Setup 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

πŸ“– 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 β†’

🀝 Contributing

We welcome contributions! Fork β†’ Create branch β†’ Add tests β†’ Submit PR

Standards: TypeScript strict β€’ >80% coverage β€’ ESLint β€’ Security validation β€’ MCP compliance

πŸ“– Contributing Guide β†’

πŸ”— 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.

About

A sophisticated Model Context Protocol (MCP) server for analyzing Architectural Decision Records (ADRs) and providing deep architectural insights to AI agents.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 6