Clockify MCP Server
Integrates with Clockify time tracking API to retrieve user information, manage projects, and log time entries with flexible time specifications across workspaces.
README
Clockify MCP Server
A modular Model Context Protocol (MCP) server for integrating with the Clockify time tracking API.
Installation
From npm (Recommended)
npm install -g clockify-mcp-server
From Source
git clone https://github.com/yourusername/clockify-mcp-server.git
cd clockify-mcp-server
npm install
Features
This MCP server provides three tools:
- iam - Get current user information from Clockify API
- getAllProjects - Get all projects for a specific workspace
- logTimeEntry - Log time entries with flexible time specifications
Architecture
The server is built with a modular architecture:
src/server.js- Main server class withregisterToolinterfacesrc/api.js- Shared API utilities for Clockify requestssrc/tools/- Individual tool modules with Zod schema validationindex.js- Entry point that registers all tools
Setup
1. Set Environment Variables
Create a .env file or set the environment variable with your Clockify API key:
export CLOCKIFY_API_KEY=your_api_key_here
You can get your API key from Clockify Settings > API.
2. Run the Server
If installed globally:
clockify-mcp-server
If running from source:
npm start
Or for development with auto-restart:
npm run dev
Usage in MCP Clients
After installing, you can configure your MCP client to use this server. For example, in Claude Desktop:
{
"mcpServers": {
"clockify": {
"command": "clockify-mcp-server",
"env": {
"CLOCKIFY_API_KEY": "your_api_key_here"
}
}
}
}
Tools
iam
Get current user information from Clockify API.
Parameters: None
Example:
{
"name": "iam"
}
getAllProjects
Get all projects for a specific workspace.
Parameters:
workspaceId(string, required): The workspace ID to get projects for
Example:
{
"name": "getAllProjects",
"arguments": {
"workspaceId": "60c1beaf8747147d9ac70b4b"
}
}
logTimeEntry
Log a time entry in Clockify.
Parameters:
date(string, required): Date for the time entry in YYYY-MM-DD formatdescription(string, required): Description of the work performedprojectId(string, required): ID of the project to log time againstworkspaceId(string, required): ID of the workspacestartTime(string, optional): Start time in HH:MM format (defaults to "09:00")endTime(string, optional): End time in HH:MM format (defaults to "17:00")
Example:
{
"name": "logTimeEntry",
"arguments": {
"date": "2024-01-15",
"description": "Working on project documentation",
"projectId": "662f81c0b682f06d79bff487",
"workspaceId": "60c1beaf8747147d9ac70b4b",
"startTime": "09:30",
"endTime": "12:30"
}
}
Getting Workspace and Project IDs
- Use the
iamtool to get your user information and available workspaces - Use the
getAllProjectstool with a workspace ID to get project IDs - Use these IDs in the
logTimeEntrytool
Error Handling
The server includes comprehensive error handling for:
- Missing or invalid API keys
- Invalid date/time formats
- Missing required parameters
- API request failures
- Time validation (end time must be after start time)
All errors are returned with descriptive messages to help troubleshoot issues.
Development
Adding New Tools
The server uses a clean registerTool interface. To add a new tool:
- Create a new file in
src/tools/with your tool definition:
import { z } from "zod";
import { makeApiRequest } from "../api.js";
export const myNewTool = {
name: "myNewTool",
config: {
title: "My New Tool",
description: "Description of what the tool does",
inputSchema: z.object({
param1: z.string().describe("Description of param1"),
param2: z.number().optional().describe("Optional param2")
})
},
handler: async ({ param1, param2 }) => {
// Your tool logic here
const result = await makeApiRequest("/some-endpoint");
return {
content: [{
type: "text",
text: JSON.stringify(result, null, 2)
}]
};
}
};
- Export it from
src/tools/index.js - Register it in
index.js:
server.registerTool(
myNewTool.name,
myNewTool.config,
myNewTool.handler
);
The server automatically handles:
- Zod schema validation
- JSON schema conversion for MCP
- Error handling and formatting
- Tool registration and discovery
Publishing
To publish updates to npm:
- Update the version in
package.json - Run
npm publish
License
MIT
Requirements
- Node.js 18.0.0 or higher
- Clockify API key
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.