harvest mcp server
Enables natural language time tracking and reporting for Harvest, including automatic leave requests, project/task matching, and date parsing.
Enables natural language time tracking and reporting for Harvest, including automatic leave requests, project/task matching, and date parsing.
An MCP server that lets you log Harvest time entries using natural language, including special handling for leave requests. This server makes time tracking more intuitive by understanding natural language inputs and automatically handling common scenarios like leave requests.
Install the Claude desktop app
Clone this repository:
git clone https://github.com/adrian-dotco/harvest-mcp-server.git
cd harvest-mcp-server
Install dependencies and build:
npm install
npm run build
Run the setup script:
node build/setup.js
Follow the prompts to enter your:
Timezone (default: Australia/Perth)
Restart Claude desktop app
That's it! You can now use natural language time tracking in Claude.
To update to the latest version:
git pull
npm install
npm run build
The setup script will have configured Claude to use your local build of the server, so any updates you pull will be automatically available after rebuilding.
The server provides several tools for interacting with Harvest:
Log time entries using natural language. Examples:
Regular time entries:
"2 hours on Project X doing development work today"
"45 minutes on Project Y testing yesterday"
"3.5 hours on Project Z meetings last Friday"
Leave requests (automatically uses standard work day hours):
"I'm off sick today"
"I'm unwell today"
"Taking annual leave next week"
Get time reports using natural language queries. Examples:
Time Period Options:
"Show time report for last month"
"Get time summary for this week"
"Show hours from January 1st to January 31st"
"Report time for Q1"
"Show me yesterday's hours"
Report Types:
"Show time report for last month"
"Get project hours for this week"
"Show time report by client for this month"
"Get hours by client for Q1"
"Show time summary by task for January"
"Get task breakdown for last week"
By Team Member:
"Show team hours for last week"
"Get time report by user for this month"
Report Details: Each report includes:
List all available Harvest projects:
List my projects
List available tasks for a specific project:
Show tasks for Project X
View recent time entries:
Show my recent time entries
The server supports these environment variables:
HARVEST_ACCESS_TOKEN
: Your Harvest personal access tokenHARVEST_ACCOUNT_ID
: Your Harvest account IDSTANDARD_WORK_DAY_HOURS
: Default hours for a full work day (default: 7.5)TIMEZONE
: Your timezone (default: Australia/Perth)The server is built using: - TypeScript - MCP SDK - chrono-node for natural language date parsing - Harvest API v2
To contribute: 1. Fork the repository 2. Create a feature branch 3. Submit a pull request
MIT License - see LICENSE for details
[
{
"description": "Log time entry using natural language",
"inputSchema": {
"properties": {
"text": {
"description": "Natural language time entry (e.g. "2 hours on Project X doing development work yesterday")",
"type": "string"
}
},
"required": [
"text"
],
"type": "object"
},
"name": "log_time"
},
{
"description": "List available Harvest projects",
"inputSchema": {
"properties": {},
"type": "object"
},
"name": "list_projects"
},
{
"description": "List available tasks for a project",
"inputSchema": {
"properties": {
"project_id": {
"description": "Project ID",
"type": "number"
}
},
"required": [
"project_id"
],
"type": "object"
},
"name": "list_tasks"
},
{
"description": "List recent time entries",
"inputSchema": {
"properties": {
"from": {
"description": "Start date (YYYY-MM-DD)",
"type": "string"
},
"to": {
"description": "End date (YYYY-MM-DD)",
"type": "string"
}
},
"type": "object"
},
"name": "list_entries"
},
{
"description": "Get time reports using natural language",
"inputSchema": {
"properties": {
"text": {
"description": "Natural language query (e.g., "Show time report for last month", "Get time summary for Project X")",
"type": "string"
}
},
"required": [
"text"
],
"type": "object"
},
"name": "get_time_report"
}
]