A local MCP (Model Context Protocol) server that lets you manage your Clockify timesheets directly from any AI assistant that supports the protocol — add entries, remove entries, browse projects, and more.
- Features
- Prerequisites
- Installation
- Configuration
- Available Tools
- Usage Examples
- Project Structure
- Development
- Troubleshooting
- License
- Add time entries — Log hours to any project with description, start/end times, and optional billing flag.
- Delete time entries — Remove incorrect or duplicate entries by ID.
- Browse timesheets — Query your time entries with optional date-range filters.
- List workspaces & projects — Discover available workspaces and their active projects.
- Identify yourself — Retrieve your user ID and default workspace in one call.
- Stdio transport — Runs locally as a child process; no HTTP server or open ports needed.
- Node.js ≥ 18 (uses native
fetch) - npm ≥ 9
- A Clockify account with an API key
# 1. Clone or navigate to this directory
cd /path/to/ClokifyMCP # macOS / Linux
cd C:\path\to\ClokifyMCP # Windows
# 2. Install dependencies
npm install
# 3. Build the TypeScript source
npm run buildThe compiled server is output to dist/index.js.
Note: In the configuration examples below, replace
/path/to/ClokifyMCP(macOS/Linux) orC:\\path\\to\\ClokifyMCP(Windows) with the actual absolute path where you cloned this repository.
- Log in to Clockify.
- Go to Profile Settings → Advanced (direct link).
- Click Generate to create a new API key.
- Copy the key — you will provide it as the
CLOCKIFY_API_KEYenvironment variable.
Edit the MCP config file for your platform:
| Platform | Config file path |
|---|---|
| macOS / Linux | ~/.codeium/windsurf/mcp_config.json |
| Windows | %USERPROFILE%\.codeium\windsurf\mcp_config.json |
macOS / Linux:
{
"mcpServers": {
"clockify": {
"command": "node",
"args": ["/path/to/ClokifyMCP/dist/index.js"],
"env": {
"CLOCKIFY_API_KEY": "your-api-key-here"
}
}
}
}Windows:
{
"mcpServers": {
"clockify": {
"command": "node",
"args": ["C:\\path\\to\\ClokifyMCP\\dist\\index.js"],
"env": {
"CLOCKIFY_API_KEY": "your-api-key-here"
}
}
}
}Restart Windsurf after saving.
Edit the config file for your platform:
| Platform | Config file path |
|---|---|
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
macOS / Linux:
{
"mcpServers": {
"clockify": {
"command": "node",
"args": ["/path/to/ClokifyMCP/dist/index.js"],
"env": {
"CLOCKIFY_API_KEY": "your-api-key-here"
}
}
}
}Windows:
{
"mcpServers": {
"clockify": {
"command": "node",
"args": ["C:\\path\\to\\ClokifyMCP\\dist\\index.js"],
"env": {
"CLOCKIFY_API_KEY": "your-api-key-here"
}
}
}
}Edit .cursor/mcp.json in your project root or global config:
macOS / Linux:
{
"mcpServers": {
"clockify": {
"command": "node",
"args": ["/path/to/ClokifyMCP/dist/index.js"],
"env": {
"CLOCKIFY_API_KEY": "your-api-key-here"
}
}
}
}Windows:
{
"mcpServers": {
"clockify": {
"command": "node",
"args": ["C:\\path\\to\\ClokifyMCP\\dist\\index.js"],
"env": {
"CLOCKIFY_API_KEY": "your-api-key-here"
}
}
}
}Any MCP-compatible client that supports stdio transport can use this server. The configuration pattern is always the same:
| Setting | macOS / Linux | Windows |
|---|---|---|
| Command | node |
node |
| Args | ["/path/to/ClokifyMCP/dist/index.js"] |
["C:\\path\\to\\ClokifyMCP\\dist\\index.js"] |
| Env | CLOCKIFY_API_KEY=<your-key> |
CLOCKIFY_API_KEY=<your-key> |
Returns the authenticated Clockify user profile.
| Parameter | Type | Required | Description |
|---|---|---|---|
| (none) | — | — | No parameters needed |
Response fields: id, name, email, activeWorkspace, defaultWorkspace
Use this first to obtain your userId and activeWorkspace — both are required by other tools.
Lists all workspaces the user has access to.
| Parameter | Type | Required | Description |
|---|---|---|---|
| (none) | — | — | No parameters needed |
Response fields per workspace: id, name
Lists all active (non-archived) projects in a workspace.
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId |
string |
Yes | The workspace ID |
Response fields per project: id, name, clientName, color, archived
Fetches time entries for a specific user in a workspace, with optional date filtering.
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId |
string |
Yes | The workspace ID |
userId |
string |
Yes | The user ID (from get_current_user) |
start |
string |
No | Start date in ISO 8601 (e.g. 2025-03-01T00:00:00Z) |
end |
string |
No | End date in ISO 8601 (e.g. 2025-03-31T23:59:59Z) |
Response fields per entry: id, description, projectId, timeInterval (start, end, duration), billable, taskId, tagIds
Returns up to 50 entries per call, ordered newest-first.
Creates a new time entry on the workspace timesheet.
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId |
string |
Yes | The workspace ID |
start |
string |
Yes | Start time in ISO 8601 (e.g. 2025-03-28T09:00:00Z) |
end |
string |
No | End time in ISO 8601. Omit to start a running timer. |
description |
string |
No | Description of the work performed |
projectId |
string |
No | Project ID to assign the entry to |
billable |
boolean |
No | Whether the entry is billable (default: false) |
taskId |
string |
No | Task ID within the project |
tagIds |
string[] |
No | Array of tag IDs to attach |
Returns: The newly created time entry object.
Deletes a time entry from the workspace timesheet.
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId |
string |
Yes | The workspace ID |
timeEntryId |
string |
Yes | The ID of the time entry to delete |
Returns: Confirmation message on success.
Below are natural-language prompts you can give your AI assistant once the MCP server is connected:
"Get my Clockify user info"
"Show me all the projects in my Clockify workspace"
"Add a time entry for today from 9am to 5pm on project X with description 'Sprint planning'"
"Show me all my time entries from this week"
"Delete time entry abc123 from my workspace"
"Log 8 hours today on the Accelya project: 9am–12pm 'Backend API development', 1pm–5pm 'Code review and testing'"
ClokifyMCP/
├── src/
│ ├── index.ts # MCP server — tool definitions & stdio transport
│ └── clockify-client.ts # Typed HTTP client for the Clockify REST API v1
├── dist/ # Compiled JavaScript output (after build)
├── package.json
├── tsconfig.json
├── .gitignore
└── README.md
┌──────────────┐ stdio ┌──────────────────┐ HTTPS ┌───────────────┐
│ MCP Client │◄─────────►│ MCP Server │──────────►│ Clockify API │
│ (Windsurf, │ │ (src/index.ts) │ │ api.clockify │
│ Claude…) │ │ │ │ .me/api/v1 │
└──────────────┘ │ ClockifyClient │ └───────────────┘
│ (clockify- │
│ client.ts) │
└──────────────────┘
- Transport: stdio (JSON-RPC over stdin/stdout)
- Auth: Clockify API key passed via
CLOCKIFY_API_KEYenvironment variable - API base URL:
https://api.clockify.me/api/v1
macOS / Linux (bash/zsh):
CLOCKIFY_API_KEY=your-key npm run devWindows (PowerShell):
$env:CLOCKIFY_API_KEY="your-key"; npm run devWindows (Command Prompt):
set CLOCKIFY_API_KEY=your-key && npm run devnpm run buildmacOS / Linux (bash/zsh):
CLOCKIFY_API_KEY=your-key npm startWindows (PowerShell):
$env:CLOCKIFY_API_KEY="your-key"; npm startWindows (Command Prompt):
set CLOCKIFY_API_KEY=your-key && npm start| Script | Command | Description |
|---|---|---|
build |
tsc |
Compile TypeScript to dist/ |
start |
node dist/index.js |
Run the compiled server |
dev |
tsx src/index.ts |
Run directly from TypeScript (no build needed) |
| Package | Purpose |
|---|---|
@modelcontextprotocol/sdk |
MCP server framework + Zod for tool schemas |
typescript |
TypeScript compiler (dev) |
tsx |
TypeScript runner for development (dev) |
@types/node |
Node.js type definitions (dev) |
The server requires the CLOCKIFY_API_KEY env var. Make sure it is set in your MCP client configuration under the "env" block.
Your API key is invalid or expired. Generate a new one from Clockify Settings.
You don't have permission to perform this action in the workspace. Check your Clockify role and workspace access.
The workspace ID, project ID, user ID, or time entry ID you provided does not exist. Use get_current_user and get_workspaces to discover valid IDs.
- Verify the
dist/index.jsfile exists (runnpm run buildif not). - Check the path in your MCP config is absolute and correct.
- Restart your MCP client after editing the config file.
Run npm install to ensure all dependencies are installed, then npm run build.
MIT