Skip to main content
Glama

keeping-mcp

CI

Open-source Model Context Protocol (MCP) server that exposes the Keeping (api.keeping.nl) time-tracking API as tools an AI coding assistant can call. Built for solo developers who use Claude Code (or any MCP-capable client) and want their billable hours logged into Keeping at the end of a session instead of typed in by hand, while keeping Keeping's existing native Jortt invoicing integration intact. Every write tool is dry-run by default — your hours never reach Keeping until you explicitly confirm.

⚠ Writes are dry-run BY DEFAULT

Every write tool (keeping_add_entry, keeping_update_entry, keeping_delete_entry, keeping_start_timer, keeping_stop_timer, keeping_resume_timer) returns a preview unless you pass confirm: true in the tool call.

Setting KEEPING_REQUIRE_CONFIRM=false in your environment disables this gate. Writes then happen on the first call — there is no second chance.

Recommendation: never disable this gate unless you are running the server in a non-interactive automation context and have explicitly accepted the loss of the confirmation step.

Related MCP server: WorkTracker MCP Server

Install

From npm

No install required — npx fetches the package on first run:

KEEPING_TOKEN=kp_live_your_token_here npx -y keeping-mcp

The server speaks the MCP stdio protocol and stays in the foreground waiting for JSON-RPC frames on stdin — exit with Ctrl+C. In practice you do not run it by hand; an MCP-capable client (Claude Code, Claude Desktop, Cursor, etc.) spawns it for you using the config snippets below.

Optional — install globally so keeping-mcp is on your PATH:

npm install -g keeping-mcp
KEEPING_TOKEN=kp_live_your_token_here keeping-mcp

Requires Node.js >=22. The package is published to npmjs.com/package/keeping-mcp with sigstore provenance attestations.

Claude Code on Windows 11

Add to %APPDATA%\Claude\claude_desktop_config.json or to your project's .mcp.json file.

{
  "mcpServers": {
    "keeping-mcp": {
      "command": "cmd",
      "args": ["/c", "npx", "-y", "keeping-mcp"],
      "env": {
        "KEEPING_TOKEN": "kp_live_your_token_here"
      }
    }
  }
}

The cmd /c wrapper is required on Windows — npx resolves to npx.cmd, and Claude Code's process spawn does not search PATHEXT extensions (see anthropics/claude-code#58510).

Claude Code on macOS / Linux

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or ~/.config/Claude/claude_desktop_config.json (Linux), or your project's .mcp.json.

{
  "mcpServers": {
    "keeping-mcp": {
      "command": "npx",
      "args": ["-y", "keeping-mcp"],
      "env": {
        "KEEPING_TOKEN": "kp_live_your_token_here"
      }
    }
  }
}

Other MCP clients

Any MCP-capable client that supports the stdio transport works. The server is started by npx -y keeping-mcp and reads KEEPING_TOKEN from its environment. Discoverable in the MCP Registry as io.github.Red-Square-Software/keeping-mcp.

Get a Keeping access token

  1. Sign in to your Keeping account.

  2. Open Preferences (top-right menu).

  3. Find the section Show features for developers and enable it.

  4. A new Personal access tokens section appears.

  5. Click Generate new token, name it (e.g. "Claude Code"), and copy the value.

  6. Store it as KEEPING_TOKEN in your shell environment OR in your Claude Code config env block.

The token has full read+write access to your time entries — treat it like a password. Never commit it to git, never paste it into a chat, never read it back from a tool response (keeping-mcp never echoes it).

Configuration

Variable

Required

Default

Purpose

KEEPING_TOKEN

yes

—

Keeping personal access token (created via the section above).

KEEPING_REQUIRE_CONFIRM

no

true

When true, write tools return a preview unless called with confirm: true. Setting to false disables the gate entirely — see warning below.

KEEPING_ORG_ID

no

—

Pin all calls to one organisation id. When unset and the token has access to multiple orgs, write tools require explicit organisation_id input per call.

KEEPING_LOG_LEVEL

no

info

Server stderr log verbosity. Accepts: debug, info, warn, error.

⚠ Writes are dry-run BY DEFAULT

Every write tool (keeping_add_entry, keeping_update_entry, keeping_delete_entry, keeping_start_timer, keeping_stop_timer, keeping_resume_timer) returns a preview unless you pass confirm: true in the tool call.

Setting KEEPING_REQUIRE_CONFIRM=false in your environment disables this gate. Writes then happen on the first call — there is no second chance.

Recommendation: never disable this gate unless you are running the server in a non-interactive automation context and have explicitly accepted the loss of the confirmation step.

Tools

keeping-mcp registers 12 tools when the server starts. Read tools (keeping_me, keeping_organisations, keeping_projects, keeping_tasks, keeping_list_entries, keeping_timer_status) call Keeping's API without confirmation. Write tools (keeping_add_entry, keeping_update_entry, keeping_delete_entry, keeping_start_timer, keeping_stop_timer, keeping_resume_timer) return a dry-run preview unless invoked with confirm: true (default behavior controlled by KEEPING_REQUIRE_CONFIRM).

Dry-run workflow (example transcript)

Write tools follow a two-step pattern: propose-then-confirm. The first call returns a preview of the HTTP request the server would send; the second call (with confirm: true) actually sends it.

Step 1 — preview (no confirm, no API call made). Illustrative; actual field names match Keeping's OpenAPI (see https://developer.keeping.nl).

{
  "tool": "keeping_add_entry",
  "input": {
    "description": "Phase 4 release prep",
    "hours": 1.5,
    "project_id": 123
  },
  "response": {
    "would_post": {
      "method": "POST",
      "url": "https://api.keeping.nl/v1/456/time-entries",
      "body": {
        "description": "Phase 4 release prep",
        "hours": 1.5,
        "project_id": 123,
        "date": "2026-06-12",
        "purpose": "work"
      }
    }
  }
}

Step 2 — confirm (confirm: true added, request is sent to Keeping). Illustrative; actual response shape mirrors Keeping's OpenAPI.

{
  "tool": "keeping_add_entry",
  "input": {
    "description": "Phase 4 release prep",
    "hours": 1.5,
    "project_id": 123,
    "confirm": true
  },
  "response": {
    "id": 98765,
    "day": "2026-06-12",
    "hours": 1.5,
    "description": "Phase 4 release prep",
    "project_id": 123,
    "purpose": "work"
  }
}

Verifying provenance

Releases are published via GitHub Actions OIDC trusted publishing (no long-lived npm tokens). Every release carries an npm provenance attestation linking the published tarball to a specific commit in this repository.

npm audit signatures
# or, for a single package:
npm view keeping-mcp --json | jq '.dist.attestations'

Local development

git clone https://github.com/red-square-software/keeping-mcp.git
cd keeping-mcp
npm ci
npm test
npm run build
KEEPING_TOKEN=kp_live_your_token_here node dist/bin/keeping-mcp.js

All server output goes to stderr — stdout is reserved for MCP JSON-RPC framing. Never write diagnostic output to stdout; use console.error for logging.

License

MIT — see LICENSE.

Available Tools

12 tools
keeping_add_entryCreate a time entryA
Destructive

Create a new time entry. DRY-RUN BY DEFAULT — call without confirm first to receive a would_post preview; call again with confirm: true ONLY after a human reviewed the preview. Body shape depends on the organisation's timesheet mode: 'times' mode requires start/end (HH:mm in org timezone); 'hours' mode requires a decimal hours value. Purpose defaults to 'work'. The date defaults to today in Europe/Amsterdam.

Inputs: end, date, note, hours, +8 more.

keeping_delete_entryDelete a time entryA
Destructive

DESTRUCTIVE: permanently deletes the entry — cannot be undone. Owns the dry-run gate: without confirm: true, the tool fetches the entry and returns a would_delete preview so a human can verify the right entry is targeted. Only call with confirm: true after a human reviewed the preview.

Inputs: entry_id (required), confirm, organisation_id.

keeping_list_entriesList time entriesA
Read-onlyIdempotent

Returns time entries for a date range. Wire shape preserved exactly as returned by the Keeping API — no field renaming — so this tool doubles as schema discovery for Phase 3 write tools. Dates are calendar dates in YYYY-MM-DD; not UTC timestamps. Single-day calls hit GET /{orgId}/time-entries?date=...; multi-day ranges hit GET /{orgId}/report/time-entries?from=...&to=....

Inputs: from (required), to, limit, user_id, +1 more.

keeping_meWho am IA
Read-onlyIdempotent

Returns the authenticated user (id, first_name, surname, code, role, state) wrapped under a user key, plus the resolved organisation_id. Identity is cached for the server's lifetime. Pass the optional organisation_id input to override the KEEPING_ORG_ID default; required when the token has access to multiple organisations.

Inputs: organisation_id.

keeping_organisationsList organisationsA
Read-onlyIdempotent

Returns the list of organisations the token can access. Each organisation includes feature flags (projects, tasks, timesheet_mode) verbatim from the API. Cached for the server's lifetime.

Inputs: no named parameters.

keeping_projectsList projectsA
Read-onlyIdempotent

Returns the list of projects available for the selected organisation. If the projects feature is disabled for the organisation, returns a human-readable note instead of an error. Not cached — fresh per call.

Inputs: organisation_id.

keeping_resume_timerResume a stopped timerA
Destructive

Resume a previously-stopped time entry as an ongoing timer. Implemented as POST /{orgId}/time-entries/{entry_id}/resume. Returns the resumed entry plus server_time_ms — the millisecond-precision server timestamp captured from the X-Server-Time-Ms response header (TIMER-02). When the header is missing or unparseable, server_time_ms falls back to the local clock and a warning is logged to stderr. NOTE: Keeping may return a different time_entry.id than the input entry_id — when the original entry's date is no longer 'today', Keeping creates a NEW ongoing entry rather than modifying the old one. Always read time_entry.id from the response; do not assume it matches your input. Cannot resume locked entries (returns a 403 error). DRY-RUN BY DEFAULT — call without confirm first to receive a would_post preview; call again with confirm: true ONLY after a human reviewed the preview.

Inputs: entry_id (required), confirm, organisation_id.

keeping_start_timerStart a running timerA
Destructive

Start a new ongoing time entry (a running timer). Implemented as POST /{orgId}/time-entries with start set and NO end / NO hours — Keeping interprets the omission of end as 'this entry is ongoing'. Returns { timer_id } on success; use this id with keeping_stop_timer or keeping_resume_timer. DRY-RUN BY DEFAULT — call without confirm first to receive a would_post preview; call again with confirm: true ONLY after a human reviewed the preview. start defaults to the current time in Europe/Amsterdam; purpose defaults to 'work'.

Inputs: note, start, confirm, purpose, +3 more.

keeping_stop_timerStop a running timerA
Destructive

Stop an ongoing time entry (running timer) by setting its end. Implemented as PATCH /{orgId}/time-entries/{entry_id}/stop. Returns the updated entry plus server_time_ms — the millisecond-precision server timestamp captured from the X-Server-Time-Ms response header (TIMER-02). When the header is missing or unparseable, server_time_ms falls back to the local clock and a warning is logged to stderr. DRY-RUN BY DEFAULT — call without confirm first to receive a would_post preview; call again with confirm: true ONLY after a human reviewed the preview.

Inputs: entry_id (required), confirm, organisation_id.

keeping_tasksList tasksA
Read-onlyIdempotent

Returns the list of tasks available for the selected organisation. If the tasks feature is disabled for the organisation, returns a human-readable note instead of an error. Not cached — fresh per call.

Inputs: organisation_id.

keeping_timer_statusTimer status (read-only)A
Read-onlyIdempotent

Returns the most recent time entry for the authenticated user plus a derived is_running boolean indicating whether a Keeping timer is currently running. Read-only; no API mutation. Use this to decide whether keeping_stop_timer (running timer → stop) or keeping_resume_timer (stopped entry → resume) is the appropriate next call (both ship in Phase 3).

Inputs: organisation_id.

keeping_update_entryUpdate a time entryA
Destructive

Edit an existing time entry owned by the authenticated user. PATCH semantics — only the fields you supply are updated. DRY-RUN BY DEFAULT — call without confirm first to receive a would_post preview; call again with confirm: true ONLY after a human reviewed the preview. NOTE: date, purpose, and user_id are immutable in Keeping; this tool does not accept them.

Inputs: entry_id (required), end, note, hours, +7 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 12 tools

    Disambiguation4/5

    Most tools map to a distinct resource or action, but there is some overlap: keeping_add_entry and keeping_start_timer both create time entries, and keeping_timer_status overlaps with keeping_list_entries as a read surface. The detailed descriptions and dry-run gates help an agent disambiguate, but the boundaries are slightly fuzzy.

    Naming Consistency4/5

    All tools share a keeping_ prefix and use snake_case, with clear action_object names like add_entry, delete_entry, and stop_timer. The main inconsistency is that resource listers are split between noun-only names (keeping_organisations, keeping_projects, keeping_tasks) and verb-based names (keeping_list_entries), while keeping_timer_status is neither a verb pattern nor a simple resource name.

    Tool Count5/5

    12 tools is well within the target range and maps cleanly to the server's purpose: identity and org context, resource lookups, time-entry CRUD, and timer lifecycle. Each tool has a clear role, with no obvious filler or redundant duplicates.

    Completeness5/5

    The tool surface covers the core Keeping workflows: list/create/update/delete time entries, start/stop/resume timers, and resolve org/project/task context. It also handles feature-fag disables and provides dry-run previews for destuctive and mutating operations, so agents do not hit dead ends. Missing write access to projects/tasks is not an obvious gap for a time-tracking MCP server.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers