@nannykeeper/mcp-server 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CLAUDE.md CHANGED
@@ -7,7 +7,18 @@ Calculate nanny taxes for all 50 US states.
7
7
  - `calculate_nanny_taxes` — Full federal + state tax breakdown
8
8
  - `check_threshold` — Whether wages trigger employer tax obligations
9
9
  - `preview_payroll` — Dry-run payroll calc, returns taxes/net pay without creating a record (Starter+ required)
10
- - `run_payroll` — Run payroll with full tax calc, YTD tracking, and DB persistence (Starter+ required)
10
+ - `run_payroll` — End-to-end payroll: create, approve, and process in a single call. Finalized response reflects real status (processing / pending_funding / completed). No UI intervention needed. (Starter+ required)
11
+
12
+ ## Pay-date handling (run_payroll, preview_payroll)
13
+ - `pay_date` is optional. When omitted, the server picks the earliest valid pay date based on ACH submission lead time (5 business days ahead, holiday-aware) and echoes it back in the response.
14
+ - If `pay_date` is supplied and past the submission deadline, the API rejects with HTTP 400 and includes `next_valid_pay_date` in the error details for self-correction.
15
+
16
+ ## Confirmation flags (run_payroll)
17
+ API callers with direct-deposit payments must tick the same safety gates the UI does:
18
+ - `confirm_large_payroll: true` when total net pay >$5,000 OR any single net pay >$3,000
19
+ - `confirm_ach_debit: true` for the first-ever DD payroll on an employer, or when >30 days have elapsed since the last DD authorization
20
+
21
+ These flags exist even for server-to-server callers as a safety measure. Agents should only set them after verifying the amounts with the user.
11
22
 
12
23
  ## Setup
13
24
  Requires API key (free): https://www.nannykeeper.com/developers/keys
package/README.md CHANGED
@@ -46,22 +46,41 @@ Check if annual wages cross the household employer tax threshold.
46
46
  - `annual_wages` (required) — Annual wages to check
47
47
  - `tax_year` (optional) — Tax year (default: current year)
48
48
 
49
+ ### `preview_payroll`
50
+
51
+ Dry-run payroll calculation. Returns the full tax breakdown, net pay, and employer costs WITHOUT creating a payroll record. Use to validate your request before calling `run_payroll`. Requires a Starter+ subscription.
52
+
53
+ **Parameters:**
54
+ - `employer_id` (required) — Employer UUID from your NannyKeeper account
55
+ - `employee_id` (required) — Employee UUID
56
+ - `pay_period_start` (required) — Start of pay period (YYYY-MM-DD)
57
+ - `pay_period_end` (required) — End of pay period (YYYY-MM-DD)
58
+ - `pay_date` (optional) — Date employee is paid (YYYY-MM-DD). When omitted, the server picks the earliest valid pay date based on ACH submission lead time and echoes it back in the response.
59
+ - `pay_frequency` (required) — weekly, biweekly, semimonthly, or monthly
60
+ - `regular_hours` (optional) — Regular hours worked
61
+ - `overtime_hours` (optional) — Overtime hours worked
62
+ - `bonus` (optional) — Bonus amount
63
+ - `other_earnings` (optional) — Other earnings
64
+
49
65
  ### `run_payroll`
50
66
 
51
- Run payroll for a household employee with full tax calculations, YTD tracking, and database persistence. Creates a payroll record. Requires a Starter+ subscription.
67
+ Run payroll for a household employee **end-to-end in a single call** — creates, approves, and processes the payroll. Response reflects the finalized status (`processing`, `pending_funding`, or `completed`); no dashboard intervention needed. Requires a Starter+ subscription.
52
68
 
53
69
  **Parameters:**
54
70
  - `employer_id` (required) — Employer UUID from your NannyKeeper account
55
71
  - `employee_id` (required) — Employee UUID to run payroll for
56
72
  - `pay_period_start` (required) — Start of pay period (YYYY-MM-DD)
57
73
  - `pay_period_end` (required) — End of pay period (YYYY-MM-DD)
58
- - `pay_date` (required) — Date employee is paid (YYYY-MM-DD)
74
+ - `pay_date` (optional) — Date employee is paid (YYYY-MM-DD). When omitted, the server picks the earliest valid pay date from today + ACH submission lead time. If supplied and past the submission deadline, the request is rejected with HTTP 400 + `next_valid_pay_date` in the error details so you can retry with a valid date.
59
75
  - `pay_frequency` (required) — weekly, biweekly, semimonthly, or monthly
60
76
  - `regular_hours` (optional) — Regular hours worked
61
77
  - `overtime_hours` (optional) — Overtime hours worked
62
78
  - `bonus` (optional) — Bonus amount
79
+ - `other_earnings` (optional) — Other earnings
63
80
  - `payment_method` (optional) — direct_deposit, check, or cash (default: check)
64
81
  - `notes` (optional) — Use "catch-up" for retroactive payrolls
82
+ - `confirm_large_payroll` (optional) — Required for direct-deposit payrolls with total net pay >$5,000 or any single net pay >$3,000
83
+ - `confirm_ach_debit` (optional) — Required for first-ever DD payroll or when >30 days have elapsed since the last DD authorization
65
84
  - `idempotency_key` (optional) — Prevent duplicate payroll creation
66
85
 
67
86
  ## Examples
package/dist/index.js CHANGED
@@ -69,13 +69,15 @@ server.tool("preview_payroll", "Preview payroll for a household employee WITHOUT
69
69
  "Returns the full tax breakdown (federal, state, FICA, FUTA), net pay, and employer costs. " +
70
70
  "Use this to validate your request before calling run_payroll. " +
71
71
  "Same parameters as run_payroll. Requires a Starter+ subscription. " +
72
+ "pay_date is optional — when omitted, the server picks the earliest valid pay date " +
73
+ "based on ACH submission lead time and echoes it back in the response. " +
72
74
  "To get your employer_id and employee_id, call the NannyKeeper API: " +
73
75
  "GET /api/v1/employees?employer_id=YOUR_ID (employer_id is visible in your dashboard URL).", {
74
76
  employer_id: z.string().uuid().describe("Employer UUID — visible in your NannyKeeper dashboard URL or from GET /api/v1/employees"),
75
77
  employee_id: z.string().uuid().describe("Employee UUID — from GET /api/v1/employees response"),
76
78
  pay_period_start: z.string().describe("Start of pay period in YYYY-MM-DD format (e.g., 2026-04-07)"),
77
79
  pay_period_end: z.string().describe("End of pay period in YYYY-MM-DD format (e.g., 2026-04-13)"),
78
- pay_date: z.string().describe("Date employee is paid in YYYY-MM-DD format (e.g., 2026-04-15)"),
80
+ pay_date: z.string().optional().describe("Date employee is paid (YYYY-MM-DD). Optional — server picks the earliest valid date if omitted."),
79
81
  pay_frequency: z
80
82
  .enum(["weekly", "biweekly", "semimonthly", "monthly"])
81
83
  .describe("How often the employee is paid"),
@@ -94,11 +96,17 @@ server.tool("preview_payroll", "Preview payroll for a household employee WITHOUT
94
96
  return { content: [{ type: "text", text: result }] };
95
97
  });
96
98
  // Register run_payroll tool
97
- server.tool("run_payroll", "Run payroll for a household employee. Calculates all taxes (federal, state, FICA, FUTA) " +
98
- "with year-to-date tracking and creates a payroll record. " +
99
- "Returns the full tax breakdown, net pay, employer costs, and a payroll ID for reference. " +
100
- "Requires a Starter+ subscription. The payroll is created with 'draft' status " +
101
- "(or 'completed' for catch-up payrolls with notes='catch-up'). " +
99
+ server.tool("run_payroll", "Run payroll for a household employee end-to-end in a single call. Creates the " +
100
+ "record, runs all tax calculations (federal, state, FICA, FUTA) with year-to-date " +
101
+ "tracking, approves the payroll, and kicks off payment processing. " +
102
+ "Returns the finalized status (processing/pending_funding/completed), full tax breakdown, " +
103
+ "net pay, employer costs, and the payroll ID for reference. " +
104
+ "Requires a Starter+ subscription. " +
105
+ "pay_date is optional — when omitted, the server picks the earliest valid pay date " +
106
+ "based on ACH submission lead time and echoes it back. If supplied and past the " +
107
+ "submission deadline, the request is rejected with next_valid_pay_date in the error. " +
108
+ "Direct deposit callers: set confirm_large_payroll=true for totals >$5,000 or any single " +
109
+ "net pay >$3,000; set confirm_ach_debit=true for first-time DD or if no DD in 30 days. " +
102
110
  "Tip: use preview_payroll first to validate your request and see results before committing. " +
103
111
  "To get your employer_id and employee_id, call the NannyKeeper API: " +
104
112
  "GET /api/v1/employees?employer_id=YOUR_ID (employer_id is visible in your dashboard URL).", {
@@ -106,7 +114,7 @@ server.tool("run_payroll", "Run payroll for a household employee. Calculates all
106
114
  employee_id: z.string().uuid().describe("Employee UUID — from GET /api/v1/employees response"),
107
115
  pay_period_start: z.string().describe("Start of pay period in YYYY-MM-DD format (e.g., 2026-04-07)"),
108
116
  pay_period_end: z.string().describe("End of pay period in YYYY-MM-DD format (e.g., 2026-04-13)"),
109
- pay_date: z.string().describe("Date employee is paid in YYYY-MM-DD format (e.g., 2026-04-15)"),
117
+ pay_date: z.string().optional().describe("Date employee is paid (YYYY-MM-DD). Optional — server picks the earliest valid date if omitted."),
110
118
  pay_frequency: z
111
119
  .enum(["weekly", "biweekly", "semimonthly", "monthly"])
112
120
  .describe("How often the employee is paid"),
@@ -119,6 +127,14 @@ server.tool("run_payroll", "Run payroll for a household employee. Calculates all
119
127
  .optional()
120
128
  .describe("How the employee is paid (default: check)"),
121
129
  notes: z.string().optional().describe("Notes (use 'catch-up' for retroactive payrolls that auto-complete)"),
130
+ confirm_large_payroll: z
131
+ .boolean()
132
+ .optional()
133
+ .describe("Required for direct-deposit payrolls with total net pay >$5,000 or any single net pay >$3,000."),
134
+ confirm_ach_debit: z
135
+ .boolean()
136
+ .optional()
137
+ .describe("Required for first-time direct-deposit payroll or when the last DD authorization is >30 days old."),
122
138
  idempotency_key: z
123
139
  .string()
124
140
  .optional()
@@ -9,7 +9,7 @@ export declare function executePreviewPayroll(args: {
9
9
  employee_id: string;
10
10
  pay_period_start: string;
11
11
  pay_period_end: string;
12
- pay_date: string;
12
+ pay_date?: string;
13
13
  pay_frequency: string;
14
14
  regular_hours?: number;
15
15
  overtime_hours?: number;
@@ -23,7 +23,8 @@ export async function executePreviewPayroll(args) {
23
23
  employer_id: args.employer_id,
24
24
  pay_period_start: args.pay_period_start,
25
25
  pay_period_end: args.pay_period_end,
26
- pay_date: args.pay_date,
26
+ // Omit pay_date when unset so the API computes a default
27
+ ...(args.pay_date ? { pay_date: args.pay_date } : {}),
27
28
  pay_frequency: args.pay_frequency,
28
29
  employees: [
29
30
  {
@@ -9,7 +9,7 @@ export declare function executeRunPayroll(args: {
9
9
  employee_id: string;
10
10
  pay_period_start: string;
11
11
  pay_period_end: string;
12
- pay_date: string;
12
+ pay_date?: string;
13
13
  pay_frequency: string;
14
14
  regular_hours?: number;
15
15
  overtime_hours?: number;
@@ -17,5 +17,7 @@ export declare function executeRunPayroll(args: {
17
17
  other_earnings?: number;
18
18
  payment_method?: string;
19
19
  notes?: string;
20
+ confirm_large_payroll?: boolean;
21
+ confirm_ach_debit?: boolean;
20
22
  idempotency_key?: string;
21
23
  }): Promise<string>;
@@ -27,7 +27,8 @@ export async function executeRunPayroll(args) {
27
27
  employer_id: args.employer_id,
28
28
  pay_period_start: args.pay_period_start,
29
29
  pay_period_end: args.pay_period_end,
30
- pay_date: args.pay_date,
30
+ // Omit pay_date when unset so the API computes a default
31
+ ...(args.pay_date ? { pay_date: args.pay_date } : {}),
31
32
  pay_frequency: args.pay_frequency,
32
33
  employees: [
33
34
  {
@@ -40,6 +41,12 @@ export async function executeRunPayroll(args) {
40
41
  },
41
42
  ],
42
43
  notes: args.notes,
44
+ ...(args.confirm_large_payroll !== undefined
45
+ ? { confirm_large_payroll: args.confirm_large_payroll }
46
+ : {}),
47
+ ...(args.confirm_ach_debit !== undefined
48
+ ? { confirm_ach_debit: args.confirm_ach_debit }
49
+ : {}),
43
50
  }),
44
51
  });
45
52
  const data = await response.json();
package/manifest.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "manifest_version": "0.3",
3
3
  "name": "nannykeeper",
4
- "version": "1.2.1",
5
- "description": "Calculate US household employer (nanny) taxes and run payroll for all 50 states. Tax breakdowns, threshold checks, and payroll with YTD tracking.",
4
+ "version": "1.4.0",
5
+ "description": "Calculate US household employer (nanny) taxes for all 50 states. Preview and run payroll, generate W-2s and pay stubs. 4 tools: calculate, threshold, preview, run.",
6
6
  "author": {
7
7
  "name": "imaznation",
8
8
  "url": "https://github.com/imaznation"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nannykeeper/mcp-server",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "mcpName": "com.nannykeeper.www/mcp-server",
5
5
  "description": "MCP server for calculating US household employer (nanny) taxes. All 50 states. Works with Claude, ChatGPT, and any MCP-compatible AI agent.",
6
6
  "keywords": [