Skip to main content

๐Ÿ“ฆ MCP ADR Analysis Server Installation Guide

Complete installation guide for all environments and use cases

Version: 2.1.0 | Node.js: โ‰ฅ20.0.0 | NPM: โ‰ฅ9.0.0


๐Ÿ“– Table of Contentsโ€‹

  1. Quick Installation
  2. System Requirements
  3. Installation Methods
  4. MCP Client Configuration
  5. Environment Setup
  6. Verification
  7. Troubleshooting
  8. Uninstallation

โšก Quick Installationโ€‹

For Most Users (NPM Global Install)โ€‹

# Install globally from NPM
npm install -g mcp-adr-analysis-server@2.1.0

# Verify installation
mcp-adr-analysis-server --version
# Expected: MCP ADR Analysis Server v2.1.0

# Quick health check
mcp-adr-analysis-server --test
# Expected: โœ… Health check passed

For AI Assistants (MCP Client Setup)โ€‹

Add to your MCP client configuration:

{
"mcpServers": {
"adr-analysis": {
"command": "mcp-adr-analysis-server",
"env": {
"PROJECT_PATH": "/path/to/your/project",
"OPENROUTER_API_KEY": "your_api_key_here",
"EXECUTION_MODE": "full"
}
}
}
}

๐Ÿ–ฅ๏ธ System Requirementsโ€‹

Minimum Requirementsโ€‹

  • Operating System: macOS, Linux, Windows (WSL2 recommended)
  • Node.js: โ‰ฅ20.0.0 (LTS recommended)
  • NPM: โ‰ฅ9.0.0
  • Memory: 2GB RAM minimum, 4GB+ recommended
  • Storage: 500MB free space (1GB+ for development)
  • Network: Internet access for AI API calls
  • Node.js: Latest LTS (20.x)
  • Memory: 8GB+ RAM for large projects
  • Storage: 2GB+ free space
  • CPU: Multi-core processor for parallel analysis

Platform-Specific Notesโ€‹

macOSโ€‹

# Install Node.js via Homebrew (recommended)
brew install node@20

# Verify installation
node --version # Should be โ‰ฅ20.0.0
npm --version # Should be โ‰ฅ9.0.0

Linux (Ubuntu/Debian)โ€‹

# Install Node.js 20.x
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs

# Verify installation
node --version
npm --version

RHEL/CentOS/Fedoraโ€‹

# Use the special RHEL installer
curl -sSL https://raw.githubusercontent.com/tosin2013/mcp-adr-analysis-server/main/scripts/install-rhel.sh | bash

Windowsโ€‹

# Install Node.js from official website or use Chocolatey
choco install nodejs --version=20.0.0

# Or use Windows Package Manager
winget install OpenJS.NodeJS

๐Ÿ”ง Installation Methodsโ€‹

Best for: Most users, AI assistants, production use

# Install latest stable version
npm install -g mcp-adr-analysis-server

# Install specific version
npm install -g mcp-adr-analysis-server@2.1.0

# Verify installation
which mcp-adr-analysis-server
mcp-adr-analysis-server --version

Pros:

  • Simple installation
  • Available system-wide
  • Automatic PATH configuration
  • Easy updates

Cons:

  • Requires global npm permissions
  • Single version per system

Method 2: Local Project Installationโ€‹

Best for: Project-specific usage, development teams

# Navigate to your project
cd /path/to/your/project

# Install locally
npm install mcp-adr-analysis-server@2.1.0

# Run via npx
npx mcp-adr-analysis-server --version

# Or add to package.json scripts
echo '{"scripts": {"adr": "mcp-adr-analysis-server"}}' >> package.json
npm run adr -- --version

Method 3: Development Installation (From Source)โ€‹

Best for: Contributors, advanced users, custom modifications

# Clone repository
git clone https://github.com/tosin2013/mcp-adr-analysis-server.git
cd mcp-adr-analysis-server

# Install dependencies
npm install

# Build from source
npm run build

# Run tests to verify
npm test

# Link globally (optional)
npm link

# Verify development installation
mcp-adr-analysis-server --version

Method 4: Docker Installationโ€‹

Best for: Containerized environments, CI/CD pipelines

# Pull Docker image (when available)
docker pull tosin2013/mcp-adr-analysis-server:2.1.0

# Run in container
docker run -it --rm \
-v $(pwd):/workspace \
-e OPENROUTER_API_KEY=your_key \
tosin2013/mcp-adr-analysis-server:2.1.0 \
analyze_project_ecosystem --projectPath=/workspace

๐Ÿค– MCP Client Configurationโ€‹

Claude Desktopโ€‹

// ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
// %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"adr-analysis": {
"command": "mcp-adr-analysis-server",
"env": {
"PROJECT_PATH": "/Users/username/projects/my-project",
"OPENROUTER_API_KEY": "sk-or-v1-...",
"EXECUTION_MODE": "full",
"LOG_LEVEL": "info"
}
}
}
}

Cline (VS Code Extension)โ€‹

// .vscode/settings.json
{
"cline.mcpServers": {
"adr-analysis": {
"command": "mcp-adr-analysis-server",
"env": {
"PROJECT_PATH": "${workspaceFolder}",
"OPENROUTER_API_KEY": "${env:OPENROUTER_API_KEY}",
"EXECUTION_MODE": "full"
}
}
}
}

Cursorโ€‹

// Cursor Settings > MCP Servers
{
"mcp.servers": {
"adr-analysis": {
"command": "mcp-adr-analysis-server",
"args": [],
"env": {
"PROJECT_PATH": "/path/to/project",
"OPENROUTER_API_KEY": "your_key",
"EXECUTION_MODE": "full"
}
}
}
}

Windsurfโ€‹

// Windsurf MCP Configuration
{
"mcpServers": {
"adr-analysis": {
"command": "mcp-adr-analysis-server",
"env": {
"PROJECT_PATH": "${workspaceRoot}",
"OPENROUTER_API_KEY": "${OPENROUTER_API_KEY}",
"EXECUTION_MODE": "full",
"ENHANCED_MODE": "true"
}
}
}
}

๐ŸŒ Environment Setupโ€‹

Required Environment Variablesโ€‹

# Core Configuration
export OPENROUTER_API_KEY="sk-or-v1-your-api-key-here"
export PROJECT_PATH="/path/to/your/project"
export EXECUTION_MODE="full"

# Optional Configuration
export ADR_DIRECTORY="./adrs"
export LOG_LEVEL="info"
export CACHE_ENABLED="true"
export ENHANCED_MODE="true"
export KNOWLEDGE_ENHANCEMENT="true"

Environment File Setupโ€‹

Create .env file in your project:

# .env file for MCP ADR Analysis Server
OPENROUTER_API_KEY=sk-or-v1-your-api-key-here
PROJECT_PATH=/absolute/path/to/your/project
EXECUTION_MODE=full
ADR_DIRECTORY=./adrs
LOG_LEVEL=info
CACHE_ENABLED=true
ENHANCED_MODE=true
KNOWLEDGE_ENHANCEMENT=true
MASKING_STRATEGY=partial
SECURITY_SCAN_ENABLED=true

API Key Setupโ€‹

Get OpenRouter API Keyโ€‹

  1. Visit OpenRouter.ai
  2. Sign up or log in
  3. Create a new API key
  4. Copy the key (starts with sk-or-v1-)

Secure API Key Storageโ€‹

# Method 1: Environment variable (recommended)
echo 'export OPENROUTER_API_KEY="sk-or-v1-your-key"' >> ~/.bashrc
source ~/.bashrc

# Method 2: .env file (project-specific)
echo 'OPENROUTER_API_KEY=sk-or-v1-your-key' >> .env

# Method 3: System keychain (macOS)
security add-generic-password -a $USER -s openrouter-api -w "sk-or-v1-your-key"

โœ… Verificationโ€‹

Basic Verificationโ€‹

# 1. Check installation
mcp-adr-analysis-server --version
# Expected: MCP ADR Analysis Server v2.1.0

# 2. Verify configuration
mcp-adr-analysis-server --config
# Expected: Configuration summary

# 3. Run health check
mcp-adr-analysis-server --test
# Expected: โœ… Health check passed - server can start successfully

# 4. Check available tools
mcp-adr-analysis-server --help
# Expected: Usage information and available commands

Advanced Verificationโ€‹

# Test MCP protocol functionality
echo '{"method":"tools/list"}' | mcp-adr-analysis-server
# Expected: JSON response with available tools

# Test AI integration (requires API key)
mcp-adr-analysis-server --test-ai
# Expected: โœ… AI integration working

# Test project analysis
cd /path/to/test/project
mcp-adr-analysis-server analyze_project_ecosystem
# Expected: Project analysis results

MCP Client Verificationโ€‹

Claude Desktopโ€‹

  1. Restart Claude Desktop after configuration
  2. Look for "MCP" indicator in the interface
  3. Try prompting: "What MCP tools are available?"
  4. Expected: List including ADR analysis tools

VS Code/Clineโ€‹

  1. Reload VS Code window
  2. Open Command Palette (Cmd/Ctrl+Shift+P)
  3. Look for "Cline: MCP" commands
  4. Test with: "Analyze this project's architecture"

๐Ÿ”ง Troubleshootingโ€‹

Common Installation Issuesโ€‹

1. Permission Denied (EACCES)โ€‹

# Fix npm permissions
sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}

# Or use npm's built-in fix
npm config set prefix ~/.npm-global
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

2. Node.js Version Issuesโ€‹

# Check current version
node --version

# Install correct version via nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
nvm install 20
nvm use 20

3. Command Not Foundโ€‹

# Check if globally installed
npm list -g mcp-adr-analysis-server

# Check PATH
echo $PATH

# Reinstall if needed
npm uninstall -g mcp-adr-analysis-server
npm install -g mcp-adr-analysis-server@2.1.0

4. API Key Issuesโ€‹

# Verify API key format
echo $OPENROUTER_API_KEY | grep "sk-or-v1-"

# Test API key
curl -H "Authorization: Bearer $OPENROUTER_API_KEY" \
https://openrouter.ai/api/v1/auth/key

5. Tree-sitter Parser Issuesโ€‹

# Tree-sitter parsers may fail to load (non-critical)
# Server will fall back to regex analysis
# Check logs for warnings:
mcp-adr-analysis-server --test 2>&1 | grep -i "tree-sitter"

Platform-Specific Issuesโ€‹

macOSโ€‹

# Fix Xcode command line tools
xcode-select --install

# Fix Homebrew permissions
sudo chown -R $(whoami) /usr/local/lib/node_modules

Linuxโ€‹

# Fix build tools
sudo apt-get install build-essential

# Fix node-gyp issues
npm config set python python3

Windowsโ€‹

# Install Windows Build Tools
npm install -g windows-build-tools

# Fix path issues
refreshenv

Getting Helpโ€‹

If you encounter issues:

  1. Check Logs: Run with DEBUG=* mcp-adr-analysis-server
  2. GitHub Issues: Report bugs
  3. Documentation: Troubleshooting Guide
  4. Community: Discussions

๐Ÿ—‘๏ธ Uninstallationโ€‹

Remove Global Installationโ€‹

# Uninstall globally
npm uninstall -g mcp-adr-analysis-server

# Verify removal
which mcp-adr-analysis-server
# Expected: command not found

Remove Local Installationโ€‹

# Remove from project
npm uninstall mcp-adr-analysis-server

# Remove from package.json
npm uninstall --save mcp-adr-analysis-server

Clean Up Configurationโ€‹

# Remove MCP client configurations
# Claude Desktop
rm ~/Library/Application\ Support/Claude/claude_desktop_config.json

# Remove environment variables
# Edit ~/.bashrc, ~/.zshrc, etc. and remove OPENROUTER_API_KEY lines

# Clear npm cache
npm cache clean --force

Remove Development Installationโ€‹

# If installed from source
cd mcp-adr-analysis-server
npm unlink # If linked globally
rm -rf node_modules
cd ..
rm -rf mcp-adr-analysis-server

๐Ÿ”„ Updates and Maintenanceโ€‹

Updating to Latest Versionโ€‹

# Update global installation
npm update -g mcp-adr-analysis-server

# Or reinstall specific version
npm install -g mcp-adr-analysis-server@latest

# Verify update
mcp-adr-analysis-server --version

Checking for Updatesโ€‹

# Check current version
npm list -g mcp-adr-analysis-server

# Check latest available version
npm view mcp-adr-analysis-server version

# Check outdated packages
npm outdated -g

๐Ÿ“š Next Stepsโ€‹

After successful installation:

  1. ๐Ÿ“– Read the Prompting Guide - Learn effective prompting techniques
  2. ๐Ÿ”ง Configure Your Environment - Set up project-specific settings
  3. ๐Ÿš€ Try the Quick Start Tutorial - Get hands-on experience
  4. ๐Ÿ“‹ Review API Reference - Explore available tools
  5. ๐Ÿค Join the Community - Contribute and get support

๐ŸŽ‰ Congratulations! Your MCP ADR Analysis Server is ready to use.

This installation guide follows methodological pragmatism with systematic verification steps and explicit acknowledgment of platform-specific requirements and limitations.