ADR Analysis MCP server

Analyzes Architecture Decision Records (ADRs) to extract decision context, validate against best practices, and identify architectural patterns for maintaining documentation quality and tracking technical debt evolution.
Back to servers
Setup instructions
Provider
Tosin Akinosho
Release date
Aug 24, 2025
Language
Java
Stats
10 stars

The MCP ADR Analysis Server provides AI-powered architectural analysis for intelligent development workflows. Unlike typical AI assistants, it returns actual analysis results rather than prompts to submit elsewhere, offering architectural insights with 95% confidence scoring.

Installation Options

Global Installation (Recommended)

npm install -g mcp-adr-analysis-server

Using npx (No Installation Required)

npx mcp-adr-analysis-server

RHEL 9/10 Systems

curl -sSL https://raw.githubusercontent.com/tosin2013/mcp-adr-analysis-server/main/scripts/install-rhel.sh | bash

Quick Setup (3 Steps)

  1. Get an API Key from OpenRouter.ai/keys

  2. Set Environment Variables:

    • OPENROUTER_API_KEY=your_key
    • EXECUTION_MODE=full
  3. Configure your MCP client (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"
      }
    }
  }
}

Usage Examples

You can ask your MCP client (Claude or other compatible assistants) questions like:

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

Code Examples

// 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
  }
);

Firecrawl Integration (Optional)

For enhanced web research capabilities, you can integrate with Firecrawl:

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

Troubleshooting

Common Issues:

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

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

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "adr-analysis" '{"command":"npx","args":["mcp-adr-analysis-server"],"env":{"PROJECT_PATH":"${workspaceFolder}","ADR_DIRECTORY":"docs/adrs","LOG_LEVEL":"ERROR"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "adr-analysis": {
            "command": "npx",
            "args": [
                "mcp-adr-analysis-server"
            ],
            "env": {
                "PROJECT_PATH": "${workspaceFolder}",
                "ADR_DIRECTORY": "docs/adrs",
                "LOG_LEVEL": "ERROR"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "adr-analysis": {
            "command": "npx",
            "args": [
                "mcp-adr-analysis-server"
            ],
            "env": {
                "PROJECT_PATH": "${workspaceFolder}",
                "ADR_DIRECTORY": "docs/adrs",
                "LOG_LEVEL": "ERROR"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later