This MCP server provides AI-powered architectural analysis and automated development workflows for comprehensive project management.
Core Capabilities: • Architectural Analysis - Perform recursive project ecosystem analysis, technology stack detection, and generate architectural insights using OpenRouter.ai integration • ADR Management - Generate, suggest, discover, and manage Architectural Decision Records from PRDs, code changes, or project context • Enhanced TDD Workflows - Create two-phase Test-Driven Development tasks from ADRs, linking tests and production code with dependency tracking • Security & Compliance - Detect and mask sensitive content, configure custom security patterns, validate architectural rules, and ensure compliance • Deployment Readiness - Perform zero-tolerance validation, track deployment history, generate environment-specific guidance, and hard-block unsafe deployments • Smart Git Operations - AI-driven, security-focused git pushes with integrated deployment readiness checks and credential detection • Research Integration - Generate context-aware research questions and incorporate findings into architectural decisions • Project Health Scoring - Central coordination system for calculating health metrics across task completion, deployment readiness, and security posture • Workflow Automation - Generate intelligent development guidance, recommend tool sequences, and translate architectural decisions into actionable coding tasks • Content Management - Read, write, and list files and directories with multi-level caching for performance optimization • Failure Analysis - Structured troubleshooting with test plan generation and guided workflow analysis
Provides GitHub integration for repository management, including smart git push operations with deployment readiness validation and GitHub Actions CI/CD automation
Enables automated testing, building, and publishing workflows through GitHub Actions integration for continuous integration and deployment
Integrates with OpenAI's GPT models via OpenRouter for AI-powered architectural analysis, providing intelligent code generation, decision tracking, and development workflow automation
MCP ADR Analysis Server
AI-powered architectural analysis for intelligent development workflows. This Model Context Protocol (MCP) server provides immediate, actionable architectural insights instead of prompts. Get real ADR suggestions, technology analysis, and security recommendations through OpenRouter.ai integration.
Key Differentiator: Returns actual analysis results, not prompts to submit elsewhere.
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 🛡️ Security & Compliance - Detect and mask sensitive content automatically 📊 Workflow Automation - Todo generation, deployment tracking, and rule validation 🧪 TDD Integration - Two-phase Test-Driven Development with ADR linking and validation 🔍 Mock Detection - Sophisticated analysis to distinguish mock from production code 🚀 Deployment Readiness - Zero-tolerance test validation with deployment history tracking and hard blocking
📦 Installation
NPM Installation (Recommended)
RHEL 9/10 Installation (Recommended for RHEL systems)
Why RHEL needs special handling:
- RHEL 9/10 have specific npm PATH and permission issues
- Global npm installations often fail due to SELinux policies
- The script handles npm prefix configuration and PATH setup automatically
From Source
🤖 AI Execution Configuration
The MCP server supports AI-powered execution that transforms tools from returning prompts to returning actual results. This solves the fundamental UX issue where AI agents receive prompts instead of actionable data.
Quick Setup
- Get OpenRouter API Key: Visit https://openrouter.ai/keys
- Set Environment Variables:
- Restart MCP Server: Tools now return actual results instead of prompts!
Environment Variables
AI Execution (Recommended)
OPENROUTER_API_KEY
(Required for AI): OpenRouter API key from https://openrouter.ai/keysEXECUTION_MODE
(Optional):full
(AI execution) orprompt-only
(legacy)AI_MODEL
(Optional): AI model to use (see supported models below)
Performance Tuning (Optional)
AI_TEMPERATURE
(Optional): Response consistency (0-1, default: 0.1)AI_MAX_TOKENS
(Optional): Response length limit (default: 4000)AI_TIMEOUT
(Optional): Request timeout in ms (default: 60000)AI_CACHE_ENABLED
(Optional): Enable response caching (default: true)
Project Configuration
PROJECT_PATH
(Required): Path to the project directory to analyzeADR_DIRECTORY
(Optional): Directory containing ADR files (default:docs/adrs
)LOG_LEVEL
(Optional): Logging level (DEBUG, INFO, WARN, ERROR)
Supported AI Models
Model | Provider | Use Case | Input Cost | Output Cost |
---|---|---|---|---|
anthropic/claude-3-sonnet | Anthropic | Analysis, reasoning | $3.00/1K | $15.00/1K |
anthropic/claude-3-haiku | Anthropic | Quick tasks | $0.25/1K | $1.25/1K |
openai/gpt-4o | OpenAI | Versatile analysis | $5.00/1K | $15.00/1K |
openai/gpt-4o-mini | OpenAI | Cost-effective | $0.15/1K | $0.60/1K |
⚙️ Client Configuration
Claude Desktop (Recommended Setup)
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json
on macOS):
Cline (VS Code Extension)
Add to your cline_mcp_settings.json
:
Cursor
Create .cursor/mcp.json
in your project:
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json
:
🚀 Usage Examples
Basic Project Analysis
ADR Generation from Requirements
Enhanced TDD Workflow
Security and Compliance
Research and Documentation
Advanced Validation & Quality Assurance
Deployment Readiness & Safety
🎯 Use Cases
👨💻 AI Coding Assistants
Enhance AI coding assistants like Cline, Cursor, and Claude Code
- Test-Driven Development: Two-phase TDD workflow with comprehensive ADR integration
- Intelligent Code Generation: Generate code that follows architectural patterns and best practices
- Mock vs Production Detection: Prevent AI assistants from claiming mock code is production-ready
- Architecture-Aware Refactoring: Refactor code while maintaining architectural integrity
- Decision Documentation: Automatically document architectural decisions as you code
- Pattern Recognition: Identify and suggest architectural patterns for new features
- Quality Validation: Reality-check mechanisms against overconfident AI assessments
💬 Conversational AI Assistants
Enhance chatbots and business agents with architectural intelligence
- Technical Documentation: Answer questions about system architecture and design decisions
- Compliance Checking: Verify that proposed changes meet architectural standards
- Knowledge Synthesis: Combine information from multiple sources for comprehensive answers
- Decision Support: Provide data-driven recommendations for architectural choices
🤖 Autonomous Development Agents
Enable autonomous agents to understand and work with complex architectures
- Automated Analysis: Continuously analyze codebases for architectural drift
- Rule Enforcement: Automatically enforce architectural rules and patterns
- Documentation Generation: Generate and maintain architectural documentation
- Deployment Validation: Verify deployment readiness and compliance
🏢 Enterprise Architecture Management
Support enterprise architects and development teams
- Portfolio Analysis: Analyze multiple projects for consistency and compliance
- Migration Planning: Plan and track architectural migrations and modernization
- Risk Assessment: Identify architectural risks and technical debt
- Standards Enforcement: Ensure compliance with enterprise architectural standards
🛠️ Technology Stack
- Runtime: Node.js (>=18.0.0)
- Language: TypeScript with strict configuration
- Core Framework: @modelcontextprotocol/sdk
- Validation: Zod schemas for all data structures
- Testing: Jest with >80% coverage target
- Linting: ESLint with comprehensive rules
- Build: TypeScript compiler with incremental builds
- CI/CD: GitHub Actions with automated testing and publishing
� Project Structure
🧪 Testing
Test Coverage
- Unit Tests: Individual component testing with >80% coverage
- Integration Tests: MCP protocol and file system testing
- Custom Matchers: ADR and schema validation helpers
- Performance Tests: Caching and optimization validation
🔧 Development
Prerequisites
- Node.js >= 18.0.0
- npm or yarn
- Git
Setup
Available Scripts
Pre-Commit Hook
The repository includes an automated pre-commit hook that ensures code quality:
Code Quality Standards
- TypeScript: Strict mode with comprehensive type checking
- ESLint: Enforced code quality and security rules
- Testing: Jest with custom matchers for ADR validation
- Coverage: Minimum 80% test coverage required
- Security: Content masking and secret prevention
- MCP Compliance: Strict adherence to Model Context Protocol specification
🚀 Getting Started
Quick Start (3 Steps)
- Install:
npm install -g mcp-adr-analysis-server
- Get API Key: Visit https://openrouter.ai/keys
- Configure Claude Desktop: Add to your configuration:
- Restart Claude Desktop and start getting AI-powered architectural insights!
Example Usage
Once configured, you can ask Claude:
"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 will now return actual analysis results instead of prompts to submit elsewhere!
🚀 Complete Development Lifecycle
The MCP server now provides a complete development lifecycle assistant with intelligent workflow guidance:
🎯 Step 1: Get Workflow Guidance
Parameters:
Result: Intelligent tool sequence recommendations and workflow guidance.
🏗️ Step 2: Get Development Guidance
Parameters:
Result: Specific coding tasks, implementation patterns, and development roadmap.
📊 Step 3: Execute Recommended Tools
Follow the workflow guidance to execute the recommended tool sequence for your specific goals.
🔄 Complete Workflow Examples
New Project Setup
get_workflow_guidance
→ 2.analyze_project_ecosystem
→ 3.get_architectural_context
→ 4.suggest_adrs
→ 5.get_development_guidance
Existing Project Analysis
get_workflow_guidance
→ 2.discover_existing_adrs
(initializes cache) → 3.get_architectural_context
→ 4.generate_adr_todo
→ 5.get_development_guidance
Security Audit
get_workflow_guidance
→ 2.analyze_content_security
→ 3.generate_content_masking
→ 4.validate_content_masking
Configuration Examples
Example 1: AI-Powered Project Analysis
Example 2: Cost-Effective Setup
Example 3: Prompt-Only Mode (Legacy)
Example 4: Multi-Project Setup
Example 5: Development Environment
� Troubleshooting
🔴 RHEL 9/10 Specific Issues
Problem: "Command 'mcp-adr-analysis-server' not found" on RHEL systems
Root Cause: RHEL has specific npm global installation and PATH issues due to SELinux policies and default npm configuration.
Solution: Use the RHEL-specific installer:
Manual Fix for RHEL:
RHEL MCP Configuration: If the command is still not found, use the npx approach:
⚠️ CRITICAL: Tools Return Prompts Instead of Results
Symptom: When calling tools like suggest_adrs
, you receive large detailed instructions and prompts instead of actual ADR suggestions.
Root Cause: AI execution is not properly configured. The tool is falling back to prompt-only mode.
Solution: Add these required environment variables to your MCP configuration:
Verification: After adding these variables and restarting, tools should return actual results like:
suggest_adrs
→ Actual ADR suggestions with titles and reasoninganalyze_project_ecosystem
→ Real technology analysis and recommendationsgenerate_content_masking
→ Actual masked content, not masking instructions
Quick Diagnostic: Use the built-in diagnostic tool:
This will show exactly what's wrong with your configuration and provide step-by-step fix instructions.
Other AI Execution Issues
Problem: "AI execution not available" errors
Problem: "AI execution not available" errors
- ✅ Verify
OPENROUTER_API_KEY
is set correctly - ✅ Check
EXECUTION_MODE=full
in environment - ✅ Ensure API key has sufficient credits
- ✅ Verify network connectivity to OpenRouter
Problem: Slow AI responses
Problem: High API costs
Environment Configuration
Check current configuration:
Reset configuration:
Common Issues
Issue | Solution |
---|---|
"Module not found" errors | Run npm install && npm run build |
TypeScript compilation errors | Check Node.js version >= 18.0.0 |
Permission denied | Check file permissions and project path |
API rate limits | Reduce AI_MAX_TOKENS or increase AI_TIMEOUT |
Cache issues | Clear cache with rm -rf .mcp-adr-cache |
�🔒 Security Features
Content Protection
- Automatic Secret Detection: Identifies API keys, passwords, and sensitive data
- Intelligent Masking: Context-aware content masking with configurable levels
- Security Validation: Comprehensive security checks and recommendations
- Compliance Tracking: Ensure adherence to security standards and best practices
Privacy & Data Handling
- Local Processing: All analysis performed locally, no data sent to external services
- Configurable Masking: Customize masking rules for your organization's needs
- Audit Trail: Track all security-related actions and decisions
- Zero Trust: Assume all content may contain sensitive information
📊 Performance & Scalability
Intelligent Caching
- Multi-level Caching: File system, memory, and analysis result caching
- Cache Invalidation: Smart cache invalidation based on file changes
- Performance Optimization: Optimized for large codebases and complex projects
- Resource Management: Efficient memory and CPU usage
Scalability Features
- Incremental Analysis: Only analyze changed files and dependencies
- Parallel Processing: Multi-threaded analysis for large projects
- Memory Optimization: Efficient memory usage for large codebases
- Streaming Results: Stream analysis results for real-time feedback
🤝 Contributing
We welcome contributions! This project follows strict development standards to ensure quality and security.
Development Standards
- TypeScript: Strict mode with comprehensive type checking
- Testing: >80% code coverage with Jest
- Linting: ESLint with security-focused rules
- Security: All contributions must pass security validation
- MCP Compliance: Strict adherence to Model Context Protocol specification
Getting Started
- Fork the repository
- Create a feature branch
- Make your changes with tests
- The pre-commit hook will automatically validate your changes
- Run the full test suite:
npm test
- For comprehensive validation:
./scripts/pre-commit-checklist.sh
- Submit a pull request
See CONTRIBUTING.md for detailed guidelines.
🔗 Related Resources
Official Documentation
Community Resources
Project Documentation
📄 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.
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Tools
Transform your codebase into professional architectural decision records with intelligent AI analysis
- What is MCP?
- ✨ Core Capabilities
- 📦 Installation
- 🤖 AI Execution Configuration
- ⚙️ Client Configuration
- 🚀 Usage Examples
- 🎯 Use Cases
- 🛠️ Technology Stack
- � Project Structure
- 🧪 Testing
- 🔧 Development
- 🚀 Getting Started
- 🚀 Complete Development Lifecycle
- � Troubleshooting
- �🔒 Security Features
- 📊 Performance & Scalability
- 🤝 Contributing
- 🔗 Related Resources
- 📄 License
- 🙏 Acknowledgments
Related MCP Servers
- AsecurityAlicenseAqualityFacilitates comprehensive architectural design and evaluation through specialized agents, rich resources, and powerful tools covering diverse architectural domains, including cloud, AI, and blockchain.Last updated -31,40627ISC License
- -securityFlicense-qualityAnalyzes codebases to generate dependency graphs and architectural insights across multiple programming languages, helping developers understand code structure and validate against architectural rules.Last updated -62214
- -security-license-qualityEnables AI assistants like Claude to interact with Autodesk Construction Cloud Build platform for construction project management, including issues tracking, RFIs, submittals, and document management through natural language.Last updated -
- -securityAlicense-qualityA sophisticated server that enables AI assistants to automatically analyze codebases and generate comprehensive, professional documentation.Last updated -1MIT License