Tempo Timesheet MCP Server
Tempo Timesheet MCP Server gives agents read-first access to Tempo worklogs and Jira issues, plus a gated preview→approval→write flow for creating or updating worklogs.
Retrieve Tempo worklogs in an inclusive date range, optionally scoped to a specific account.
Fetch one Tempo worklog by ID.
Generate a weekly Monday–Sunday summary of recorded worklogs by day and issue.
Search Jira issues using JQL, project key, and/or free text.
Validate proposed worklogs and check for possible duplicates with confidence scores.
Preview create/update proposals without writing and receive an approval token when valid.
Create or update worklogs only when writes are enabled,
confirm: trueis set, and the exact payload has an approval token.Report uncertain write outcomes for verification instead of retrying automatically.
No delete tool is available.
Authenticates against Atlassian Cloud (Jira REST API v3) using an Atlassian account email and API token to look up issue keys for Tempo worklogs and enrich timesheet summaries.
Searches Jira Cloud issues via JQL using the enhanced search API, and resolves Tempo's numeric issue ids to human-readable issue keys; also used to supply issue keys when logging worklogs.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Tempo Timesheet MCP Server summarize my Tempo worklogs for this week by day and issue"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Tempo Timesheet MCP Server
A local MCP server (stdio) that gives coding agents such as OpenCode or Claude Code safe, read-first access to Tempo Timesheets (REST API v4) and Jira Cloud (REST API v3): summarize logged work, detect duplicates, and — only through an explicit preview → approval → write pipeline — create or update worklogs.
Read-only by default. Writes are triple-gated:
WORKLOG_WRITE_ENABLED=trueand a single-use payload-bound approval token andconfirm: true. There is no delete tool.
How it works
┌─────────────────────┐ MCP over stdio ┌──────────────────────┐ REST API v4 ┌────────────────────┐
│ Coding agent │◄───────────────────►│ s-tempo-worklog-mcp │ ───────────────►│ Tempo Timesheets │
│ (OpenCode, Claude │ 9 tools (JSON) │ (this MCP server) │ │ (v4) │
│ Code, any client) │ │ validate · approve │ ───────────────►├────────────────────┤
└─────────────────────┘ │ write │ REST API v3 │ Jira Cloud │
▲ └──────────┬───────────┘ │ (v3) │
│ /tempo-today /tempo-week /tempo-log │ └────────────────────┘
│ (OpenCode slash commands) │ all credentials stay local
└──────────────────────────────────────────────┘ (env vars / .env)You (or your agent) issue commands in the CLI — natural language or the bundled slash commands.
The agent calls this MCP server over stdio; the server owns validation, duplicate detection, and the approval pipeline.
The server talks only to the Tempo v4 and (optionally) Jira v3 REST APIs. Credentials never leave your machine; the server is stdio-only.
The write pipeline (triple-gated)
preview ──► user approval ──► write (confirm + single-use token) ──► verifytempo_preview_worklogvalidates the proposal, runs duplicate detection, and issues an approval token bound to the SHA-256 of the payload.You review and approve. Any change to the payload invalidates the token.
The write tool requires
WORKLOG_WRITE_ENABLED=true, the token, and an explicitconfirm: true. Tokens are single-use — a replayed approval cannot create a second identical worklog. Timed-out writes returnUNCERTAIN_OUTCOMEand are never retried by the server.
Related MCP server: 7Pace-Connector
Tools (9)
Tool | Kind | Description |
| read | Worklogs in a date range; scoped to your own account by default |
| read | One worklog by id |
| read | Week (Mon–Sun) aggregated by day and issue |
| read | Jira search via JQL (enhanced search API) |
| preview | Validate + duplicate-check a create/update; returns an approval token. Never writes |
| preview | Validate a proposal without issuing a token |
| preview | Confidence-scored duplicate check for a candidate entry |
| write (gated) | Create a worklog; needs token + |
| write (gated) | Update a worklog; needs token + |
The write flow is: preview → show the user → explicit approval → write with
the same exact payload. The approval token is bound to the SHA-256 of the
payload (identified by numeric issueId), expires in 15 minutes, is consumed
by a successful write, and is invalidated by any change. Writes that time out
return UNCERTAIN_OUTCOME and are never retried by the server.
Install
Run directly with npx (no installation):
npx -y s-tempo-worklog-mcpOr install globally:
npm install -g s-tempo-worklog-mcp
tempo-worklog-mcpThe server reads configuration from environment variables. Create a .env
file next to where you run it, or set them in your MCP client config.
Variable | Default | Description |
| — (required) | Tempo API token |
| auto-detected | Your Tempo accountId; auto-detected from an existing worklog when absent |
|
| Tempo v4 base URL |
| — (optional) |
|
| — (optional) | Atlassian account email |
| — (optional) | Atlassian API token |
| system TZ | IANA name, e.g. |
|
|
|
|
| Master switch for write tools |
Jira is optional but recommended: Tempo v4 returns only numeric issue ids, so
without Jira the tools cannot display issue keys. All three JIRA_* variables
must be set together. See .env.example for a ready-made template.
Quick start (from source)
git clone https://github.com/nbhson/tool-logwork-mcp
cd tool-logwork-mcp
npm install
npm run build
cp .env.example .env # then fill in TEMPO_API_TOKEN (+ Jira if desired)
node dist/index.jsFull setup for OpenCode (MCP registration, skill, commands, troubleshooting): docs/setup-opencode.md.
Registering with MCP clients
The server speaks MCP over stdio. Generic pattern — run
npx -y s-tempo-worklog-mcp as the command and pass environment variables:
OpenCode (~/.config/opencode/opencode.json or project opencode.json):
{
"mcp": {
"tempo-worklog": {
"type": "local",
"command": ["npx", "-y", "s-tempo-worklog-mcp"],
"environment": {
"TEMPO_API_TOKEN": "your-tempo-token",
"JIRA_BASE_URL": "https://your-site.atlassian.net",
"JIRA_EMAIL": "you@example.com",
"JIRA_API_TOKEN": "your-jira-token"
}
}
}
}Claude Code:
claude mcp add tempo-worklog \
-e TEMPO_API_TOKEN=your-tempo-token \
-- npx -y s-tempo-worklog-mcpOpenCode skill & slash commands
This repository ships an agent skill and four slash commands (.opencode/).
After installing from npm, copy them into your project:
# OpenCode loads skills/commands from your project's .opencode/ directory
mkdir -p .opencode/skills
cp -r node_modules/s-tempo-worklog-mcp/.opencode/skills/tempo-timesheet .opencode/skills/
cp -r node_modules/s-tempo-worklog-mcp/.opencode/commands ./This gives you:
.opencode/skills/tempo-timesheet/SKILL.md— tool catalog + hard rules (preview-before-write, never retry uncertain writes, recorded-data-only summaries)..opencode/commands/tempo-today.md—/tempo-todaydaily summary with an aligned terminal report..opencode/commands/tempo-week.md—/tempo-weekweekly timesheet with per-day and per-issue breakdowns..opencode/commands/tempo-log.md—/tempo-log ABC-123 2h30m ...with the preview card and approval ritual baked in. Accepts a single entry or a batch of entries, inline or pasted from txt/md/csv/freeform text..opencode/commands/tempo-log-rewrite.md—/tempo-log-rewriteworks like/tempo-logbut first rewrites each description into a professional, concise work-log entry while strictly preserving its meaning. Both the original and the rewritten description are shown in the preview for verification; approval and the write pipeline are unchanged.
Details: docs/setup-opencode.md.
Safety model
Read-first. Every read tool is safe to call; nothing writes unless you go through the pipeline.
Triple-gated writes.
WORKLOG_WRITE_ENABLED=true+ preview approval token +confirm: true. The token binds to the SHA-256 of the exact payload (identified by numericissueId, so a Jira hiccup between preview and write cannot invalidate a valid approval), expires in 15 minutes, and is consumed on success — no replay, no duplicates from retries.Uncertain outcomes are reported, never retried. A timed-out write returns
UNCERTAIN_OUTCOME; the server never auto-retries a write.Honest scoping. Read tools scope results to your own account by default and say so; totals never silently mix in other users' worklogs.
No delete. Tempo delete is intentionally not exposed.
Recorded data only. Summaries count recorded worklogs only — no invented hours, no assumed work.
Troubleshooting
Every tool error envelope carries a stable machine-readable code and, for
common operational failures, an actionable hint field. The most common ones:
Error code | Meaning & what to do |
| Token missing/expired/revoked. Generate a fresh token (Tempo: Settings → API Integration; Jira: id.atlassian.com → Security → API tokens), update the env var, restart the server. |
| Token valid but lacks scope/visibility (Tempo needs the Worklogs scope; check Jira project access). |
| Writes are off by default. Set |
| Token expired (>15 min), consumed, or the payload changed. Call |
| The write MAY have landed. Verify with |
| Check connectivity/VPN/proxy ( |
| Configuration incomplete — compare with |
| Wait for the suggested interval, then retry; narrow the date range or lower |
More environment-specific symptoms (Jira partial config, auto-detection on a fresh account, timezone off-by-one): docs/setup-opencode.md.
Development
npm run typecheck # strict typecheck of src
npm run typecheck:test # typecheck of src + tests
npm run lint # eslint (src + tests)
npm run format # prettier
npm test # vitest (unit + integration, mocked HTTP)
npm run build # tsc -> dist/
npm start # run the stdio serverTest suite: 143 tests, all passing (unit: config, context helpers, date —
including timezone/week-boundary cases, duration, logger/error hints, approval,
report, duplicate, TTL cache; integration: Tempo client, Jira client, worklog
service, weekly-summary timezone regression (UTC/+7/+9/+10/−10, Sunday vs
Monday week anchoring, mocked clock), and the full MCP tool handler surface;
protocol-level: a real MCP Client over an InMemoryTransport pair exercises
initialize, tools/list (all 9 tools + JSON Schemas), and tool-call envelopes
end-to-end). HTTP is fully mocked — no credentials or network needed.
Coverage (v8): ~89% statements, ~78% branches, ~92% lines
(npm run test:coverage). npm publish runs the full gate automatically via
prepublishOnly.
Documentation
docs/architecture.md — layers, request flows, error model
docs/api-contract.md — verified endpoints + unverified assumptions
docs/security.md — credential handling, write-safety model
docs/workflows.md — agent workflows (daily/weekly/logging/update)
docs/setup-opencode.md — OpenCode registration + troubleshooting
docs/backlog.md — evaluated-but-deferred features (bulk edit, weekly template)
The Vietnamese design documents in
docs/design/ (architecture.md, security.md, skills.md,
structure.md, tools.md, workflow.md) are the original design briefs this
implementation follows; the docs/ files above describe the implementation
as built.
Known limitations
No delete. Tempo delete is intentionally not exposed in this MVP.
Update identifier risk. Tempo docs disagree on
issueKeyvsissueIdforPUT /worklogs/{id}; this server sendsissueId(docs/api-contract.md).Single user focus. Read tools default to your own account (pass
authorAccountIdto inspect another user); admin-style logging for others is out of scope.Approval state is in memory. Restarting the server invalidates pending approval tokens (by design — re-preview is cheap and safe).
No Overtime/Capacity/accounts endpoints. Worklogs and issue search only.
Caller identity needs one worklog. Auto-detecting your account reads the author of your most recent worklog; on a brand-new account with zero worklogs, set
TEMPO_ACCOUNT_IDexplicitly.
What's new in 0.4.0
Fixed auto-detection of the Tempo account id (it previously read the wrong endpoint and could send a wrong
authorAccountIdon create).Read tools now scope to your own account by default, so totals never silently include other users' worklogs; pass
authorAccountIdto override.Approval tokens are single-use — no replay/duplicate window after a successful write (still reusable when a write fails cleanly).
Approvals are bound by numeric
issueId, so a Jira hiccup between preview and write no longer invalidates a valid approval.Updating a worklog no longer fails when its existing duration is not a whole number of minutes (e.g. timer-derived
89m30s).Pagination: results are never returned beyond
maxResults, and exhausted pagination now fails loudly instead of silently truncating.Cleaner validation errors for malformed create previews (no crash on missing description);
tempo_update_worklognow returns the structuredWRITE_DISABLEDerror code liketempo_create_worklog.
What's new in 0.6.0
Multi-log support.
tempo_preview_worklog,tempo_create_worklog, andtempo_validate_worklognow accept either a single entry (as before) or a batch of entries viaproposals/entries/items/worklogs/logs/batch. A batch preview issues a single approval token bound to the whole batch; the write runs entries sequentially and reports per-entry results (created / failed / uncertain) without blind-retrying uncertain writes.
Available Tools
9 toolsjira_search_issuesSearch Jira issuesA
Search Jira issues. Provide either a jql string, or projectKey and/or text (combined with AND). Read-only; requires JIRA_BASE_URL, JIRA_EMAIL and JIRA_API_TOKEN.
Inputs: jql, text, maxResults, projectKey.
tempo_check_duplicateCheck for duplicate worklogsA
Compare a proposed worklog against existing Tempo worklogs for the same issue and date. Returns possible matches with confidence (high/medium/low) and reasons. Heuristic only — it cannot guarantee uniqueness. Read-only.
Inputs: date (required), issueKey (required), description, durationMinutes.
tempo_create_worklogCreate a Tempo worklog (write, gated)A
Create a Tempo worklog after explicit user approval. Requires: writes enabled (WORKLOG_WRITE_ENABLED=true), confirm=true, and an approvalToken obtained from tempo_preview_worklog for the EXACT same proposal. Refuses to run without all three. Verifies the created worklog afterwards and reports uncertain outcomes instead of retrying.
Inputs: date (required), confirm (required), issueKey (required), description (required), +3 more.
tempo_get_week_summaryWeekly timesheet summaryA
Aggregate RECORDED Tempo worklogs for one week (Monday..Sunday) by day and by issue. The week is resolved from date or weekStartDate; defaults to the current week in the configured timezone. Only actually recorded worklogs are counted — missing days are listed as "no recorded worklogs", never as missing work. Read-only; requires TEMPO_API_TOKEN.
Inputs: date, weekStartDate, authorAccountId.
tempo_get_worklogGet one Tempo worklogB
Retrieve a single Tempo worklog by its tempoWorklogId. Read-only; requires TEMPO_API_TOKEN.
Inputs: worklogId (required).
tempo_get_worklogsGet Tempo worklogsA
Retrieve Tempo worklogs recorded within an inclusive date range (YYYY-MM-DD). Optionally scope to one Jira accountId. Read-only; requires TEMPO_API_TOKEN.
Inputs: endDate (required), startDate (required), maxResults, authorAccountId.
tempo_preview_worklogPreview a worklog (no write)A
Prepare a proposed worklog for user review WITHOUT writing to Tempo. operation="create": pass proposal {issueKey, date, durationMinutes, description, startTime?}. operation="update": pass worklogId and changes {description?, timeSpentSeconds?, startDate?, startTime?}. Returns validation results, duplicates, and (when valid) an approvalToken required by the write tools. Show the full preview to the user and wait for explicit approval before calling a write tool.
tempo_update_worklogUpdate a Tempo worklog (write, gated)A
Update an existing Tempo worklog after explicit user approval. Requires: writes enabled, confirm=true, and an approvalToken from tempo_preview_worklog (operation="update") for the EXACT same worklogId and changes. No worklog deletion exists in this MVP.
Inputs: changes (required), confirm (required), worklogId (required), approvalToken (required).
tempo_validate_worklogValidate a worklog proposalA
Validate a proposed worklog: issue existence/access, date, duration, description, and timezone warnings. Returns validation errors and warnings. Does NOT write and does NOT approve anything.
Inputs: date (required), issueKey (required), description (required), durationMinutes (required), +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
The read tools (get_worklog, get_worklogs, get_week_summary) are clearly distinct, as are create vs update. However, tempo_preview_worklog is a superset of tempo_validate_worklog and tempo_check_duplicate (it returns validation results, duplicate matches, and the approval token), so three tools circle the same pre-write proposal and an agent can easily pick the wrong one or call validate/check_duplicate and then wrongly assume it is cleared to write.
All tools follow a uniform <service>_<verb>_<noun> snake_case pattern (tempo_get_worklog, tempo_create_worklog, jira_search_issues), with the prefix consistently denoting the backing system. Verb choice is predictable across the CRUD/preview lifecycle.
Nine tools is well within a healthy range and each maps to a concrete step: read (single/range/summary), lookup (jira search), pre-write safety (preview/validate/check_duplicate), and write (create/update). No obviously filler tools.
Create and update are covered with strong safety rails, and reads cover single, ranged, and aggregated views. The notable gap is deletion (explicitly absent in the MVP), and there is no tool to inspect an existing worklog's issue metadata or list a user's worklogs outside a date range, both of which limit recovery from mistakes.
Maintenance
Related MCP Connectors
Work journal for coding agents: worklogs, tasks, project state and costs across projects.
Log billable hours and generate AI-assisted monthly client timesheets from coding sessions.
Track time for remote teams and AI agents: hours, timesheets, approvals and agent runs per client.
1
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Jira Cloud instances, including creating and updating issues, managing sprints and projects, adding comments, tracking worklogs, and searching with presets.4 npmMIT
- FlicenseAqualityDmaintenanceEnables Claude to interact with 7pace Timetracker for Jira, supporting time logging, worklog queries, and summaries.6-
- FlicenseAqualityDmaintenanceEnables Claude to log, list, and delete Tempo worklogs against Jira issues, with automatic issue key resolution via the Jira REST API.3-
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with Jira and Confluence on Atlassian Cloud, supporting issue search, creation, updates, transitions, project listing, content search, page management, and comments.1-