Anthropic

ClockMe + Claude Code

Claude Code is Anthropic's official CLI for agentic coding. ClockMe integrates with Claude Code at the hook level — not just as an MCP tool you have to ask, but as an automatic timer that fires the moment a session opens. Add one JSON block to your settings file and every Claude Code session on every project is tracked without a single manual action.

Get started free →Setup guide ↓
What gets automated

Want your key pre-filled?

Sign in to ClockMe and use the setup wizard — it generates the exact config with your real API key and project ID already embedded.

Open setup wizard →
60-second setup

How to connect Claude Code

01
Create a ClockMe account
Sign up at clockme.co. Free for individuals — no credit card needed.
02
Generate an API key
Go to Settings, then API Keys, click Generate, give it the label Claude Code, and copy the key. It is shown once. Or use the setup wizard in your dashboard to get a personalized config with your real key pre-filled.
03
Paste the config
Open ~/.claude/settings.json (create it if it does not exist). Paste the config snippet, replacing ck_live_YOUR_KEY with your key. Requires curl — built into macOS and Linux; install via winget on Windows.
04
Open a session — that's it
The hook auto-matches the working directory name to a ClockMe project (e.g. 'my-client-app' matches 'My Client App') and creates a new project named after the folder if there's no match — so every repo is tracked with zero per-project setup. Edit the new project's billing rate in the web app later.
~/.claude/settings.jsonJSON
{
  "mcpServers": {
    "clockme": {
      "type": "http",
      "url": "https://clockme.co/api/mcp",
      "headers": {
        "Authorization": "Bearer ck_live_YOUR_KEY"
      }
    }
  },
  "hooks": {
    "SessionStart": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "curl -sf --max-time 10 -X POST https://clockme.co/api/timer/start -H 'Authorization: Bearer ck_live_YOUR_KEY' -H 'Content-Type: application/json' -d \"{\\\"projectName\\\":\\\"$(basename \"$CLAUDE_PROJECT_DIR\")\\\",\\\"autoCreate\\\":true,\\\"source\\\":\\\"hook\\\",\\\"description\\\":\\\"Claude Code session\\\"}\" > /dev/null",
            "shell": "bash"
          }
        ]
      }
    ],
    "SessionEnd": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "curl -sf --max-time 10 -X POST https://clockme.co/api/timer/stop -H 'Authorization: Bearer ck_live_YOUR_KEY' -H 'Content-Type: application/json' -d \"{\\\"projectName\\\":\\\"$(basename \"$CLAUDE_PROJECT_DIR\")\\\"}\" > /dev/null",
            "shell": "bash"
          }
        ]
      }
    ],
    "UserPromptSubmit": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "curl -sf --max-time 10 -X POST https://clockme.co/api/timer/heartbeat -H 'Authorization: Bearer ck_live_YOUR_KEY' -H 'Content-Type: application/json' -d '{}' > /dev/null",
            "shell": "bash"
          }
        ]
      }
    ]
  }
}
Natural language commands

Ask in plain English

You: How many hours have I logged on GlobalTech this week?
ClockMe: 3.4 billable hours on GlobalTech this week (Mon-Sun), $340 at $100/hr.
You: Start a timer on the Acme website project
ClockMe: Timer started on Acme website. Running now.
You: What am I working on right now?
ClockMe: Active timer: GlobalTech API (running 47 min). No other timers active.
You: Stop all timers
ClockMe: Stopped: GlobalTech API (1h 12m). All timers stopped.
FAQ

Claude Code integration questions

Does ClockMe work with Claude Code on Windows?

Yes. The MCP server uses a standard HTTP transport that works identically on Windows, macOS, and Linux. The ~/.claude/settings.json path becomes %USERPROFILE%\.claude\settings.json on Windows.

The timer isn't starting when I open a session — how do I debug it?

Run claude --debug-file hooks.log and check the log for hook errors. The most common cause on Windows: Claude Code runs hooks through Git Bash and only finds it in C:\Program Files\Git — if your Git lives elsewhere, every hook fails silently with 'Git Bash was not found'. Fix it by setting the CLAUDE_CODE_GIT_BASH_PATH environment variable to your bash.exe location (setx CLAUDE_CODE_GIT_BASH_PATH "D:\Tools\Git\bin\bash.exe").

Can I track different projects in different Claude Code sessions?

Yes. You can run one timer per project simultaneously. Start a timer for Client A in one session and a timer for Client B in another — both run in parallel and are tracked separately.

What happens if I forget to stop the timer?

ClockMe's idle detection will prompt you to keep, discard, or stop the idle time when you return to your computer. You can also ask Claude to stop all timers any time.

Will ClockMe see my code or conversation history?

No. ClockMe only receives the tool calls Claude makes via MCP — start timer, stop timer, query hours. It never receives any of your code, prompts, or session content.

More integrations
Cursor
Ask Cursor to start the clock. Or let it happen automatically.
Windsurf
Tell Cascade to track your time. It just works.
GitHub Copilot
VS Code Copilot Chat now has MCP. ClockMe plugs right in.
GitHub
Use ClockMe while you work on GitHub issues — then let the native integration handle the rest.
Linear
Track time on Linear issues without leaving your AI coding tool.
Notion
Keep Notion for planning. Use ClockMe for the hours that get billed.
Zapier
Automate your time tracking workflows with ClockMe's REST API — native Zapier app coming soon.
Slack
Start and stop timers from Slack — timer commands and daily summaries coming as a native app.
Gemini CLI
Google's terminal AI + ClockMe. Track time without leaving the shell.

Start tracking with Claude Code

Free for individuals. 60-second setup.

Create free account →