@nannykeeper/mcp-server 1.15.0 → 1.17.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/AGENTS.md +6 -2
- package/CLAUDE.md +3 -0
- package/README.md +35 -0
- package/dist/public-profile.js +3 -0
- package/dist/server.d.ts +9 -0
- package/dist/server.js +75 -2
- package/dist/tools/household.d.ts +23 -1
- package/dist/tools/household.js +61 -1
- package/manifest.json +2 -2
- package/package.json +2 -2
package/AGENTS.md
CHANGED
|
@@ -11,6 +11,9 @@ Calculate US household employer (nanny) taxes for all 50 states + DC.
|
|
|
11
11
|
- `run_payroll(employee_id, ..., employer_id?)` — run payroll with full tax calc, YTD tracking, and DB persistence (Starter+ required)
|
|
12
12
|
- `get_payroll(payroll_id?, employer_id?)` — reads one payroll (every deduction, net pay, status) or lists them
|
|
13
13
|
- `get_pay_stub(payroll_id, employer_id?)` — returns each employee's pay stub PDF
|
|
14
|
+
- `get_w2(employee_id, tax_year, copy?, employer_id?)`: returns `download_url`, a link that works for 15 minutes, for one copy of a W-2 the household has already generated in NannyKeeper. Give the user the link and tell them to open it in their browser. Never the PDF, and never open the link yourself. Never generates a W-2
|
|
15
|
+
- `get_schedule_h(tax_year, employer_id?)`: returns `download_url`, a link that works for 15 minutes, for the household's Schedule H, or `schedule_h_unavailable` with a reason. Give the user the link
|
|
16
|
+
- `get_quarter_taxes(year, quarter, employer_id?)`: the quarter as the household's Taxes page shows it, with the checklist of what to pay or file and by when. A null amount means NannyKeeper will not stand behind a figure yet; give the `waiting_on` reason and never report it as $0
|
|
14
17
|
- `get_state_filing_status(employer_id?)` — reads masked state-account status. Pass an owned household ID when selecting a household; test-mode keys must explicitly select a sandbox household. Omitting it uses the key's default household. Each account carries `registered` / `pending` / `required` / `not_required`; `not_required` means this household does not owe that registration at all, so never tell them to go register for it.
|
|
15
18
|
- `get_autopilot(employer_id?, employee_id?)` — reads existing Autopilot enrollments
|
|
16
19
|
- `manage_autopilot(employee_id, action, ..., employer_id?)` — pauses, resumes, skips, or disables an existing enrollment; never enrolls
|
|
@@ -31,8 +34,9 @@ obligation. Ask for missing household details when needed.
|
|
|
31
34
|
## After Calculation
|
|
32
35
|
The `calculate_nanny_taxes` response includes `next_actions` and a `signup_url`.
|
|
33
36
|
If the user wants to run payroll with persistence, use the `run_payroll` tool
|
|
34
|
-
(requires Starter+ subscription). `get_pay_stub` returns pay stubs
|
|
35
|
-
|
|
37
|
+
(requires Starter+ subscription). `get_pay_stub` returns pay stubs as PDFs. `get_w2` and `get_schedule_h` return a
|
|
38
|
+
download link for the user to open. Generating a W-2 and direct deposit setup
|
|
39
|
+
are in the NannyKeeper web app.
|
|
36
40
|
|
|
37
41
|
`employer_id` is optional on every tool. Leave it out for a single-household key.
|
|
38
42
|
|
package/CLAUDE.md
CHANGED
|
@@ -7,6 +7,9 @@ Calculate nanny taxes for all 50 US states.
|
|
|
7
7
|
- `list_employees` — The household's employer_id and every employee's id, pay setup and missing payroll items. The first call in any payroll flow (added 1.15.0)
|
|
8
8
|
- `get_payroll` — One payroll by id (every deduction incl. local tax, net pay, employer taxes, status) or the household's payroll list (added 1.15.0)
|
|
9
9
|
- `get_pay_stub` — Each employee's pay stub PDF for a payroll, returned as an embedded PDF resource, the dashboard's own stub (added 1.15.0)
|
|
10
|
+
- `get_w2`: a 15-minute DOWNLOAD LINK (`download_url`) for one copy of an employee's W-2 for an ended tax year. ⛔ Never the PDF: a W-2 prints the full SSN and a tool result is read by the assistant's model, so the tool always asks the API for `delivery: "link"` and the person opens the link. Do not "align" it with `get_pay_stub`'s attached file. Only a W-2 the household already generated in the dashboard; never generates one (`w2_not_generated`). Hosted and npm identical (added 1.16.0)
|
|
11
|
+
- `get_schedule_h`: a 15-minute download link for the household's Schedule H for an ended tax year, through the dashboard's own Download procedure; its refusals come back as `schedule_h_unavailable` with a `reason`. A link for the same reason as `get_w2` (added 1.16.0)
|
|
12
|
+
- `get_quarter_taxes`: a quarter's tax figures as the Taxes page shows them, from `GET /api/v1/taxes/quarterly`, passed through unchanged. ⛔ Never summarise it in the tool: a null amount is NannyKeeper refusing to state a figure (`waiting_on`), and a summary is where a null becomes a 0 (added 1.17.0)
|
|
10
13
|
- `calculate_nanny_taxes` — Full federal + state tax breakdown
|
|
11
14
|
- `check_threshold` — Whether wages trigger employer tax obligations
|
|
12
15
|
- `preview_payroll` — Dry-run payroll calc, returns taxes/net pay without creating a record (Starter+ required)
|
package/README.md
CHANGED
|
@@ -73,6 +73,41 @@ Only a paid payroll has stubs; anything else answers `payroll_not_completed`.
|
|
|
73
73
|
- `employee_id` (optional) — One employee's stub instead of everyone's
|
|
74
74
|
- `employer_id` (optional)
|
|
75
75
|
|
|
76
|
+
### `get_w2`
|
|
77
|
+
|
|
78
|
+
A download link for one copy of an employee's W-2, for a tax year that has ended. It is the same W-2 the household downloads in the dashboard.
|
|
79
|
+
|
|
80
|
+
The tool returns `download_url`, a link on nannykeeper.com that works for 15 minutes. The assistant gives the link to the person, who opens it in their browser. The PDF itself is never a tool result: a W-2 shows the employee's full Social Security number, so it goes from NannyKeeper to the person and not through the assistant.
|
|
81
|
+
|
|
82
|
+
The household generates the W-2 in the dashboard first (Taxes, then W-2s). Until then the answer is `w2_not_generated`; this tool never generates one.
|
|
83
|
+
|
|
84
|
+
**Parameters:**
|
|
85
|
+
- `employee_id` (required): from `list_employees`
|
|
86
|
+
- `tax_year` (required): a tax year that has ended
|
|
87
|
+
- `copy` (optional): `A`, `B`, `C`, `D`, `1` or `2`. Defaults to `B`
|
|
88
|
+
- `employer_id` (optional)
|
|
89
|
+
|
|
90
|
+
### `get_schedule_h`
|
|
91
|
+
|
|
92
|
+
A download link for the household's Schedule H, for a tax year that has ended. It is the same form the household downloads in the dashboard. Like `get_w2`, it returns `download_url`, a link that works for 15 minutes, and never the PDF.
|
|
93
|
+
|
|
94
|
+
When the dashboard would not produce the form, the answer is `schedule_h_unavailable` with a `reason`: `year_not_ended`, `no_household_data`, `prior_wage_overlap`, `prior_wage_withholding_unknown` or `futa_prior_year_unanswered`. NannyKeeper does not file the form.
|
|
95
|
+
|
|
96
|
+
**Parameters:**
|
|
97
|
+
- `tax_year` (required): a tax year that has ended
|
|
98
|
+
- `employer_id` (optional)
|
|
99
|
+
|
|
100
|
+
### `get_quarter_taxes`
|
|
101
|
+
|
|
102
|
+
A quarter's tax figures as the household's Taxes page shows them: `items`, the checklist of what to pay or file, to whom and by when; `federal`, the optional estimated payment (Form 1040-ES) for the IRS installment in `installment_period`, which settles on Schedule H with Form 1040, and the calendar quarter's federal amounts as the Taxes page shows them (Social Security and Medicare stay 0 until an employee crosses the FICA threshold); `state_destinations`, each state agency's due date, status and `amount_owed`; and `state_lines`, wages and each state and local line per state. Amounts are dollars.
|
|
103
|
+
|
|
104
|
+
A null amount means NannyKeeper will not stand behind a figure yet, and `waiting_on` says why (`unemployment_rate`, `state_figures` or `payment_review`). Never report it as $0. NannyKeeper does not file or pay for the household.
|
|
105
|
+
|
|
106
|
+
**Parameters:**
|
|
107
|
+
- `year` (required): the tax year, for example 2026
|
|
108
|
+
- `quarter` (required): 1 to 4
|
|
109
|
+
- `employer_id` (optional)
|
|
110
|
+
|
|
76
111
|
### `calculate_nanny_taxes`
|
|
77
112
|
|
|
78
113
|
Calculate employer and employee tax obligations for a household employee.
|
package/dist/public-profile.js
CHANGED
|
@@ -8,6 +8,9 @@ export const publicDescriptions = {
|
|
|
8
8
|
list_employees: "List the connected household's employees with their pay setup and what is still missing for payroll. Returns the employee IDs the payroll tools need. Read-only.",
|
|
9
9
|
get_payroll: "Read one payroll by ID, or list the household's payrolls. Returns status, dates, gross pay, each deduction, net pay, and employer taxes. Report the exact status; scheduled or processing does not mean paid.",
|
|
10
10
|
get_pay_stub: "Get the pay stub PDF for each employee on a paid payroll, the same stub the household downloads in NannyKeeper. A payroll that is not paid yet answers payroll_not_completed. Safe to repeat.",
|
|
11
|
+
get_w2: "Get a download link for one copy of an employee's W-2 for a tax year that has ended. Returns download_url, a link on nannykeeper.com that works for 15 minutes; give it to the user and tell them to open it in their browser. This tool never returns the PDF, and you must not open the link yourself. The household generates the W-2 in NannyKeeper first; until then this answers w2_not_generated, and this tool never generates one. Safe to repeat.",
|
|
12
|
+
get_schedule_h: "Get a download link for the household's Schedule H for a tax year that has ended. Returns download_url, a link on nannykeeper.com that works for 15 minutes; give it to the user and tell them to open it in their browser. This tool never returns the PDF, and you must not open the link yourself. When NannyKeeper would not produce the form this answers schedule_h_unavailable with a reason; report that reason faithfully. NannyKeeper does not file the form. Safe to repeat.",
|
|
13
|
+
get_quarter_taxes: "Get a quarter's tax figures as the household's NannyKeeper Taxes page shows them: a checklist of what to pay or file, to whom and by when (an item of kind rec has no hard deadline this quarter but may still be owed), the optional federal estimated payment for the IRS installment, each state agency's due date and amount, and per-state lines. A null amount means NannyKeeper will not stand behind a figure yet; give the returned reason and never report it as $0 or nothing owed. NannyKeeper does not file or pay for the household. Safe to repeat.",
|
|
11
14
|
get_autopilot: "Read existing recurring payroll enrollment status for a household, optionally for one employee. Returns status and available schedule information; it does not enroll anyone or change payroll.",
|
|
12
15
|
manage_autopilot: "Pause, resume, skip, or disable an existing recurring payroll enrollment. Confirm the employee and exact action before calling. Resume can restart future payroll generation and Stripe processing. Pausing does not cancel a payroll that is already scheduled. To cancel an existing payroll, use NannyKeeper. Initial enrollment and its standing authorization happen in NannyKeeper.",
|
|
13
16
|
};
|
package/dist/server.d.ts
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
2
|
import type { ToolContext } from "./context.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Cap on array elements plus object members in one tools/call `arguments`
|
|
5
|
+
* (GHSA-46jr-4wx8-v453). The SDK counts them before validation and
|
|
6
|
+
* has no limit unless one is set, so an object with tens of thousands of keys
|
|
7
|
+
* inside the 64KB body cap could exhaust memory. No tool takes an array or a
|
|
8
|
+
* record, and the widest (run_payroll) has about 22 members, so 256 refuses
|
|
9
|
+
* nothing real. Raise it if a tool ever gains an array input.
|
|
10
|
+
*/
|
|
11
|
+
export declare const MAX_TOOL_INPUT_ELEMENTS = 256;
|
|
3
12
|
/** A fresh server and credential closure for each hosted request. */
|
|
4
13
|
export declare function createNannyKeeperServer(version: string, context?: ToolContext): McpServer;
|
package/dist/server.js
CHANGED
|
@@ -6,7 +6,7 @@ import { executePreviewPayroll } from "./tools/preview-payroll.js";
|
|
|
6
6
|
import { executeRunPayroll } from "./tools/run-payroll.js";
|
|
7
7
|
import { executeStateFilingStatus, stateFilingStatusTool, } from "./tools/state-filing-status.js";
|
|
8
8
|
import { executeGetAutopilot, executeManageAutopilot } from "./tools/autopilot.js";
|
|
9
|
-
import { executeGetPayStub, executeGetPayroll, executeListEmployees, } from "./tools/household.js";
|
|
9
|
+
import { executeGetPayStub, executeGetW2, executeGetScheduleH, executeGetQuarterTaxes, executeGetPayroll, executeListEmployees, } from "./tools/household.js";
|
|
10
10
|
import { publicDescriptions, toolResult } from "./public-profile.js";
|
|
11
11
|
/**
|
|
12
12
|
* `employer_id` on every household tool (1.15.0). The API defaults it to the
|
|
@@ -19,9 +19,18 @@ const EMPLOYER_ID_OPTIONAL = z
|
|
|
19
19
|
.uuid()
|
|
20
20
|
.optional()
|
|
21
21
|
.describe("Optional. Leave it out to use the household your API key belongs to. Pass it only when one account manages several households; list_employees returns it.");
|
|
22
|
+
/**
|
|
23
|
+
* Cap on array elements plus object members in one tools/call `arguments`
|
|
24
|
+
* (GHSA-46jr-4wx8-v453). The SDK counts them before validation and
|
|
25
|
+
* has no limit unless one is set, so an object with tens of thousands of keys
|
|
26
|
+
* inside the 64KB body cap could exhaust memory. No tool takes an array or a
|
|
27
|
+
* record, and the widest (run_payroll) has about 22 members, so 256 refuses
|
|
28
|
+
* nothing real. Raise it if a tool ever gains an array input.
|
|
29
|
+
*/
|
|
30
|
+
export const MAX_TOOL_INPUT_ELEMENTS = 256;
|
|
22
31
|
/** A fresh server and credential closure for each hosted request. */
|
|
23
32
|
export function createNannyKeeperServer(version, context) {
|
|
24
|
-
const server = new McpServer({ name: "nannykeeper", version });
|
|
33
|
+
const server = new McpServer({ name: "nannykeeper", version }, { maxToolInputElements: MAX_TOOL_INPUT_ELEMENTS });
|
|
25
34
|
/**
|
|
26
35
|
* Authority: SSA Contribution and Benefit Base; IRS Pubs. 15 and 926 (2026).
|
|
27
36
|
* Fact: the 2026 Social Security wage base is $184,500; Social Security is
|
|
@@ -343,5 +352,69 @@ export function createNannyKeeperServer(version, context) {
|
|
|
343
352
|
}
|
|
344
353
|
return result;
|
|
345
354
|
});
|
|
355
|
+
// ⛔ get_w2 and get_schedule_h return a download LINK, never the PDF, on the
|
|
356
|
+
// hosted connector and the npm package alike. A
|
|
357
|
+
// W-2 prints the employee's full Social Security number and a tool result is
|
|
358
|
+
// read by the assistant's model, so the form goes from NannyKeeper to the
|
|
359
|
+
// person's browser and the assistant only passes the link along.
|
|
360
|
+
// Register get_w2 tool (1.16.0)
|
|
361
|
+
server.tool("get_w2", context?.publicConnection ? publicDescriptions.get_w2 : ("Get a download link for one copy of an employee's W-2, for a tax year that has ended. Returns download_url, " +
|
|
362
|
+
"a link on nannykeeper.com that works for 15 minutes: give it to the user and tell them to open it in their " +
|
|
363
|
+
"browser to download the PDF. This tool never returns the PDF itself, and you must not open the link " +
|
|
364
|
+
"yourself. The family generates the W-2 in the dashboard first (Taxes, then W-2s); until then this answers " +
|
|
365
|
+
"w2_not_generated with a link to that page, and this tool never generates one. " +
|
|
366
|
+
"For a household other than the key's own, pass its employer_id."), {
|
|
367
|
+
employee_id: z.string().uuid().describe("The employee id from list_employees."),
|
|
368
|
+
tax_year: z.number().int().describe("A tax year that has ended, for example 2025."),
|
|
369
|
+
copy: z.enum(["A", "B", "C", "D", "1", "2"]).optional().describe("Optional. Which copy of the W-2. Defaults to B. Each PDF says on its face who that copy is for."),
|
|
370
|
+
employer_id: EMPLOYER_ID_OPTIONAL,
|
|
371
|
+
}, {
|
|
372
|
+
title: "Get W-2 Download Link",
|
|
373
|
+
// Not read-only: making a link writes an audit row. Safe to repeat.
|
|
374
|
+
readOnlyHint: false,
|
|
375
|
+
destructiveHint: false,
|
|
376
|
+
idempotentHint: true,
|
|
377
|
+
openWorldHint: true,
|
|
378
|
+
}, async (args) => toolResult(await executeGetW2(args, context), context?.publicConnection));
|
|
379
|
+
// Register get_schedule_h tool (1.16.0)
|
|
380
|
+
server.tool("get_schedule_h", context?.publicConnection ? publicDescriptions.get_schedule_h : ("Get a download link for the household's Schedule H, for a tax year that has ended. Returns download_url, a " +
|
|
381
|
+
"link on nannykeeper.com that works for 15 minutes: give it to the user and tell them to open it in their " +
|
|
382
|
+
"browser to download the PDF. This tool never returns the PDF itself, and you must not open the link " +
|
|
383
|
+
"yourself. When the dashboard would not produce the form this answers schedule_h_unavailable with a reason " +
|
|
384
|
+
"(for example year_not_ended, or a question the family still has to answer in the dashboard); report that " +
|
|
385
|
+
"reason faithfully. NannyKeeper does not file the form. " +
|
|
386
|
+
"For a household other than the key's own, pass its employer_id."), {
|
|
387
|
+
tax_year: z.number().int().describe("A tax year that has ended, for example 2025."),
|
|
388
|
+
employer_id: EMPLOYER_ID_OPTIONAL,
|
|
389
|
+
}, {
|
|
390
|
+
title: "Get Schedule H Download Link",
|
|
391
|
+
// Not read-only: making a link writes an audit row. Safe to repeat.
|
|
392
|
+
readOnlyHint: false,
|
|
393
|
+
destructiveHint: false,
|
|
394
|
+
idempotentHint: true,
|
|
395
|
+
openWorldHint: true,
|
|
396
|
+
}, async (args) => toolResult(await executeGetScheduleH(args, context), context?.publicConnection));
|
|
397
|
+
// Register get_quarter_taxes tool (read, 1.17.0)
|
|
398
|
+
server.tool("get_quarter_taxes", context?.publicConnection ? publicDescriptions.get_quarter_taxes : ("Get a quarter's tax figures as the household's Taxes page shows them: `items` is the checklist of what to " +
|
|
399
|
+
"pay or file, to whom and by when (an item of kind `rec` has no hard deadline this quarter but may still be " +
|
|
400
|
+
"owed); `federal` is the optional estimated payment (Form 1040-ES) for the IRS installment in " +
|
|
401
|
+
"`installment_period`, which settles on Schedule H with Form 1040; `state_destinations` is each state " +
|
|
402
|
+
"agency with its due date and what is owed; `state_lines` is " +
|
|
403
|
+
"wages and each state and local line. Amounts are dollars. A null amount means NannyKeeper will not stand " +
|
|
404
|
+
"behind a figure yet: say so and give the reason (`waiting_on`, `fica`, `rate_needed`), and never report it " +
|
|
405
|
+
"as $0 or as nothing owed. NannyKeeper does not file or pay for the household. " +
|
|
406
|
+
"For a household other than the key's own, pass its employer_id."), {
|
|
407
|
+
year: z.number().int().min(2020).max(2100).describe("The tax year, for example 2026."),
|
|
408
|
+
quarter: z.number().int().min(1).max(4).describe("The calendar quarter, 1 to 4."),
|
|
409
|
+
employer_id: EMPLOYER_ID_OPTIONAL,
|
|
410
|
+
}, {
|
|
411
|
+
title: "Get Quarter Taxes",
|
|
412
|
+
// Not strictly read-only: like opening the Taxes page, it refreshes the
|
|
413
|
+
// quarter's stored totals. It never changes a payroll. Safe to repeat.
|
|
414
|
+
readOnlyHint: false,
|
|
415
|
+
destructiveHint: false,
|
|
416
|
+
idempotentHint: true,
|
|
417
|
+
openWorldHint: true,
|
|
418
|
+
}, async (args) => toolResult(await executeGetQuarterTaxes(args, context), context?.publicConnection));
|
|
346
419
|
return server;
|
|
347
420
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Household read tools: list_employees, get_payroll, get_pay_stub (1.15.0)
|
|
2
|
+
* Household read tools: list_employees, get_payroll, get_pay_stub (1.15.0),
|
|
3
|
+
* get_w2 and get_schedule_h (1.16.0).
|
|
3
4
|
*
|
|
4
5
|
* list_employees is how an agent learns the employee_id every payroll tool
|
|
5
6
|
* needs (and the household's employer_id). Without it, an agent with a
|
|
@@ -37,4 +38,25 @@ export declare function executeGetPayStub(args: {
|
|
|
37
38
|
content: ToolContent[];
|
|
38
39
|
isError?: true;
|
|
39
40
|
}>;
|
|
41
|
+
export declare function executeGetW2(args: {
|
|
42
|
+
employee_id: string;
|
|
43
|
+
tax_year: number;
|
|
44
|
+
copy?: string;
|
|
45
|
+
employer_id?: string;
|
|
46
|
+
}, context?: ToolContext): Promise<string>;
|
|
47
|
+
export declare function executeGetScheduleH(args: {
|
|
48
|
+
tax_year: number;
|
|
49
|
+
employer_id?: string;
|
|
50
|
+
}, context?: ToolContext): Promise<string>;
|
|
51
|
+
/**
|
|
52
|
+
* get_quarter_taxes (1.17.0): a quarter's tax figures as the Taxes quarter
|
|
53
|
+
* page shows them. Passed through unchanged: the API already says
|
|
54
|
+
* null where it will not stand behind a figure, and a tool that summarised it
|
|
55
|
+
* could turn that null into a 0.
|
|
56
|
+
*/
|
|
57
|
+
export declare function executeGetQuarterTaxes(args: {
|
|
58
|
+
year: number;
|
|
59
|
+
quarter: number;
|
|
60
|
+
employer_id?: string;
|
|
61
|
+
}, context?: ToolContext): Promise<string>;
|
|
40
62
|
export {};
|
package/dist/tools/household.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Household read tools: list_employees, get_payroll, get_pay_stub (1.15.0)
|
|
2
|
+
* Household read tools: list_employees, get_payroll, get_pay_stub (1.15.0),
|
|
3
|
+
* get_w2 and get_schedule_h (1.16.0).
|
|
3
4
|
*
|
|
4
5
|
* list_employees is how an agent learns the employee_id every payroll tool
|
|
5
6
|
* needs (and the household's employer_id). Without it, an agent with a
|
|
@@ -26,6 +27,10 @@ async function getJson(path, init, context) {
|
|
|
26
27
|
ok: false,
|
|
27
28
|
text: JSON.stringify({
|
|
28
29
|
error: data.error?.message || `API error: ${response.status}`,
|
|
30
|
+
// The stable name of the refusal (payroll_not_completed,
|
|
31
|
+
// w2_not_generated, schedule_h_unavailable), which the tool
|
|
32
|
+
// descriptions tell an agent to look for.
|
|
33
|
+
code: data.error?.code,
|
|
29
34
|
details: data.error?.details,
|
|
30
35
|
}),
|
|
31
36
|
};
|
|
@@ -107,3 +112,58 @@ export async function executeGetPayStub(args, context) {
|
|
|
107
112
|
}
|
|
108
113
|
return { content };
|
|
109
114
|
}
|
|
115
|
+
/**
|
|
116
|
+
* One tax form, as a DOWNLOAD LINK and never as the PDF (1.16.0).
|
|
117
|
+
*
|
|
118
|
+
* ⛔ A W-2 prints the employee's full Social Security number, and a tool
|
|
119
|
+
* result is read by the assistant's model. So these tools always ask the API
|
|
120
|
+
* for `delivery: "link"`: the result is a link on nannykeeper.com that works
|
|
121
|
+
* for 15 minutes, and the person opens it in their own browser. The pay stub
|
|
122
|
+
* is attached as a file because it shows only the last four digits; do not
|
|
123
|
+
* "align" these two with it.
|
|
124
|
+
*/
|
|
125
|
+
async function getTaxFormLink(path, body, context) {
|
|
126
|
+
const result = await getJson(path, { method: "POST", body: JSON.stringify({ ...body, delivery: "link" }) }, context);
|
|
127
|
+
if (!result.ok)
|
|
128
|
+
return result.text;
|
|
129
|
+
const data = result.data.data;
|
|
130
|
+
const { download, document: _document, ...rest } = data ?? {};
|
|
131
|
+
if (!download?.url) {
|
|
132
|
+
return JSON.stringify({ error: "NannyKeeper did not return a download link. Ask again in a minute." });
|
|
133
|
+
}
|
|
134
|
+
return JSON.stringify({
|
|
135
|
+
...rest,
|
|
136
|
+
file_name: download.file_name,
|
|
137
|
+
download_url: download.url,
|
|
138
|
+
expires_at: download.expires_at,
|
|
139
|
+
instructions: "Give the user this link and tell them to open it in their browser to download the PDF. " +
|
|
140
|
+
"It works for 15 minutes. Do not open or fetch the link yourself.",
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
export async function executeGetW2(args, context) {
|
|
144
|
+
return getTaxFormLink("/api/v1/documents/w2", {
|
|
145
|
+
employee_id: args.employee_id,
|
|
146
|
+
tax_year: args.tax_year,
|
|
147
|
+
...(args.copy ? { copy: args.copy } : {}),
|
|
148
|
+
...(args.employer_id ? { employer_id: args.employer_id } : {}),
|
|
149
|
+
}, context);
|
|
150
|
+
}
|
|
151
|
+
export async function executeGetScheduleH(args, context) {
|
|
152
|
+
return getTaxFormLink("/api/v1/documents/schedule-h", {
|
|
153
|
+
tax_year: args.tax_year,
|
|
154
|
+
...(args.employer_id ? { employer_id: args.employer_id } : {}),
|
|
155
|
+
}, context);
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* get_quarter_taxes (1.17.0): a quarter's tax figures as the Taxes quarter
|
|
159
|
+
* page shows them. Passed through unchanged: the API already says
|
|
160
|
+
* null where it will not stand behind a figure, and a tool that summarised it
|
|
161
|
+
* could turn that null into a 0.
|
|
162
|
+
*/
|
|
163
|
+
export async function executeGetQuarterTaxes(args, context) {
|
|
164
|
+
const params = new URLSearchParams({ year: String(args.year), quarter: String(args.quarter) });
|
|
165
|
+
if (args.employer_id)
|
|
166
|
+
params.set("employer_id", args.employer_id);
|
|
167
|
+
const result = await getJson(`/api/v1/taxes/quarterly?${params.toString()}`, { method: "GET" }, context);
|
|
168
|
+
return result.ok ? JSON.stringify(result.data) : result.text;
|
|
169
|
+
}
|
package/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest_version": "0.3",
|
|
3
3
|
"name": "nannykeeper",
|
|
4
|
-
"version": "1.
|
|
5
|
-
"description": "Calculate US household employer (nanny) taxes for all 50 states. List employees, preview and run payroll, read payrolls and pay stubs, list state agency account numbers, and manage existing Autopilot enrollments.
|
|
4
|
+
"version": "1.17.0",
|
|
5
|
+
"description": "Calculate US household employer (nanny) taxes for all 50 states. List employees, preview and run payroll, read payrolls and pay stubs, get download links for W-2s and Schedule H, list state agency account numbers, and manage existing Autopilot enrollments. 12 tools: calculate_nanny_taxes, check_threshold, list_employees, preview_payroll, run_payroll, get_payroll, get_pay_stub, get_w2, get_schedule_h, get_state_filing_status, get_autopilot, manage_autopilot.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "nannykeeper",
|
|
8
8
|
"url": "https://github.com/nannykeeper"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nannykeeper/mcp-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.17.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": [
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"test:watch": "vitest"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
56
|
+
"@modelcontextprotocol/sdk": "^1.32.1",
|
|
57
57
|
"zod": "^4.3.6"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|