@leonai/clockify-mcp-server
v1.0.0
Published
Secure Clockify MCP server with HTTP + stdio transport. Wraps clockify-master-mcp with security fixes (SSRF protection, stdout fix, API key sanitization).
Maintainers
Readme
@leonai/clockify-mcp-server
Secure Clockify MCP server with dual transport (stdio + HTTP).
Wraps @hongkongkiwi/clockify-master-mcp (38 tools) with security hardening and remote deployment support.
Security Fixes
| Severity | Issue | Fix |
|----------|-------|-----|
| CRITICAL | dotenv v17 writes to stdout, corrupts MCP stdio protocol | console.log redirected to stderr before any imports |
| HIGH | SSRF via unconstrained CLOCKIFY_API_URL env var | Hostname allowlist: only *.clockify.me over HTTPS |
| MEDIUM | API key leaks into stderr logs via axios error objects | Header sanitization strips X-Api-Key before logging |
| MEDIUM | Read-only mode bypass (archive_project, stop_timer) | Extended write-tool prefix list patched into middleware |
Quick Start
Local (stdio) — Claude Desktop
{
"mcpServers": {
"clockify": {
"command": "npx",
"args": ["-y", "@leonai/clockify-mcp-server"],
"env": {
"CLOCKIFY_API_KEY": "your_api_key_here"
}
}
}
}Remote (HTTP) — Hosted Server
CLOCKIFY_API_KEY=your_key TRANSPORT=http PORT=3000 npx @leonai/clockify-mcp-serverThen connect from any MCP client:
POST https://your-server.com/mcpDocker
FROM node:22-slim
RUN npm install -g @leonai/clockify-mcp-server
ENV TRANSPORT=http
ENV PORT=3000
EXPOSE 3000
CMD ["clockify-mcp-server"]Configuration
All env vars from the upstream package are supported:
| Env Var | Description | Default |
|---------|-------------|---------|
| CLOCKIFY_API_KEY | Required. Your Clockify API key | — |
| TRANSPORT | stdio or http | stdio |
| PORT | HTTP port (when TRANSPORT=http) | 3000 |
| READ_ONLY | Prevent all write operations | false |
| ALLOWED_PROJECTS | Comma-separated project IDs to restrict access | all |
| ENABLED_TOOL_CATEGORIES | user,workspace,project,timeEntry,report,client,tag,task,bulk,search | first 5 |
| MAX_TOOLS | Limit total exposed tools | 50 |
| ALLOW_TIME_ENTRY_DELETION | Allow deleting time entries | true |
| ALLOW_FUTURE_TIME_ENTRIES | Allow future-dated entries | false |
Endpoints (HTTP mode)
| Method | Path | Description |
|--------|------|-------------|
| POST | /mcp | MCP Streamable HTTP endpoint |
| GET | /mcp | SSE stream (with session ID) |
| DELETE | /mcp | Close session |
| GET | /health | Health check |
License
MIT
