Skip to main content

๐Ÿ”ง How-To: Troubleshoot Common Issues

Goal: Solve problems quickly and get back to productive architecture analysis.

When to use this guide: When you encounter errors, unexpected behavior, or need to diagnose issues with the MCP ADR Analysis Server.

๐Ÿ”„ Troubleshooting Workflowโ€‹


๐Ÿšจ Emergency Quick Fixesโ€‹

"Tool not found" or "Unknown tool" errorsโ€‹

Problem: AI assistant can't find MCP tools
Quick Fix:

# 1. Verify server is installed
mcp-adr-analysis-server --version

# 2. Check server status
mcp-adr-analysis-server --test

# 3. Restart your MCP client

"Permission denied" errorsโ€‹

Problem: Server can't read/write files
Quick Fix:

# 1. Check directory permissions
ls -la ./

# 2. Create missing directories
mkdir -p ./adrs

# 3. Fix permissions if needed
chmod 755 ./

AI seems confused or gives poor resultsโ€‹

Problem: Context degradation or AI confusion
Quick Fix:

{
"tool": "troubleshoot_guided_workflow",
"parameters": {
"operation": "run_diagnostics"
}
}

๐Ÿ” Systematic Diagnosisโ€‹

Step 1: Verify Installationโ€‹

# Check Node.js version (should be โ‰ฅ20.0.0)
node --version

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

# Test basic functionality
mcp-adr-analysis-server --test

Expected outputs:

  • Node.js: v20.x.x or higher
  • Server version: MCP ADR Analysis Server v2.1.0 (or current version)
  • Test: โœ… Server health check passed

Step 2: Validate Configurationโ€‹

Check your MCP client configuration:

{
"mcpServers": {
"adr-analysis": {
"command": "mcp-adr-analysis-server",
"env": {
"PROJECT_PATH": "/absolute/path/to/project",
"OPENROUTER_API_KEY": "your_openrouter_api_key_here",
"EXECUTION_MODE": "full",
"AI_MODEL": "anthropic/claude-3-sonnet",
"ADR_DIRECTORY": "./adrs",
"LOG_LEVEL": "DEBUG"
}
}
}
}

Common configuration issues:

  • โŒ "PROJECT_PATH": "." (relative path)
  • โœ… "PROJECT_PATH": "/Users/you/project" (absolute path)
  • โŒ Missing OPENROUTER_API_KEY (required for AI features)
  • โŒ Missing EXECUTION_MODE (should be "full" for AI or "prompt-only" for basic)
  • โŒ Missing ADR_DIRECTORY
  • โŒ Wrong command name

Step 3: Test Basic Functionalityโ€‹

Run this diagnostic sequence:

// 1. Test AI execution status
{
"tool": "check_ai_execution_status"
}

// 2. Test file operations
{
"tool": "list_directory",
"parameters": {
"path": "."
}
}

// 3. Test analysis capabilities
{
"tool": "analyze_project_ecosystem",
"parameters": {
"projectPath": ".",
"recursiveDepth": "shallow"
}
}

๐Ÿ› Specific Problem Solutionsโ€‹

Analysis Returns Empty or Poor Resultsโ€‹

Symptoms:

  • "No architectural patterns detected"
  • "Project analysis incomplete"
  • Generic or unhelpful recommendations

Solution 1: Enhanced Analysis Mode

{
"tool": "analyze_project_ecosystem",
"parameters": {
"projectPath": ".",
"enhancedMode": true,
"knowledgeEnhancement": true,
"recursiveDepth": "comprehensive",
"includeEnvironment": true
}
}

Solution 2: Check Project Structure

# Ensure you have a proper project structure
ls -la
# Should see: package.json, src/, ./, etc.

# Check for hidden files that might indicate project type
ls -la | grep -E "\.(git|env|config)"

Solution 3: Verify Project Path

{
"tool": "read_file",
"parameters": {
"path": "package.json"
}
}

ADR Generation Failsโ€‹

Symptoms:

  • "Cannot generate ADR"
  • "Missing decision data"
  • Generated ADRs are incomplete

Solution 1: Use Structured Decision Data

{
"tool": "generate_adr_from_decision",
"parameters": {
"decisionData": {
"title": "Clear, specific decision title",
"context": "Detailed background and problem statement",
"decision": "Specific choice made",
"rationale": "Why this decision was made",
"consequences": ["Positive outcome 1", "Challenge 1", "Tradeoff 1"]
}
}
}

Solution 2: Get ADR Suggestions First

{
"tool": "suggest_adrs",
"parameters": {
"projectPath": ".",
"analysisScope": "all",
"maxSuggestions": 5
}
}

Tool Execution Hangs or Times Outโ€‹

Symptoms:

  • Tools never complete
  • Long delays without responses
  • Timeout errors

Solution 1: Check AI Service Status

{
"tool": "check_ai_execution_status"
}

Solution 2: Use Simpler Operations

// Instead of comprehensive analysis, start with basic
{
"tool": "analyze_project_ecosystem",
"parameters": {
"projectPath": ".",
"recursiveDepth": "shallow",
"enhancedMode": false
}
}

Solution 3: Clear Cache

{
"tool": "manage_cache",
"parameters": {
"action": "clear"
}
}

Security Analysis Issuesโ€‹

Symptoms:

  • "No sensitive content detected" (when you know there is some)
  • False positives in security scans
  • Content masking not working

Solution 1: Specify Content Type

{
"tool": "analyze_content_security",
"parameters": {
"content": "your content here",
"contentType": "code", // or "configuration", "logs", etc.
"userDefinedPatterns": ["your-custom-pattern-.*"]
}
}

Solution 2: Configure Custom Patterns

{
"tool": "configure_custom_patterns",
"parameters": {
"projectPath": ".",
"existingPatterns": ["api[_-]?key", "secret[_-]?token"]
}
}

TODO/Progress Tracking Problemsโ€‹

Symptoms:

  • TODO.md not generated
  • Progress tracking inaccurate
  • Tasks not syncing with ADRs

Solution 1: Regenerate TODO with Full Options

{
"tool": "generate_adr_todo",
"parameters": {
"adrDirectory": "./adrs",
"todoFormat": "both",
"includePriorities": true,
"includeTimestamps": true
}
}

Solution 2: Verify ADR Directory

# Check ADR files exist
ls -la ././adrs/
# Should see .md files like 001-decision-name.md

# Check ADR format
head -20 ././adrs/001-*.md

Solution 3: Manual Progress Sync

{
"tool": "compare_adr_progress",
"parameters": {
"todoPath": "TODO.md",
"adrDirectory": "./adrs",
"includeEnvironmentCheck": true
}
}

๐ŸŽฏ Performance Optimizationโ€‹

Slow Analysis Performanceโ€‹

Problem: Tools take too long to complete
Solutions:

  1. Reduce Analysis Scope
{
"tool": "analyze_project_ecosystem",
"parameters": {
"recursiveDepth": "medium", // instead of "comprehensive"
"enhancedMode": false // for faster results
}
}
  1. Use Targeted Analysis
// Instead of full project analysis, focus on specific areas
{
"tool": "suggest_adrs",
"parameters": {
"analysisScope": "technology", // focus on just technology decisions
"maxSuggestions": 3
}
}
  1. Cache Management
// Clear old cache if it's causing slowdowns
{
"tool": "manage_cache",
"parameters": {
"action": "cleanup"
}
}

Memory Issuesโ€‹

Problem: Server crashes or runs out of memory
Solutions:

  1. Process Large Projects in Chunks
# Instead of analyzing entire project at once
# Focus on subdirectories
  1. Increase Node.js Memory Limit
export NODE_OPTIONS="--max-old-space-size=4096"
mcp-adr-analysis-server

๐Ÿ”ง Advanced Diagnosticsโ€‹

Enable Debug Loggingโ€‹

// In your MCP client configuration
{
"env": {
"LOG_LEVEL": "DEBUG",
"VERBOSE": "true"
}
}

System Information Gatheringโ€‹

{
"tool": "analyze_environment",
"parameters": {
"includeOptimizations": true
}
}

Cache Analysisโ€‹

{
"tool": "manage_cache",
"parameters": {
"action": "stats"
}
}

๐Ÿ†˜ When All Else Failsโ€‹

Nuclear Optionsโ€‹

  1. Complete Reset
# Uninstall and reinstall
npm uninstall -g mcp-adr-analysis-server
npm install -g mcp-adr-analysis-server

# Clear all cache
rm -rf .mcp-adr-cache/
  1. Restart from Scratch
# Backup your work
cp -r ././adrs/ ~/backup-./adrs/

# Start fresh
rm -rf ./
mkdir -p ./adrs
  1. Environment Reset
# Clear environment variables
unset PROJECT_PATH ADR_DIRECTORY LOG_LEVEL

# Start with minimal configuration
export PROJECT_PATH="$(pwd)"
export ADR_DIRECTORY="./adrs"

Get Helpโ€‹

  1. Check Server Health
{
"tool": "troubleshoot_guided_workflow",
"parameters": {
"operation": "run_diagnostics"
}
}
  1. Report Issues
  1. Community Support

โœ… Prevention Tipsโ€‹

Regular Maintenanceโ€‹

# Weekly health check
mcp-adr-analysis-server --test

# Monthly cleanup
{
"tool": "manage_cache",
"parameters": {
"action": "cleanup"
}
}

Best Practicesโ€‹

  1. Always use absolute paths in configuration
  2. Keep Node.js updated (โ‰ฅ20.0.0)
  3. Monitor disk space (cache can grow large)
  4. Backup ADRs regularly (they're valuable documentation!)

Problem not listed here? โ†’ File an Issue with detailed information about your problem.