Getting Started¶
This guide will help you install, configure, and run the EARLY MCP Server in just a few minutes.
Prerequisites¶
Before you begin, ensure you have:
- Node.js >= 18.0.0 (Download here)
- npm or yarn package manager
- EARLY Account with API access (Sign up)
- Git for cloning the repository
Node.js Version Check
Verify your Node.js version with: node --version
Installation¶
1. Clone the Repository¶
2. Install Dependencies¶
3. Build the Project¶
Configuration¶
1. Get Your EARLY API Credentials¶
- Open the EARLY app on your device
- Go to Settings → Developer → API Keys
- Generate a new API key and secret pair
- Copy both the API Key and API Secret
Keep Credentials Secure
Never commit your API credentials to version control. Store them securely in environment variables.
2. Configure Environment Variables¶
Create a .env file in the project root:
Edit .env with your credentials:
# Required - Get these from EARLY app settings
EARLY_API_KEY=your-early-api-key-here
EARLY_API_SECRET=your-early-api-secret-here
Authentication Method
The server uses EARLY API v4 with API Key + Secret authentication flow.
Testing the Installation¶
Method 1: Quick Test¶
Test that the server starts and responds:
This should start the server without errors. Use Ctrl+C to stop it.
Method 2: Run Unit Tests¶
Use the built-in test suite to verify MCP functionality:
Expected output:
Method 3: Run Unit Tests¶
Execute the full test suite:
You should see 24 tests passing across 4 test files.
Test Suite Status
Some Jest worker process warnings may appear, but they don't affect functionality.
Verify API Connection¶
Test your EARLY API credentials by listing activities:
- Start the server:
npm run start:env - In another terminal, use the test client to call
list_activities - You should see your EARLY activities listed
If you get authentication errors: - Verify your API credentials are correct - Ensure both API key AND secret are provided
- Check that credentials are from the same EARLY account
Development Commands¶
Once installed, you can use these commands:
npm run dev # Watch mode TypeScript compilation
npm run build # Production build
npm run start # Run the compiled server
npm run start:env # Run with environment setup
npm test # Run Jest tests
npm run lint # Run ESLint
npm run lint:fix # Fix ESLint issues automatically
Project Structure¶
Understanding the project layout:
early-mcp-server/
├── src/ # TypeScript source
│ ├── index.ts # Main MCP server
│ ├── early-api-client.ts # EARLY API client
│ ├── types.ts # Type definitions
│ ├── tool-types.ts # Tool argument types
│ ├── error-utils.ts # Error handling utilities
│ ├── utils.ts # Helper functions
│ └── handlers/ # Tool handler implementations
├── dist/ # Compiled JavaScript
├── tests/ # Jest unit tests
├── docs/ # Documentation (this site)
├── start.js # Entry point with env loading
└── .env # Environment variables (create this)
Next Steps¶
Now that you have the server running:
- Learn the Tools - Explore all 6 time tracking tools
- Claude Desktop Integration - Set up integration with detailed guide
- Advanced Usage - Real-world patterns and best practices
- Troubleshooting - Common issues and solutions
Quick Start Checklist¶
- Node.js >= 18.0.0 installed
- Repository cloned and dependencies installed
- Project built successfully (
npm run build) - EARLY API credentials obtained
-
.envfile configured with credentials - Server starts without errors (
npm run start:env) - Unit tests pass (
npm test)
You're ready to start using the EARLY MCP Server!