timecard
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
TimeCard
A Python CLI tool for 1099 contractors to track billable hours, manage time entries, and generate PDF invoices. Designed to be AI-native and agent-callable via both a CLI and an MCP server.
Prerequisites
Python 3.11+
WeasyPrint system dependencies (varies by platform — see installation below)
Related MCP server: trackly
Installation
Mac / Linux
curl -fsSL https://raw.githubusercontent.com/derekmarion/timecard/main/install.sh | bashOr clone the repo and run:
./install.shThis installs uv (if absent), WeasyPrint system deps, and the timecard CLI from the GitHub repository.
Windows
.\install.ps1Installs uv and prompts you to install the GTK3 runtime if not present.
Developer install (from source)
uv cache clean && uv tool install --reinstall .Re-run the same command to pick up changes. The cache clear ensures uv doesn't serve a stale build.
Updating
timecard updateClears the uv cache for TimeCard and reinstalls the latest version from GitHub. Works from any directory.
Configuration
Run the interactive setup wizard to configure TimeCard:
timecard setupThis creates a config file at ~/.config/timecard/.env (or the path set by TIMECARD_CONFIG_PATH).
Settings managed by timecard setup
Variable | Description | Example |
| Your name |
|
| Your address |
|
| Your email |
|
| Client's name |
|
| Client's address |
|
| Billing rate per hour |
|
| Where to save PDFs |
|
| Text on invoices |
|
| Offset added to auto-incremented invoice numbers (for migrating from a prior system) |
|
Advanced overrides (environment variables only)
These have sensible XDG-compliant defaults and do not need to be set for most users:
Variable | Description | Default |
| Override config file location |
|
| Override database location |
|
Security note: Do not include bank account or routing numbers in your config or invoice templates. Provide banking details to your client once via their secure vendor onboarding process.
Usage
Start/stop a timer
$ timecard start
status: started
started_at: 2025-01-15T09:00:00+00:00
$ timecard pause
status: paused
paused_at: 2025-01-15T10:30:00+00:00
$ timecard resume
status: resumed
resumed_at: 2025-01-15T11:00:00+00:00
$ timecard stop
status: stopped
entry_id: 1
duration_minutes: 150.5
hours: 2.51
$ timecard status
running: FalseAdd a manual entry
$ timecard add --date 2025-01-15 --hours 3.5 --note "API design work"
status: added
entry_id: 2
date: 2025-01-15
hours: 3.5View entries
$ timecard log
ID Date Hours Note Invoiced
----------------------------------------------------------------------
1 2025-01-15 3.01 — No
2 2025-01-15 3.5 API design work No
$ timecard log --period week --json
[{"id": 1, "date": "2025-01-15", "hours": 3.01, "note": null, "invoiced": false}]Edit an entry
$ timecard edit 2 --hours 4.0 --note "Updated API design"
status: updated
entry_id: 2Delete an entry
$ timecard delete 2
Delete entry 2? [y/N]: y
status: deleted
entry_id: 2Generate an invoice
$ timecard invoice generate --note "January backend work"
status: generated
invoice_number: INV-0001
total_hours: 3.01
total_amount: 451.5
pdf_path: /home/user/invoices/INV-0001.pdf
paid_at: None
$ timecard invoice generate --period month --output ./custom-invoice.pdf
# Override the invoice number for a single invocation
$ timecard invoice generate --number 42
invoice_number: INV-0042When no --period is specified, all uninvoiced entries are included. Period options (week, biweekly, month) use calendar-aligned windows (e.g., last complete Mon–Sun week, last complete calendar month).
To start invoice numbering at a specific offset (e.g. when migrating from a prior system), set INVOICE_NUMBER_START in your .env. With INVOICE_NUMBER_START=100, the first invoice will be INV-0101.
List invoices
$ timecard invoice list
ID NUMBER PERIOD HOURS AMOUNT PAID AT
----------------------------------------------------------------------------
1 INV-0001 2025-01-01 – 2025-01-15 3.01 $451.50 —
2 INV-0002 2025-01-16 – 2025-01-31 8.00 $1200.00 Jan 31, 2025
# Filter to outstanding or settled invoices
$ timecard invoice list --unpaid
$ timecard invoice list --paid --jsonMark an invoice as paid
# By invoice number or ID — both work
$ timecard invoice paid INV-0001
$ timecard invoice paid 1
# Record a specific payment date
$ timecard invoice paid INV-0001 --date 2025-02-01
# Undo a payment (e.g. if marked paid by mistake)
$ timecard invoice unpaid INV-0001JSON output
All commands except export support --json for machine-readable output (export always outputs CSV):
$ timecard status --json
{"running": false}MCP Server Setup
TimeCard exposes an MCP server for AI agent integration. Add it to your claude_desktop_config.json:
{
"mcpServers": {
"timecard": {
"command": "timecard",
"args": ["mcp"]
}
}
}See docs/mcp.md for the full list of exposed tools.
Multi-Machine Use
TimeCard stores all data in a single SQLite file. To share it across machines, set TIMECARD_DB_PATH to a location that is accessible from each machine — a synced folder (Google Drive, Proton Drive, Dropbox, Syncthing, etc.) or a network share both work well:
# In ~/.config/timecard/.env
TIMECARD_DB_PATH="~/Google Drive/My Drive/timecard/timecard.db"Note: Avoid running TimeCard on two machines simultaneously against the same database file. SQLite is not designed for concurrent multi-writer access, and file sync tools that hold files open during sync can cause locking conflicts. As long as only one machine is active at a time this approach is reliable.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Track time, run timesheets, draft invoices and log AI-agent costs for client work.
Time tracking and invoicing for AI agents and their humans: track, log and bill work by agent.
Log hours and invoice clients from your AI chat. Time tracking and invoicing for freelancers.
Log billable hours and generate AI-assisted monthly client timesheets from coding sessions.
Related MCP Servers
- AlicenseBqualityBmaintenanceTurn Claude, Cursor, and your AI agents into an autonomous CFO. Manage invoicing, expenses, real-time bank reconciliation, cash flow, and tax compliance in plain language — backed by Frihet ERP.100610 npm13MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI clients to manage time tracking directly, including starting and stopping timers, handling workspaces, projects, and tags, and generating PDF/CSV reports and invoices.36 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables LLMs to log and manage time entries, control timers, review unbilled hours, and prepare draft Moneybird invoices through natural language.1MIT
- FlicenseNot gradedqualityBmaintenanceEnables time tracking and invoicing through natural conversation with MCP clients like Claude or ChatGPT, allowing users to log work hours, query unbilled time, and draft invoices, with a minimal web app for settings, CSV import, and Stripe-powered billing.-