Troubleshooting Guide¶
This guide covers common issues you might encounter with the EARLY MCP Server and provides step-by-step solutions.
Quick Diagnostic Checklist¶
Before diving into specific issues, run through this quick checklist:
- Node.js Version:
node --versionshows 18.0.0 or higher - Dependencies Installed:
npm installcompleted successfully - Project Built:
npm run buildcompleted without errors - API Credentials:
.envfile exists with validEARLY_API_KEYandEARLY_API_SECRET - Server Starts:
npm run start:envruns without immediate errors - Unit Tests Pass:
npm testshows all tests passing
If any of these fail, start with the corresponding section below.
Installation and Setup Issues¶
Node.js Version Problems¶
Issue: "Node.js version too old"¶
Symptoms: - Build fails with syntax errors - Server crashes on startup - Dependencies fail to install
Solution: 1. Check current version:
- Install Node.js 18 or higher:
- Windows/Mac: Download from nodejs.org
-
Using NVM:
nvm install 18 && nvm use 18 -
Verify installation:
Dependency Installation Failures¶
Issue: "npm install fails"¶
Common Error Messages: - EACCES: permission denied - gyp ERR! stack Error: not found: make - ERR! code ERESOLVE
Solutions:
For Permission Errors:
# Option 1: Use npx to avoid global installations
npx create-react-app --version
# Option 2: Fix npm permissions (Linux/Mac)
sudo chown -R $(whoami) ~/.npm
For Build Tool Errors (Windows):
# Install Windows build tools
npm install --global windows-build-tools
# Or use Visual Studio installer
# Install "Desktop development with C++" workload
For Dependency Resolution:
# Clear npm cache
npm cache clean --force
# Delete node_modules and package-lock.json
rm -rf node_modules package-lock.json
# Reinstall
npm install
Build Failures¶
Issue: "TypeScript compilation fails"¶
Common Symptoms: - npm run build shows type errors - Import/export errors - Module resolution failures
Solutions:
-
Clean build:
-
Check TypeScript configuration:
-
Update dependencies:
API Authentication Issues¶
Invalid API Credentials¶
Issue: "Authentication failed"¶
Error Messages: - Authentication failed: Invalid API key - API Error 401: Unauthorized - API credentials not found in environment variables
Solutions:
-
Verify credentials exist:
-
Get fresh credentials:
- Open EARLY app
- Go to Settings → Developer → API Keys
- Generate new API key and secret pair
-
Update
.envfile with new values -
Test credentials directly:
Environment Variable Loading¶
Issue: "Environment variables not loaded"¶
Symptoms: - Credentials are in .env but still get "missing" errors - Works with direct environment variables but not .env file
Solutions:
-
Verify .env format:
-
Check .env location:
-
Test environment loading:
Server Runtime Issues¶
Server Crashes or Hangs¶
Issue: "Server stops responding"¶
Symptoms: - Server starts but then becomes unresponsive - Long delays before responses - Process exits unexpectedly
Solutions:
-
Check for unhandled errors:
-
Monitor resource usage:
-
Test API connectivity:
Memory or Performance Issues¶
Issue: "Server uses too much memory/CPU"¶
Solutions:
-
Monitor performance:
-
Check for memory leaks:
-
Optimize configuration:
MCP Client Integration Issues¶
Claude Desktop Integration Problems¶
Issue: "Claude doesn't recognize the server"¶
Symptoms: - Claude says it doesn't have time tracking capabilities - No response to time-related requests - Server appears to start but Claude can't access it
Solutions:
-
Verify configuration file location:
-
Validate JSON syntax:
-
Check absolute paths:
-
Restart Claude completely:
- File → Exit (don't just close window)
- Wait 10 seconds
- Restart Claude Desktop
Issue: "Server starts but tools don't work"¶
Symptoms: - Claude acknowledges the server exists - Tool calls return errors or timeouts - Authentication errors in responses
Solutions:
-
Test server independently:
-
Check Claude Desktop logs:
- Windows:
%APPDATA%\Claude\logs\ - Mac:
~/Library/Logs/Claude/ -
Look for MCP server errors
-
Verify environment variables in Claude config:
Custom MCP Client Issues¶
Issue: "Custom client can't connect"¶
Common Problems: - Protocol version mismatch - Incorrect JSON-RPC format - stdio communication problems
Solutions:
-
Verify protocol version:
-
Test stdio communication:
-
Debug message format:
- Each message must be a single line
- Must end with newline character
- Must be valid JSON-RPC 2.0
API Integration Issues¶
EARLY API Connectivity¶
Issue: "Cannot connect to EARLY API"¶
Error Messages: - ENOTFOUND api.early.app - connect ETIMEDOUT - API Error 503: Service Unavailable
Solutions:
-
Test network connectivity:
-
Check firewall/proxy:
-
Verify DNS resolution:
Rate Limiting¶
Issue: "Too many requests"¶
Error Messages: - API Error 429: Too Many Requests - Rate limit exceeded
Solutions:
-
Implement backoff:
-
Reduce request frequency:
- Use caching for frequently accessed data
- Batch operations when possible
-
Avoid rapid-fire requests
-
Check account limits:
- Verify EARLY account status
- Contact EARLY support if limits seem incorrect
Tool-Specific Issues¶
Timer Tools Not Working¶
Issue: "start_timer/stop_timer fail"¶
Solutions:
-
Check timer state:
-
Verify activity IDs:
Time Entry Creation Fails¶
Issue: "create_time_entry returns errors"¶
Common Issues: - Invalid time formats - Missing required fields - Conflicting time ranges
Solutions:
-
Validate time formats:
-
Check required fields:
-
Test minimal entry:
Development and Testing Issues¶
Test Failures¶
Issue: "npm test fails"¶
Common Causes: - API credentials not configured for testing - Network connectivity issues - Outdated dependencies
Solutions:
-
Configure test environment:
-
Run tests in isolation:
-
Mock API calls:
Development Server Issues¶
Issue: "Development server won't start"¶
Solutions:
-
Check port availability:
-
Clear development cache:
Getting More Help¶
Diagnostic Information¶
When reporting issues, include:
-
System Information:
-
Server Status:
-
Test Suite Output:
Where to Get Help¶
- GitHub Issues: Create an issue
- Documentation: Review all documentation pages
- Test Client: Use included test client to isolate issues
- EARLY Support: For API-specific issues
Useful Commands for Debugging¶
# Complete diagnostic script
echo "=== EARLY MCP Server Diagnostics ==="
echo "Node.js version: $(node --version)"
echo "npm version: $(npm --version)"
echo "Project directory: $(pwd)"
echo "Environment file exists: $(test -f .env && echo 'Yes' || echo 'No')"
echo "Package.json exists: $(test -f package.json && echo 'Yes' || echo 'No')"
echo "Dist directory exists: $(test -d dist && echo 'Yes' || echo 'No')"
echo
echo "=== Testing server startup ==="
timeout 10s npm run start:env 2>&1 || echo "Server startup test completed"
echo
echo "=== Testing API connectivity ==="
curl -I https://api.early.app 2>&1 | head -5
Still having issues? Check the Integration Guide for setup-specific problems, or create an issue with your diagnostic information.