๐ง 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"
}
}
Server installed but nothing happensโ
Problem: You installed the server but don't see any tools or analysis capabilities. Quick Fix: The MCP ADR Analysis Server is not a standalone application โ it requires an MCP-compatible client to connect to it.
Install one of the following MCP clients:
- Claude Desktop โ Anthropic's desktop app with built-in MCP support
- Cline โ VS Code extension
- Cursor โ AI-powered code editor with MCP support
- Windsurf โ AI-powered IDE by Codeium
After installing a client, add the server to its MCP configuration (see Quick Setup).
๐ 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
Firecrawl Integration Issuesโ
Firecrawl is an optional dependency for web research capabilities. The server works perfectly without it.
"Firecrawl connection failed" or timeoutsโ
Problem: Web search tools return errors or hang. Solution:
# 1. Verify Firecrawl is enabled
echo $FIRECRAWL_ENABLED # Should be "true"
# 2. Check API key (cloud service)
echo $FIRECRAWL_API_KEY # Should start with "fc-"
# 3. Check connectivity (self-hosted)
curl "$FIRECRAWL_BASE_URL/health"
Missing Firecrawl environment variablesโ
Problem: You set FIRECRAWL_ENABLED=true but web search tools return empty results.
Solution: Ensure you also set the API key:
export FIRECRAWL_ENABLED="true"
export FIRECRAWL_API_KEY="fc-your-api-key-here"
Do I need Firecrawl?โ
No. Firecrawl is entirely optional. Without it, the server uses local-only analysis. Enable it only if you need web research capabilities for ADR generation. See the Firecrawl Setup Guide for details.
MCP Client Compatibilityโ
Issues specific to different MCP clients.
Claude Desktop not connectingโ
Problem: Claude Desktop doesn't show MCP tools. Solution:
# 1. Verify config file location
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%\Claude\claude_desktop_config.json
# 2. Validate JSON syntax
cat ~/Library/Application\ Support/Claude/claude_desktop_config.json | python3 -m json.tool
# 3. Restart Claude Desktop completely (Cmd+Q on macOS, not just close window)
Cursor/Cline tools not appearingโ
Problem: MCP tools don't show in VS Code-based clients. Solution:
- Check the MCP settings in your editor settings
- Reload the window (
Cmd+Shift+Pโ "Reload Window") - Check the Output panel for MCP-related errors
"Command not found" in MCP clientโ
Problem: The client can't find mcp-adr-analysis-server.
Solution:
# 1. Use absolute path to the command
which mcp-adr-analysis-server
# Use this path in your config
# 2. Or use npx
{
"command": "npx",
"args": ["mcp-adr-analysis-server"]
}
For detailed client-specific setup, see the MCP Client Compatibility Guide.
โ 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.