Gives Claude Code real-time awareness of your system time — permanently.
Claude Code has zero time awareness by default. You send a message at 12pm, go for lunch, come back at 3pm and type something — Claude still thinks it's 12pm. It has no idea how long you were gone.
Claude Clock fixes this completely.
Three components work together:
A lightweight server that exposes your system clock to Claude Code as callable tools:
get_current_time— returns exact current time, date, timezoneget_time_elapsed— calculates how long since a given timestampget_session_info— returns when the session started and how long it's been running
Fires once when Claude Code starts or resumes. Immediately injects the current time into Claude's context, so it knows what time it is before you even type anything.
Fires on every message you send. Appends an exact timestamp to your message context. This is what makes it know you came back at 3pm — the moment you type, it stamps the time.
- macOS or Linux (Windows users: run inside WSL)
- Node.js on your
PATH - Claude Code installed (
claudeCLI available) jq(optional, but recommended — used to safely merge hooks into an existing~/.claude/settings.json)
git clone https://github.com/francis-codex/claude-clock.git
cd claude-clock
bash setup.shThat's it. One command. The script is idempotent — safe to re-run.
claude mcp add claude-clock -s user -- node "$HOME/.claude-clock/server.js"Open Claude Code and ask:
- "What time is it?"
- "How long has this session been running?"
- "What time did I send my last message?"
~/.claude-clock/
├── server.js # MCP server
└── hooks/
├── session-start.js # SessionStart hook
└── user-prompt-submit.js # UserPromptSubmit hook
~/.claude/
└── settings.json # Hook configuration (points to above)
Claude Code MCP registration is stored internally by Claude Code when you run claude mcp add.