Skip to main content

MCP server for OBSS Timepiece Time in Status for Jira

Project description

timepiece-mcp

An MCP server that lets Claude query OBSS Timepiece Time in Status data for Jira issues.

Ask Claude things like:

  • "How long has PROJ-123 spent in each status?"
  • "Show me time in status for PROJ-1, PROJ-2 and PROJ-3 in hours"
  • "Compare cycle times across this sprint's tickets"

Prerequisites

  • uv — fast Python package manager
  • A Jira instance with Timepiece installed
  • A personal Timepiece API token (see below)

Get your Timepiece API token

  1. In Jira, go to Apps → Timepiece → API Settings
  2. Click Create New Token
  3. Copy the Token ID (a UUID like 5263180f-3f08-43fd-9c77-dbda0d4a937f)

⚠️ Keep this token secret — it grants access to your Jira data through Timepiece.


Installation

For Claude Desktop

Add this to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "timepiece": {
      "command": "uvx",
      "args": ["timepiece-mcp"],
      "env": {
        "TIMEPIECE_TOKEN": "your-token-uuid-here",
        "TIMEPIECE_CALENDAR": "10776"
      }
    }
  }
}

Restart Claude Desktop. You'll see a 🔌 icon confirming the server is connected.

For Claude Code (CLI)

claude mcp add timepiece uvx timepiece-mcp \
  -e TIMEPIECE_TOKEN=your-token-uuid-here \
  -e TIMEPIECE_CALENDAR=10776

Environment variables

Variable Required Default Description
TIMEPIECE_TOKEN ✅ Yes Your personal Timepiece API token UUID
TIMEPIECE_CALENDAR No Default calendar ID for business-hours calculations
TIMEPIECE_DEFAULT_DAY_LENGTH No businessDays businessDays or calendarDays
TIMEPIECE_DEFAULT_VIEW_FORMAT No days days, hours, minutes, or seconds

Finding your calendar ID: In Jira go to Apps → Timepiece → Settings → Calendars. The ID is shown next to each calendar (e.g. 10776).


Available tools

timepiece_get_issue

Get time-in-status for a single Jira issue.

How long has PROJ-123 been in each status?
Show PROJ-456 time in status in hours using calendar days

timepiece_get_issues

Get time-in-status for multiple Jira issues in one call.

Show time in status for PROJ-1, PROJ-2 and PROJ-3
Compare these tickets: ['SPRINT-10', 'SPRINT-11', 'SPRINT-12']

timepiece_export_report

Export a time-in-status report for a set of issues as JSON.

Export time in status for PROJ-1 through PROJ-10

Note: The Timepiece file export endpoint is not yet confirmed from the documentation. This tool currently returns structured JSON. Once the export API is verified, a future version will support downloading CSV/Excel files directly.


Local development

git clone https://github.com/yourusername/timepiece-mcp
cd timepiece-mcp

# Copy and fill in your token
cp .env.example .env

# Install dependencies
uv sync

# Run the server (stdio mode — for testing with MCP Inspector)
uv run timepiece-mcp

# Test with MCP Inspector
npx @modelcontextprotocol/inspector uv run timepiece-mcp

Publishing to PyPI

# Build
uv build

# Publish
uv publish

Once published, anyone can run it with:

uvx timepiece-mcp

Sharing with your team

  1. Publish the package to PyPI (or a private registry)
  2. Each team member:
    • Gets their own Timepiece token from Jira → Apps → Timepiece → API Settings
    • Adds the config block above to their Claude Desktop/Code config
    • Uses their own token — tokens are personal and tied to their Jira identity

Troubleshooting

"TIMEPIECE_TOKEN environment variable is not set" → Add TIMEPIECE_TOKEN to the env block in your Claude config and restart.

"Unauthorised — your TIMEPIECE_TOKEN is invalid or expired" → Check the token in Jira → Apps → Timepiece → API Settings. Tokens expire 31 Dec 2026 by default.

"Not found — the issue key does not exist" → Verify the issue key format: it must be PROJECT-NUMBER in uppercase, e.g. PROJ-123.

Issue shows all zeros / missing statuses → Try without the statuses filter first, then narrow down. Status IDs can be found in Timepiece settings.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

timepiece_mcp-0.1.0.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

timepiece_mcp-0.1.0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file timepiece_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: timepiece_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for timepiece_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 72fb949d71a97bd53bc68f08ec7e2d73bebd7cee3b891207e6ef655fd65891b7
MD5 ec04f11133666f8bfa787d6ed6f6a6c6
BLAKE2b-256 dacf8ec2076115648b46ec8c9a78b398c07fce081ef7b5c471afd5c37ba47a00

See more details on using hashes here.

File details

Details for the file timepiece_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: timepiece_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for timepiece_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9f3f2cfa3e6ee7b0b0a2000ef37b08074b8459e13a84d5f397be5ad9a93a852a
MD5 461c184ad79d308a1836106e5543702a
BLAKE2b-256 9e519b93c395e8a2709ee48e044863755e0276ddbb63a2cfd9b21f145af0eb4a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page