ehour-mcp
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., "@ehour-mcp submit my June hours"
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.
ehour-mcp
An MCP server that fills and saves
eHour timesheets for you. Ask your agent "submit my June
hours": it drafts each day from your git log, shows you the month, and after your OK fills
the timesheet in a real Chrome window, saves it week by week and reads it back to check.
Drafts from commits.
PROJ-123 Title - detailsubjects become one entry per weekday; weekend commits move to the nearest free weekday.Review before anything is saved. The draft is a JSON file the agent shows and edits with you.
Verified saves. Every week is read back after saving and compared with what you approved.
Small fixes.
patch_daycorrects one day without touching the rest.No stored credentials. It attaches over the Chrome DevTools Protocol to a Chrome window where you logged in yourself.
See docs/DESIGN.md for how it works and what it refuses to do.
Requirements
Node.js 20 or newer
Google Chrome (any Chromium-based browser works via
cdpBrowser)An eHour account with one project row on your timesheet
An MCP client such as Claude Code
Related MCP server: Timesheet Assistant MCP
Setup
Install dependencies:
npm installCreate your config from the example and fill it in:
cp ehour.config.example.json ehour.config.jsonKey
Required
Meaning
urlyes
Your eHour timesheet page, e.g.
https://ehour.example.com/eh/consultant/overview?1&openPanel=TIMESHEETprojectCodeyes
The project code shown on your timesheet row, e.g.
PROJticketPrefixesno
Ticket keys to recognise in commit subjects, e.g.
["PROJ", "OPS"]. Default: anyUPPERCASE-123keygitRepono
Repository
draft_monthreads by defaultcdpPortno
Chrome remote-debugging port, default
9237cdpProfileno
Chrome profile folder, default
~/.ehour-cdp-profilecdpBrowserno
Browser binary, default Google Chrome on macOS
hostno
Host used to find the eHour tab, default taken from
urlEvery key can also be set as an environment variable (
EHOUR_URL,EHOUR_PROJECT_CODE,EHOUR_TICKET_PREFIXESas a comma list,EHOUR_GIT_REPO,EHOUR_CDP_PORT, …), which wins over the file.EHOUR_CONFIGpoints to a different config file.Start the dedicated Chrome and sign in to eHour once:
./scripts/start-ehour-chrome.shIt uses its own profile, so your normal browsing is untouched and the session survives restarts.
Register the server with your MCP client. For Claude Code:
claude mcp add ehour -- node /absolute/path/to/ehour-mcp/src/server.mjs
Use
"Submit my June hours" →
draft_monthwritesdrafts/<from>_<to>.jsonfrom your commits and returns a summary. The agent shortens each day, fills the gaps, shows you the month, and on your OK callsapply_monthwith that file."June 3 should say X" →
patch_day."What's in eHour for last week?" →
read_timesheet.
Tool | Purpose |
| Is the dedicated Chrome up and logged in? |
| Draft entries from |
| Fill and save entries, then read back and report differences |
| Compare an entries file with eHour; differences only |
| Correct a single saved day |
| Read saved hours and comments for a date range |
Notes
The server never closes Chrome. Quit it with
./scripts/stop-ehour-chrome.sh.If the session expires,
check_loginsays so: sign in again in that window.Every day gets 8 hours unless an entry says otherwise. Comments are converted to ASCII because eHour stores them in CP-1252.
Tested against one eHour installation with the standard web UI. A customised skin may need the selectors in
src/ehour-dom.mjsadjusted.
Development
npm test # unit tests: entries, week math, drafting, config
npm run smoke # read-only checks against your live eHour: page | login | read FROM TOLicense
Available Tools
6 toolsapply_monthA
Fill and SAVE eHour timesheet entries for the configured project, one working day per entry. Groups entries by week, navigates each week, fills hours + the day comment, and saves per week (persisted as it goes), then reads the range back and compares it. Pass entriesFile (the draft_month file) instead of inline entries. Returns { weeks: [{ weekOf, savedDates, warnings, error?, filledButUnsaved? }], stoppedAt?, verification: { ok, checked, mismatches, unexpected } }. If a week fails, earlier weeks stay saved and stoppedAt names the failed week. Review the entries with the user BEFORE calling this — it commits to the timesheet.
Inputs: verify, entries, entriesFile.
check_loginA
Check whether the dedicated eHour Chrome is running and logged in. Returns { loggedIn, currentUrl, message }. Call this before apply_month/patch_day; if loggedIn is false, tell the user to sign in to the dedicated Chrome window.
Inputs: no named parameters.
draft_monthA
Draft a timesheet from git commit messages (read-only, touches no eHour page). One entry per weekday in the range, 8h each: "[8] TICKET: Title" then " - bullet" lines from the commit subjects, ASCII-only. Weekend commits move to the nearest empty weekday. Writes the entries JSON to file and returns only a summary { file, days: [{ date, tickets, chars }], moved, gaps }. Read the file, shorten each comment to 1-3 outcome bullets per ticket, fill every gap (a gap has an empty comment and is rejected by apply_month), then show the month to the user.
Inputs: to (required), from (required), repo, author, +1 more.
patch_dayA
Correct a single already-saved day for the configured project: navigate to its week, update hours and/or comment, save. Does NOT touch any other day. Returns { date, saved, error?, before, after }. Provide at least one of hours/comment.
Inputs: date (required), hours, comment.
read_timesheetA
Read back the currently-saved project hours + comments for a date range (inclusive). Read-only. Returns { days: [{ date, hours, comment }] } for days that have any hours or comment. Use to show the live state before/after a patch.
Inputs: to (required), from (required).
verify_entriesA
Compare an entries file with what eHour holds for its date range (read-only). Returns { ok, checked, mismatches: [{ date, field, expected?, actual? }], unexpected: [dates saved but not in the file] }.
Inputs: entriesFile (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a clearly distinct role in a single linear workflow: check_login (session state), draft_month (offline generation from git), apply_month (bulk write), verify_entries (file vs. server diff), patch_day (single-day correction), read_timesheet (live read). The only near-neighbor pair, verify_entries and read_timesheet, is separated by description (file comparison vs. raw live state).
All six tools follow a strict verb_noun snake_case pattern (check_login, draft_month, apply_month, verify_entries, patch_day, read_timesheet) with no stylistic deviations. The verb choices (draft/apply/verify/patch/read/check) meaningfully encode the read-only vs. write vs. check semantics.
Six tools is well-scoped for a focused timesheet-automation server; each tool maps to a necessary stage (preflight, draft, commit, verify, correct, inspect) with no filler. Nothing appears redundant or missing at the structural level.
The draft → apply → verify → patch → read lifecycle is covered end to end, but there is no explicit way to delete or clear an already-saved day (patch_day only updates hours/comment), nor any tool to discover projects or tickets the server is configured for. These are workaroundable gaps rather than dead ends, since hours could presumably be zeroed via patch_day.
Related MCP Connectors
Log billable hours and generate AI-assisted monthly client timesheets from coding sessions.
Let AI agents work in your own signed-in Chrome, with approvals and verified results.
Git collaboration for AI agents and people: tasks, hand-offs, reviews, teams, shared memory.
Log time on GitHub issues and pull requests: timers, entries, missing days, client hours.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables automated timesheet management including creating entries, listing work activities, managing daily scrum updates, and viewing assigned projects with automatic authentication handling.MIT
- AlicenseNot gradedqualityDmaintenanceGenerates timesheets from activity data and automates submission to PSI Project Server (SharePoint-based systems) using browser automation. Works with Activity Collector MCP to fetch data from GitLab, GitHub, and Calendar services.17 npmMIT
- FlicenseNot gradedqualityDmaintenanceAutomatically collects work data from Git history and Claude Code session logs to generate daily worklog drafts, and registers approved logs to the Waple HR platform.-
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage tasks on TDC Flow by reading assigned tasks, proposing and updating tasks, and logging time with precise timestamps derived from git commit history.-