@nannykeeper/mcp-server 1.5.0 → 1.7.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 +6 -0
- package/README.md +3 -1
- package/dist/index.js +35 -1
- package/dist/tools/preview-payroll.d.ts +4 -0
- package/dist/tools/preview-payroll.js +3 -0
- package/dist/tools/run-payroll.d.ts +4 -0
- package/dist/tools/run-payroll.js +3 -0
- package/dist/tools/state-filing-status.d.ts +30 -0
- package/dist/tools/state-filing-status.js +92 -0
- package/manifest.json +4 -4
- package/package.json +3 -3
package/CLAUDE.md
CHANGED
|
@@ -21,6 +21,12 @@ API callers with direct-deposit payments must tick the same safety gates the UI
|
|
|
21
21
|
|
|
22
22
|
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.
|
|
23
23
|
|
|
24
|
+
## Voluntary set-aside (run_payroll, preview_payroll)
|
|
25
|
+
The optional `voluntary_set_aside: { skip?, amount? }` field overrides the employee's recurring set-aside rule for a single paycheck. The recurring rule (e.g., 2% of gross for OH municipal courtesy withholding) is configured via the dashboard — this field can only override or skip per-payroll. Omit the field to apply the rule normally.
|
|
26
|
+
|
|
27
|
+
- `voluntary_set_aside: { skip: true }` — bypass the rule for this paycheck
|
|
28
|
+
- `voluntary_set_aside: { amount: 5.00 }` — override the computed amount for this paycheck
|
|
29
|
+
|
|
24
30
|
## Setup
|
|
25
31
|
Requires API key (free): https://www.nannykeeper.com/developers/keys
|
|
26
32
|
Set `NANNYKEEPER_API_KEY` env var.
|
package/README.md
CHANGED
|
@@ -61,6 +61,7 @@ Dry-run payroll calculation. Returns the full tax breakdown, net pay, and employ
|
|
|
61
61
|
- `overtime_hours` (optional) — Overtime hours worked
|
|
62
62
|
- `bonus` (optional) — Bonus amount
|
|
63
63
|
- `other_earnings` (optional) — Other earnings
|
|
64
|
+
- `voluntary_set_aside` (optional, v1.6.0+) — Override or skip the employee's recurring voluntary set-aside rule for this paycheck only. Object with `skip` (boolean) or `amount` (number, $0–$9,999). The recurring rule is configured via the dashboard; omit this field to apply it normally.
|
|
64
65
|
|
|
65
66
|
### `run_payroll`
|
|
66
67
|
|
|
@@ -83,6 +84,7 @@ Run payroll for a household employee **end-to-end in a single call** — creates
|
|
|
83
84
|
- `notes` (optional) — Use "catch-up" for retroactive payrolls
|
|
84
85
|
- `confirm_large_payroll` (optional) — Required for direct-deposit payrolls with total net pay >$5,000 or any single net pay >$3,000
|
|
85
86
|
- `confirm_ach_debit` (optional) — Required for first-ever DD payroll or when >30 days have elapsed since the last DD authorization
|
|
87
|
+
- `voluntary_set_aside` (optional, v1.6.0+) — Override or skip the employee's recurring voluntary set-aside rule for this paycheck only. Object with `skip` (boolean) or `amount` (number, $0–$9,999). The recurring rule is configured via the dashboard; omit this field to apply it normally.
|
|
86
88
|
- `idempotency_key` (optional) — Prevent duplicate payroll creation
|
|
87
89
|
|
|
88
90
|
## Examples
|
|
@@ -157,7 +159,7 @@ Full privacy policy: [nannykeeper.com/privacy](https://www.nannykeeper.com/priva
|
|
|
157
159
|
## Support
|
|
158
160
|
|
|
159
161
|
- **Email:** hello@nannykeeper.com
|
|
160
|
-
- **GitHub Issues:** [github.com/
|
|
162
|
+
- **GitHub Issues:** [github.com/nannykeeper/mcp-server/issues](https://github.com/nannykeeper/mcp-server/issues)
|
|
161
163
|
- **Documentation:** [nannykeeper.com/developers](https://www.nannykeeper.com/developers)
|
|
162
164
|
- **MCP Setup Guide:** [nannykeeper.com/developers/mcp](https://www.nannykeeper.com/developers/mcp)
|
|
163
165
|
|
package/dist/index.js
CHANGED
|
@@ -19,9 +19,10 @@ import { executeCalculate } from "./tools/calculate.js";
|
|
|
19
19
|
import { executeThreshold } from "./tools/threshold.js";
|
|
20
20
|
import { executePreviewPayroll } from "./tools/preview-payroll.js";
|
|
21
21
|
import { executeRunPayroll } from "./tools/run-payroll.js";
|
|
22
|
+
import { executeStateFilingStatus } from "./tools/state-filing-status.js";
|
|
22
23
|
const server = new McpServer({
|
|
23
24
|
name: "nannykeeper",
|
|
24
|
-
version: "1.
|
|
25
|
+
version: "1.7.0",
|
|
25
26
|
});
|
|
26
27
|
// Register calculate tool
|
|
27
28
|
server.tool("calculate_nanny_taxes", "Calculate employer and employee tax obligations for a household employee (nanny, caregiver, housekeeper) in any US state. " +
|
|
@@ -87,6 +88,13 @@ server.tool("preview_payroll", "Preview payroll for a household employee WITHOUT
|
|
|
87
88
|
overtime_hours: z.number().optional().describe("Overtime hours worked this period"),
|
|
88
89
|
bonus: z.number().optional().describe("Bonus amount in dollars for this period"),
|
|
89
90
|
other_earnings: z.number().optional().describe("Other earnings in dollars for this period"),
|
|
91
|
+
voluntary_set_aside: z
|
|
92
|
+
.object({
|
|
93
|
+
skip: z.boolean().optional().describe("Skip the active set-aside rule for this paycheck only"),
|
|
94
|
+
amount: z.number().min(0).max(9999).optional().describe("Override the rule's computed amount for this paycheck only"),
|
|
95
|
+
})
|
|
96
|
+
.optional()
|
|
97
|
+
.describe("Override or skip the employee's voluntary post-tax set-aside rule for this paycheck only. The recurring rule itself is configured via the dashboard. Omit this field to apply the rule normally."),
|
|
90
98
|
}, {
|
|
91
99
|
title: "Preview Payroll",
|
|
92
100
|
readOnlyHint: true,
|
|
@@ -141,6 +149,13 @@ server.tool("run_payroll", "Run payroll for a household employee end-to-end in a
|
|
|
141
149
|
.boolean()
|
|
142
150
|
.optional()
|
|
143
151
|
.describe("Required for first-time direct-deposit payroll or when the last DD authorization is >30 days old."),
|
|
152
|
+
voluntary_set_aside: z
|
|
153
|
+
.object({
|
|
154
|
+
skip: z.boolean().optional().describe("Skip the active set-aside rule for this paycheck only"),
|
|
155
|
+
amount: z.number().min(0).max(9999).optional().describe("Override the rule's computed amount for this paycheck only"),
|
|
156
|
+
})
|
|
157
|
+
.optional()
|
|
158
|
+
.describe("Override or skip the employee's voluntary post-tax set-aside rule for this paycheck only. The recurring rule itself is configured via the dashboard. Omit this field to apply the rule normally."),
|
|
144
159
|
idempotency_key: z
|
|
145
160
|
.string()
|
|
146
161
|
.optional()
|
|
@@ -155,6 +170,25 @@ server.tool("run_payroll", "Run payroll for a household employee end-to-end in a
|
|
|
155
170
|
const result = await executeRunPayroll(args);
|
|
156
171
|
return { content: [{ type: "text", text: result }] };
|
|
157
172
|
});
|
|
173
|
+
// Register get_state_filing_status tool
|
|
174
|
+
server.tool("get_state_filing_status", "List the employer's state agency account numbers (last-four only) per " +
|
|
175
|
+
"(state, registration_type) tuple — UC, withholding, SDI. Returns the " +
|
|
176
|
+
"agency name and a registration URL for any that are missing. Use " +
|
|
177
|
+
"before generating quarterly filing instructions (e.g., 'file Form UC-2 " +
|
|
178
|
+
"for Q2 — your PA UC account is ••••5678') or when a customer asks " +
|
|
179
|
+
"whether their state setup is complete. Read-only. To update, use the " +
|
|
180
|
+
"POST /api/v1/state-registrations REST endpoint or direct the customer " +
|
|
181
|
+
"to /settings/states — LLMs shouldn't fabricate account numbers since " +
|
|
182
|
+
"they land on real tax filings.", {}, {
|
|
183
|
+
title: "Get State Filing Status",
|
|
184
|
+
readOnlyHint: true,
|
|
185
|
+
destructiveHint: false,
|
|
186
|
+
idempotentHint: true,
|
|
187
|
+
openWorldHint: true,
|
|
188
|
+
}, async () => {
|
|
189
|
+
const result = await executeStateFilingStatus();
|
|
190
|
+
return { content: [{ type: "text", text: result }] };
|
|
191
|
+
});
|
|
158
192
|
// Start server
|
|
159
193
|
async function main() {
|
|
160
194
|
const transport = new StdioServerTransport();
|
|
@@ -33,6 +33,9 @@ export async function executePreviewPayroll(args) {
|
|
|
33
33
|
overtime_hours: args.overtime_hours,
|
|
34
34
|
bonus: args.bonus,
|
|
35
35
|
other_earnings: args.other_earnings,
|
|
36
|
+
...(args.voluntary_set_aside
|
|
37
|
+
? { voluntary_set_aside: args.voluntary_set_aside }
|
|
38
|
+
: {}),
|
|
36
39
|
},
|
|
37
40
|
],
|
|
38
41
|
}),
|
|
@@ -19,5 +19,9 @@ export declare function executeRunPayroll(args: {
|
|
|
19
19
|
notes?: string;
|
|
20
20
|
confirm_large_payroll?: boolean;
|
|
21
21
|
confirm_ach_debit?: boolean;
|
|
22
|
+
voluntary_set_aside?: {
|
|
23
|
+
skip?: boolean;
|
|
24
|
+
amount?: number;
|
|
25
|
+
};
|
|
22
26
|
idempotency_key?: string;
|
|
23
27
|
}): Promise<string>;
|
|
@@ -38,6 +38,9 @@ export async function executeRunPayroll(args) {
|
|
|
38
38
|
bonus: args.bonus,
|
|
39
39
|
other_earnings: args.other_earnings,
|
|
40
40
|
payment_method: args.payment_method || "check",
|
|
41
|
+
...(args.voluntary_set_aside
|
|
42
|
+
? { voluntary_set_aside: args.voluntary_set_aside }
|
|
43
|
+
: {}),
|
|
41
44
|
},
|
|
42
45
|
],
|
|
43
46
|
notes: args.notes,
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* get_state_filing_status MCP tool
|
|
3
|
+
*
|
|
4
|
+
* Read-only: lists the employer's state agency account numbers (UC,
|
|
5
|
+
* withholding, SDI) and which states are still missing. Useful when an
|
|
6
|
+
* agent is about to generate filing instructions ("file Form UC-2 for
|
|
7
|
+
* Q2 — your PA UC account is ••••5678") or when prompting the user to
|
|
8
|
+
* complete state setup.
|
|
9
|
+
*
|
|
10
|
+
* Last-four only by default; this tool never exposes full account
|
|
11
|
+
* numbers (use the REST API with `?reveal=true` if a full read is
|
|
12
|
+
* required — that path is audit-logged).
|
|
13
|
+
*
|
|
14
|
+
* Write operations (upsert) are deliberately NOT exposed via MCP. State
|
|
15
|
+
* agency account numbers are humans-from-portal data; LLMs are very
|
|
16
|
+
* capable of fabricating plausible numbers and we don't want one
|
|
17
|
+
* silently landing on a quarterly UC return. Direct customers to enter
|
|
18
|
+
* via /settings/states or call the REST API explicitly with
|
|
19
|
+
* confirmation context.
|
|
20
|
+
*/
|
|
21
|
+
export declare const stateFilingStatusTool: {
|
|
22
|
+
name: string;
|
|
23
|
+
description: string;
|
|
24
|
+
inputSchema: {
|
|
25
|
+
type: "object";
|
|
26
|
+
properties: {};
|
|
27
|
+
required: never[];
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export declare function executeStateFilingStatus(): Promise<string>;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* get_state_filing_status MCP tool
|
|
3
|
+
*
|
|
4
|
+
* Read-only: lists the employer's state agency account numbers (UC,
|
|
5
|
+
* withholding, SDI) and which states are still missing. Useful when an
|
|
6
|
+
* agent is about to generate filing instructions ("file Form UC-2 for
|
|
7
|
+
* Q2 — your PA UC account is ••••5678") or when prompting the user to
|
|
8
|
+
* complete state setup.
|
|
9
|
+
*
|
|
10
|
+
* Last-four only by default; this tool never exposes full account
|
|
11
|
+
* numbers (use the REST API with `?reveal=true` if a full read is
|
|
12
|
+
* required — that path is audit-logged).
|
|
13
|
+
*
|
|
14
|
+
* Write operations (upsert) are deliberately NOT exposed via MCP. State
|
|
15
|
+
* agency account numbers are humans-from-portal data; LLMs are very
|
|
16
|
+
* capable of fabricating plausible numbers and we don't want one
|
|
17
|
+
* silently landing on a quarterly UC return. Direct customers to enter
|
|
18
|
+
* via /settings/states or call the REST API explicitly with
|
|
19
|
+
* confirmation context.
|
|
20
|
+
*/
|
|
21
|
+
const API_BASE = process.env.NANNYKEEPER_API_URL || "https://www.nannykeeper.com";
|
|
22
|
+
export const stateFilingStatusTool = {
|
|
23
|
+
name: "get_state_filing_status",
|
|
24
|
+
description: "List the employer's state agency account numbers (last-four only) per " +
|
|
25
|
+
"(state, registration_type) tuple. Returns whether each state has a UC, " +
|
|
26
|
+
"withholding, and SDI account on file, the agency name, and a " +
|
|
27
|
+
"registration URL for any that are missing. Use before generating " +
|
|
28
|
+
"quarterly filing instructions, or when a customer asks 'do I have my " +
|
|
29
|
+
"state account numbers set up?' Read-only — to update, use the REST " +
|
|
30
|
+
"API or direct the customer to /settings/states.",
|
|
31
|
+
inputSchema: {
|
|
32
|
+
type: "object",
|
|
33
|
+
properties: {},
|
|
34
|
+
required: [],
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
export async function executeStateFilingStatus() {
|
|
38
|
+
const apiKey = process.env.NANNYKEEPER_API_KEY;
|
|
39
|
+
if (!apiKey) {
|
|
40
|
+
return JSON.stringify({
|
|
41
|
+
error: "NANNYKEEPER_API_KEY environment variable is not set. Get a key at nannykeeper.com/developers/keys",
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
try {
|
|
45
|
+
const response = await fetch(`${API_BASE}/api/v1/state-registrations`, {
|
|
46
|
+
headers: {
|
|
47
|
+
Authorization: `Bearer ${apiKey}`,
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
const data = await response.json();
|
|
51
|
+
if (!response.ok) {
|
|
52
|
+
return JSON.stringify({
|
|
53
|
+
error: data.error?.message || `API error: ${response.status}`,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
const items = (data?.data?.items ?? []);
|
|
57
|
+
const byState = new Map();
|
|
58
|
+
for (const item of items) {
|
|
59
|
+
const list = byState.get(item.state_code) ?? [];
|
|
60
|
+
list.push(item);
|
|
61
|
+
byState.set(item.state_code, list);
|
|
62
|
+
}
|
|
63
|
+
const states = Array.from(byState.entries()).map(([code, rows]) => ({
|
|
64
|
+
state_code: code,
|
|
65
|
+
accounts: rows.map((r) => ({
|
|
66
|
+
type: r.account_type,
|
|
67
|
+
label: r.label,
|
|
68
|
+
agency: r.agency,
|
|
69
|
+
last_four: r.account_number_last_four,
|
|
70
|
+
status: r.status,
|
|
71
|
+
registration_url: r.status === "registered" ? null : r.registration_url,
|
|
72
|
+
})),
|
|
73
|
+
}));
|
|
74
|
+
return JSON.stringify({
|
|
75
|
+
states,
|
|
76
|
+
summary: {
|
|
77
|
+
states_with_data: states.length,
|
|
78
|
+
total_accounts_on_file: items.filter((i) => i.status === "registered").length,
|
|
79
|
+
accounts_missing: items.filter((i) => i.status === "required").length,
|
|
80
|
+
},
|
|
81
|
+
next_actions: {
|
|
82
|
+
update_account_number_via_api: "POST /api/v1/state-registrations with { state_code, registration_type, account_number }",
|
|
83
|
+
update_via_dashboard: `${API_BASE}/settings/states`,
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
return JSON.stringify({
|
|
89
|
+
error: `Network error: ${error instanceof Error ? error.message : "Unknown error"}`,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
package/manifest.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest_version": "0.3",
|
|
3
3
|
"name": "nannykeeper",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.6.0",
|
|
5
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
|
-
"name": "
|
|
8
|
-
"url": "https://github.com/
|
|
7
|
+
"name": "nannykeeper",
|
|
8
|
+
"url": "https://github.com/nannykeeper"
|
|
9
9
|
},
|
|
10
10
|
"homepage": "https://www.nannykeeper.com/developers/mcp",
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "git",
|
|
13
|
-
"url": "https://github.com/
|
|
13
|
+
"url": "https://github.com/nannykeeper/mcp-server"
|
|
14
14
|
},
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"privacy_policies": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nannykeeper/mcp-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.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": [
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"homepage": "https://www.nannykeeper.com/developers/mcp",
|
|
27
27
|
"repository": {
|
|
28
28
|
"type": "git",
|
|
29
|
-
"url": "https://github.com/
|
|
29
|
+
"url": "https://github.com/nannykeeper/mcp-server.git"
|
|
30
30
|
},
|
|
31
31
|
"bugs": {
|
|
32
|
-
"url": "https://github.com/
|
|
32
|
+
"url": "https://github.com/nannykeeper/mcp-server/issues"
|
|
33
33
|
},
|
|
34
34
|
"type": "module",
|
|
35
35
|
"bin": {
|