๐ง 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.xor 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:
- Reduce Analysis Scope
{
"tool": "analyze_project_ecosystem",
"parameters": {
"recursiveDepth": "medium", // instead of "comprehensive"
"enhancedMode": false // for faster results
}
}
- 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
}
}
- 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:
- Process Large Projects in Chunks
# Instead of analyzing entire project at once
# Focus on subdirectories
- 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โ
- 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/
- Restart from Scratch
# Backup your work
cp -r ././adrs/ ~/backup-./adrs/
# Start fresh
rm -rf ./
mkdir -p ./adrs
- 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โ
- Check Server Health
{
"tool": "troubleshoot_guided_workflow",
"parameters": {
"operation": "run_diagnostics"
}
}
- Report Issues
- GitHub Issues: https://github.com/tosin2013/mcp-adr-analysis-server/issues
- Include: server version, Node.js version, error messages, steps to reproduce
- Community Support
- Documentation: Main README
- API Reference: Complete Tool Documentation
โ Prevention Tipsโ
Regular Maintenanceโ
# Weekly health check
mcp-adr-analysis-server --test
# Monthly cleanup
{
"tool": "manage_cache",
"parameters": {
"action": "cleanup"
}
}
Best Practicesโ
- Always use absolute paths in configuration
- Keep Node.js updated (โฅ20.0.0)
- Monitor disk space (cache can grow large)
- Backup ADRs regularly (they're valuable documentation!)
Problem not listed here? โ File an Issue with detailed information about your problem.