SuperAPI AI Directory

attendance-engine-mcp

Deterministic workforce attendance calculations: overtime, overnight shifts, rotating rosters and California wage-and-hour compliance.

Open website

About this tool

Purpose

attendance-engine-mcp is a Model Context Protocol (MCP) server that provides AI agents with deterministic workforce attendance calculation tools, solving the problem that LLMs are unreliable when handling clock-ins, overtime, overnight shifts, and California wage-and-hour compliance by "eyeballing estimates." It enables AI hosts such as Claude, Cursor, and Windsurf to complete precise calculations by invoking tools, rather than having the model infer on its own.

Key capabilities

  • Parse attendance days from raw clock punches: handling all cases including overnight, breaks, and overtime.
  • Audit meal/rest compliance against the California ruleset: covering Labor Code §§ 226.7, 512 and IWC wage orders, and including Donohue v. AMN rebuttable presumption signals.
  • Work-time rounding: round without losing the exact-minute baseline, so that rounding can be proven neutral and unbiased.
  • Generate shift schedules: supporting scheduling patterns such as 2-2-3, 4-on-4-off, DuPont, and Pitman.
  • Suspicious punch-stream diagnostics: triage before trusting the data.
  • Multi-day wage-and-hour audits: covering the entire pay period, summarizing premium hours owed, days at risk, and a flag heatmap. All calculation logic resides in @attendance-engine/core, a pure-function, zero-dependency TypeScript library with 100% test coverage. The MCP server is merely a lightweight agent interface on top of it.

How to use

The AI host does not perform the math; it only selects tools, fills in parameters, and forwards the answers. Asking the same question repeatedly yields the same answer. Timestamps must explicitly carry their own offset, e.g. 2026-06-01T08:57:00+06:00 or 2026-06-01T08:57:00Z; 2026-06-01T08:57:00 without an offset will be rejected. The engine does not read the host clock, does not assume UTC, and does not silently convert; daylight saving time works correctly because the offset is explicit. Duty dates and shift HH:MM are local wall-clock time at the work location and should match the business calendar, not UTC. For days with no punches (absences, holidays), policy.tzOffsetMinutes must be passed explicitly so the engine can anchor the shift window.

AnInstallation: Add the configuration to an already-used MCP host. On macOS, edit ~/Library/Application Support/Claude/claude_desktop_config.json; on Windows, edit %APPDATA%\Claude\claude_desktop_config.json, then fully quit and restart Claude Desktop (on macOS use Cmd-Q; merely closing the window is not enough). For Cursor, edit ~/.cursor/mcp.json; for Windsurf, edit ~/.codeium/windsurf/mcp_config.json. You can also launch the stdio binary directly; the server communicates via JSON-RPC over stdin/stdout.

Resources and prompts: Resources can be pasted into the chat; guided prompts (the host's / menu or prompts/get) include analyse_timecard (analyze a single attendance day) and roster_planner (generate a schedule and render it as a Markdown table).

Embedding (advanced): Self-built hosts can skip the CLI, for custom HTTP/SSE adapters, Claude Agent SDK setups, test harnesses, and internal deployments that need to embed the binary into a larger Node process.

Use cases

  • Chat assistants for internal HR / payroll / workforce analytics
  • Audit preparation workflows for California employers
  • Customer support tools for HR tech vendors that need AI to give correct results
  • Pre-payroll compliance triage ("which days need manual review?")
  • Schedule planning that needs a real scheduling engine rather than guesswork

Limitations

  • Not a leave balance/accrual system (the engine handles minutes, not entitlements).
  • Not a payroll amount calculator (it gives hour buckets; you need to multiply by the rate yourself).
  • Not a biometric device protocol (it needs to be paired with a suitable capture layer).
  • No UI, no dashboard.

Compatibility

The repository mentions compatibility with MCP hosts such as Claude, Cursor, and Windsurf; the specific supported list is subject to official materials. For detailed scenarios, engine API reference, time zone semantics, and other documentation links, see the official repository. The project is built by Md. Arifur Rahman, with the companion @attendance-engine/core (TypeScript) and arifur9993/attendance-engine (PHP), same author, same fixtures, same answers. Licensed under MIT.