@nannykeeper/mcp-server 1.19.0 → 1.20.1
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 +1 -1
- package/CLAUDE.md +3 -3
- package/README.md +2 -2
- package/dist/connection.d.ts +14 -0
- package/dist/connection.js +42 -0
- package/dist/context.d.ts +21 -0
- package/dist/public-profile.js +3 -3
- package/dist/server.js +15 -6
- package/dist/tools/autopilot.d.ts +1 -1
- package/dist/tools/autopilot.js +2 -2
- package/dist/tools/household.js +13 -3
- package/dist/tools/list-payrolls.js +2 -1
- package/manifest.json +7 -2
- package/package.json +3 -3
package/AGENTS.md
CHANGED
|
@@ -9,7 +9,7 @@ Calculate US household employer (nanny) taxes for all 50 states + DC.
|
|
|
9
9
|
- `list_employees(employer_id?)` — returns the household's employer_id and every employee_id. Call it first; never invent IDs
|
|
10
10
|
- `preview_payroll(employee_id, ..., reimbursements?, employer_id?)` — previews payroll without creating a record. Mileage goes in `reimbursements` as `{type: "mileage", miles, amount: 0}`
|
|
11
11
|
- `run_payroll(employee_id, ..., reimbursements?, employer_id?)` — run payroll with full tax calc, YTD tracking, and DB persistence (Starter+ required)
|
|
12
|
-
- `get_payroll(payroll_id?, employer_id?)` — reads one payroll (every deduction, net pay, status) or lists them
|
|
12
|
+
- `get_payroll(payroll_id?, employer_id?)` — reads one payroll (every deduction, net pay, status) or lists them. From 1.20.0, a paycheck paid outside NannyKeeper carries `paid_outside: { family_method, confirmation }` (`confirmed` / `mismatch` / `waiting` / `not_asked`); a `mismatch` is the employee's word only, so suggest the two talk, never compute a difference
|
|
13
13
|
- `list_payrolls(employee_id?, pay_date_from?, pay_date_to?, limit?, cursor?, employer_id?)` — the household's payrolls, newest first, with the employee_ids each paid; filter by employee and pay date. Use `limit: 3` for the last three
|
|
14
14
|
- `get_pay_stub(payroll_id, employer_id?)` — returns each employee's pay stub PDF
|
|
15
15
|
- `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
|
package/CLAUDE.md
CHANGED
|
@@ -5,7 +5,7 @@ Calculate nanny taxes for all 50 US states.
|
|
|
5
5
|
|
|
6
6
|
## Tools
|
|
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
|
-
- `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)
|
|
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). From 1.20.0 each paycheck paid outside NannyKeeper carries `paid_outside: { family_method, confirmation }` (`confirmed` · `mismatch` · `waiting` · `not_asked`), and `list_payrolls` rows carry `paid_outside_confirmation`. ⛔ Never the employee's payment handle. A `mismatch` is the employee's word only: NannyKeeper never knows the amount received, so the tool copy tells the agent to suggest the two talk, never to compute a difference
|
|
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
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
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)
|
|
@@ -16,8 +16,8 @@ Calculate nanny taxes for all 50 US states.
|
|
|
16
16
|
- `check_threshold` — Whether wages trigger employer tax obligations
|
|
17
17
|
- `preview_payroll` — Dry-run payroll calc, returns taxes/net pay without creating a record (Starter+ required)
|
|
18
18
|
- `run_payroll` — End-to-end payroll: create, approve, and process (or schedule) in a single call. Finalized response reflects real status (`processing` / `pending_funding` / `completed` / **`scheduled`** as of 1.5.0). No UI intervention needed. (Starter+ required)
|
|
19
|
-
- `get_autopilot` — Read Autopilot (recurring auto-run payroll) status for an employee, or list an employer's active enrollments (Plus/
|
|
20
|
-
- `manage_autopilot` — Pause / resume / skip / disable an existing enrollment. **Enrolling is NOT exposed** — it captures a standing recurring ACH authorization that must be employer-driven in-app. (Plus/
|
|
19
|
+
- `get_autopilot` — Read Autopilot (recurring auto-run payroll) status for an employee, or list an employer's active enrollments (Plus/Pro, `ach` scope)
|
|
20
|
+
- `manage_autopilot` — Pause / resume / skip / disable an existing enrollment. **Enrolling is NOT exposed** — it captures a standing recurring ACH authorization that must be employer-driven in-app. (Plus/Pro, `ach` scope) — added 1.9.0
|
|
21
21
|
- `void_payroll`: the two-step safe void over `POST /api/v1/payroll/:id/void`. The first call writes nothing and returns the payroll and a 10-minute confirmation code bound to that payroll and key; only the second call, with the code and a reason, voids, through the app's own `voidPayroll`. ⛔ Only a draft or a scheduled direct deposit whose debit has not started; everything else is refused with an app link. The tool passes the API through and never retries or mints a code itself. Registered from its own module, `tools/void-payroll.ts`
|
|
22
22
|
- `get_state_filing_status` — The employer's state agency accounts (UC, withholding, SDI) per state, last-four only. Each account has a status: `registered`, `pending`, `required`, or `not_required`. ⛔ `not_required` means this household genuinely does not owe that registration — most often because they and their employee agreed not to withhold state income tax — so never tell them to go register for it. A registration URL is returned only where there is still something to open or finish. Takes an optional `employer_id` — omit it for a single-household account; a **test-mode key must pass one**, because a key's default household is always the real one and the endpoint enforces the test/live boundary.
|
|
23
23
|
|
package/README.md
CHANGED
|
@@ -57,7 +57,7 @@ List the household's employees and return the household's `employer_id`. Call th
|
|
|
57
57
|
|
|
58
58
|
### `get_payroll`
|
|
59
59
|
|
|
60
|
-
With `payroll_id`, read one payroll: status, dates, and each employee's gross pay, every deduction (federal, Social Security, Medicare, state, local), net pay, and employer taxes. Without it, list the household's payrolls, newest first.
|
|
60
|
+
With `payroll_id`, read one payroll: status, dates, and each employee's gross pay, every deduction (federal, Social Security, Medicare, state, local), net pay, and employer taxes. Without it, list the household's payrolls, newest first. For a paycheck the family pays outside NannyKeeper, `paid_outside` gives how the family says it paid and whether the employee confirmed it arrived: `confirmed`, `mismatch`, `waiting` or `not_asked` (added 1.20.0).
|
|
61
61
|
|
|
62
62
|
**Parameters:**
|
|
63
63
|
- `payroll_id` (optional) — A payroll ID from `run_payroll`
|
|
@@ -65,7 +65,7 @@ With `payroll_id`, read one payroll: status, dates, and each employee's gross pa
|
|
|
65
65
|
|
|
66
66
|
### `list_payrolls`
|
|
67
67
|
|
|
68
|
-
The household's payrolls, newest first, each with status, pay period, pay date, totals
|
|
68
|
+
The household's payrolls, newest first, each with status, pay period, pay date, totals, the `employee_ids` it paid and `paid_outside_confirmation` (added 1.20.0). Totals are for the whole payroll; `get_payroll` has each employee's figures. Read-only (added 1.18.0).
|
|
69
69
|
|
|
70
70
|
**Parameters:**
|
|
71
71
|
- `employee_id` (optional) — Only payrolls that paid this employee. One not in the household answers `not_found`
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import type { ConnectionLimits } from "./context.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Applies a hosted connection's limits to every registration that follows.
|
|
5
|
+
* Registrations live in server.ts and in their own modules, so the
|
|
6
|
+
* limit wraps `server.tool` once rather than asking each one to check: a tool
|
|
7
|
+
* added later is refused by default instead of offered by default. The other
|
|
8
|
+
* registration methods throw under limits rather than bypass them.
|
|
9
|
+
*
|
|
10
|
+
* Every registration is `server.tool(name, description, shape, annotations,
|
|
11
|
+
* callback)`; a test holds that, because a different overload would put the
|
|
12
|
+
* callback somewhere this does not wrap.
|
|
13
|
+
*/
|
|
14
|
+
export declare function applyConnectionLimits(server: McpServer, limits: ConnectionLimits): void;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Applies a hosted connection's limits to every registration that follows.
|
|
3
|
+
* Registrations live in server.ts and in their own modules, so the
|
|
4
|
+
* limit wraps `server.tool` once rather than asking each one to check: a tool
|
|
5
|
+
* added later is refused by default instead of offered by default. The other
|
|
6
|
+
* registration methods throw under limits rather than bypass them.
|
|
7
|
+
*
|
|
8
|
+
* Every registration is `server.tool(name, description, shape, annotations,
|
|
9
|
+
* callback)`; a test holds that, because a different overload would put the
|
|
10
|
+
* callback somewhere this does not wrap.
|
|
11
|
+
*/
|
|
12
|
+
export function applyConnectionLimits(server, limits) {
|
|
13
|
+
const register = server.tool.bind(server);
|
|
14
|
+
server.tool = (...args) => {
|
|
15
|
+
const name = args[0];
|
|
16
|
+
if (typeof name !== "string" || args.length !== 5 || typeof args[4] !== "function") {
|
|
17
|
+
throw new Error(`Unexpected tool registration shape for ${String(name)}`);
|
|
18
|
+
}
|
|
19
|
+
if (!limits.tools.includes(name))
|
|
20
|
+
return undefined;
|
|
21
|
+
const description = limits.descriptions?.[name] ?? args[1];
|
|
22
|
+
const run = args[4];
|
|
23
|
+
const guarded = async (input, extra) => {
|
|
24
|
+
const refusal = limits.refuse?.(name, input ?? {});
|
|
25
|
+
if (refusal !== null && refusal !== undefined) {
|
|
26
|
+
return { content: [{ type: "text", text: refusal }], isError: true };
|
|
27
|
+
}
|
|
28
|
+
return run(input, extra);
|
|
29
|
+
};
|
|
30
|
+
return register(name, description, args[2], args[3], guarded);
|
|
31
|
+
};
|
|
32
|
+
// The SDK's other registration paths skip the wrapper above, so under
|
|
33
|
+
// limits they refuse outright: a tool registered that way would otherwise
|
|
34
|
+
// reach the connection unlisted and unguarded. Extend this wrapper first.
|
|
35
|
+
const refuse = (method) => (name) => {
|
|
36
|
+
throw new Error(`${method}(${String(name)}) is not guarded by connection limits; register it with server.tool`);
|
|
37
|
+
};
|
|
38
|
+
server.registerTool = refuse("registerTool");
|
|
39
|
+
const tasks = server.experimental?.tasks;
|
|
40
|
+
if (tasks)
|
|
41
|
+
tasks.registerToolTask = refuse("registerToolTask");
|
|
42
|
+
}
|
package/dist/context.d.ts
CHANGED
|
@@ -1,8 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a hosted connection narrows. Absent, the server offers every
|
|
3
|
+
* tool exactly as the npm package does. The policy itself (which assistant
|
|
4
|
+
* gets which tools, and the refusal copy) lives with the host, which knows the
|
|
5
|
+
* assistant; this package only applies it.
|
|
6
|
+
*/
|
|
7
|
+
export interface ConnectionLimits {
|
|
8
|
+
/** The tools this connection offers. Any other is neither listed nor callable. */
|
|
9
|
+
tools: readonly string[];
|
|
10
|
+
/** MCP server instructions sent to the assistant on initialize. */
|
|
11
|
+
instructions?: string;
|
|
12
|
+
/** A description that replaces the hosted default for that tool. */
|
|
13
|
+
descriptions?: Readonly<Record<string, string>>;
|
|
14
|
+
/**
|
|
15
|
+
* Called before an offered tool runs. Returns the JSON text to answer with
|
|
16
|
+
* instead of running it, or null to run it. A guard here is the first of
|
|
17
|
+
* two: the API refuses the same calls for the connection's key.
|
|
18
|
+
*/
|
|
19
|
+
refuse?: (tool: string, args: Record<string, unknown>) => string | null;
|
|
20
|
+
}
|
|
1
21
|
/** A hosted request supplies its own credentials. Never change process.env per user. */
|
|
2
22
|
export interface ToolContext {
|
|
3
23
|
apiKey: string;
|
|
4
24
|
apiBase: string;
|
|
5
25
|
publicConnection?: boolean;
|
|
26
|
+
connection?: ConnectionLimits;
|
|
6
27
|
}
|
|
7
28
|
export declare function getToolContext(context?: ToolContext): ToolContext;
|
|
8
29
|
/**
|
package/dist/public-profile.js
CHANGED
|
@@ -6,10 +6,10 @@ export const publicDescriptions = {
|
|
|
6
6
|
run_payroll: "Create, approve, and process payroll for an existing household employee. Check and cash record payments the employer handles themselves. Direct deposit initiates or schedules NannyKeeper processing through Stripe. Mileage and other reimbursements go in reimbursements (up to 10 lines; for mileage send the miles and amount 0). First preview the same inputs and obtain explicit confirmation of the employee, period, pay date, amounts, and payment method. Set debit or large-payroll confirmation flags only after the user explicitly authorizes the corresponding action. Use one idempotency_key per approved payroll and reuse it on a retry with identical inputs. Do not retry a rejected payroll with changed dates, payment method, confirmation flags, or off_cycle to bypass a safeguard. Report the exact returned status; scheduled or processing does not mean paid.",
|
|
7
7
|
get_state_filing_status: "Read masked state agency account status for the connected household. Use employer_id to select an authorized household when needed. Present returned registered, pending, required, and not_required states faithfully. This tool does not register an account or submit a filing. Do not infer that missing or unassessed information means no obligation.",
|
|
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
|
-
get_payroll: "Read one payroll by ID, or list the household's payrolls (list_payrolls filters that list by employee and pay date). Returns status, dates, gross pay, each deduction, net pay, and employer taxes. Report the exact status; scheduled or processing does not mean paid.",
|
|
9
|
+
get_payroll: "Read one payroll by ID, or list the household's payrolls (list_payrolls filters that list by employee and pay date). Returns status, dates, gross pay, each deduction, net pay, and employer taxes. Report the exact status; scheduled or processing does not mean paid. For a paycheck paid outside NannyKeeper, paid_outside gives how the family paid and the employee's confirmation (confirmed, mismatch, waiting, not_asked); a mismatch means only that the employee said it does not match, so suggest they talk to each other.",
|
|
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
|
|
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
|
|
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 and only in a browser signed in to the user's own NannyKeeper account; give it to the user and tell them to open it there. 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 and only in a browser signed in to the user's own NannyKeeper account; give it to the user and tell them to open it there. 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
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.",
|
|
14
14
|
record_tax_payment: "Record that the household paid a quarter's tax to the IRS or a state agency; once that covers what is owed, NannyKeeper stops reminding them. NannyKeeper does not send the payment; call this only after the user says they paid. Read the quarter with get_quarter_taxes first. Send expected_amount when they paid the figure it showed, or amount with what they actually paid (add closes_filing for a state agency when that amount settles the filing). If the figure changed or NannyKeeper will not confirm one, show the user the returned reason and ask before trying again. Use one idempotency_key per payment and reuse it only to retry that payment. It only adds a payment: it cannot change or remove one already recorded, so send corrections to the Taxes page in NannyKeeper.",
|
|
15
15
|
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.",
|
package/dist/server.js
CHANGED
|
@@ -11,6 +11,7 @@ import { registerListPayrolls } from "./tools/list-payrolls.js";
|
|
|
11
11
|
import { registerVoidPayroll } from "./tools/void-payroll.js";
|
|
12
12
|
import { EMPLOYER_ID_OPTIONAL } from "./params.js";
|
|
13
13
|
import { executeGetPayStub, executeGetW2, executeGetScheduleH, executeGetQuarterTaxes, executeGetPayroll, executeListEmployees, } from "./tools/household.js";
|
|
14
|
+
import { applyConnectionLimits } from "./connection.js";
|
|
14
15
|
import { publicDescriptions, toolResult } from "./public-profile.js";
|
|
15
16
|
import { registerRecordTaxPayment } from "./tools/tax-payment.js";
|
|
16
17
|
/**
|
|
@@ -27,7 +28,12 @@ import { registerRecordTaxPayment } from "./tools/tax-payment.js";
|
|
|
27
28
|
export const MAX_TOOL_INPUT_ELEMENTS = 256;
|
|
28
29
|
/** A fresh server and credential closure for each hosted request. */
|
|
29
30
|
export function createNannyKeeperServer(version, context) {
|
|
30
|
-
const server = new McpServer({ name: "nannykeeper", version }, {
|
|
31
|
+
const server = new McpServer({ name: "nannykeeper", version }, {
|
|
32
|
+
maxToolInputElements: MAX_TOOL_INPUT_ELEMENTS,
|
|
33
|
+
...(context?.connection?.instructions ? { instructions: context.connection.instructions } : {}),
|
|
34
|
+
});
|
|
35
|
+
if (context?.connection)
|
|
36
|
+
applyConnectionLimits(server, context.connection);
|
|
31
37
|
/**
|
|
32
38
|
* Authority: SSA Contribution and Benefit Base; IRS Pubs. 15 and 926 (2026).
|
|
33
39
|
* Fact: the 2026 Social Security wage base is $184,500; Social Security is
|
|
@@ -152,7 +158,7 @@ export function createNannyKeeperServer(version, context) {
|
|
|
152
158
|
"Returns the finalized status (processing/pending_funding/completed/scheduled) plus full tax breakdown, " +
|
|
153
159
|
"net pay, employer costs, and the payroll ID for reference. " +
|
|
154
160
|
"Requires a Starter+ subscription. " +
|
|
155
|
-
"Plans cap active employees per employer (Starter 1, Plus 5,
|
|
161
|
+
"Plans cap active employees per employer (Starter 1, Plus 5, Pro 5 included, expandable " +
|
|
156
162
|
"to 25 at $6/mo each); if the roster exceeds the plan's count, the API returns 403 with guidance — " +
|
|
157
163
|
"the user adds employees at Settings → Billing in the dashboard (never billed implicitly via API), then retry. " +
|
|
158
164
|
"pay_date is optional. When omitted, the server picks the earliest valid business day on or " +
|
|
@@ -212,7 +218,7 @@ export function createNannyKeeperServer(version, context) {
|
|
|
212
218
|
.optional()
|
|
213
219
|
.describe("Unique key to prevent duplicate payroll creation (e.g., 'payroll-2026-04-07-emp123')"),
|
|
214
220
|
}, {
|
|
215
|
-
title: "Run
|
|
221
|
+
title: "Run payroll",
|
|
216
222
|
readOnlyHint: false,
|
|
217
223
|
destructiveHint: true,
|
|
218
224
|
idempotentHint: false,
|
|
@@ -253,7 +259,7 @@ export function createNannyKeeperServer(version, context) {
|
|
|
253
259
|
"(status, standard hours, expected net, next pay date) plus eligibility and a 3-payday schedule " +
|
|
254
260
|
"preview — or, if not enrolled, WHY (the eligibility reason, e.g. not_plus / insufficient_history). " +
|
|
255
261
|
"Without employee_id: the list of the employer's active enrollments. Read-only. " +
|
|
256
|
-
"Requires a Plus/
|
|
262
|
+
"Requires a Plus/Pro key. Get employee_id from list_employees; employer_id is optional."), {
|
|
257
263
|
employer_id: EMPLOYER_ID_OPTIONAL,
|
|
258
264
|
employee_id: z
|
|
259
265
|
.string()
|
|
@@ -277,7 +283,7 @@ export function createNannyKeeperServer(version, context) {
|
|
|
277
283
|
"`skip` (skip the next period; with through_date, skip every period up to that date for a vacation), " +
|
|
278
284
|
"`disable` (turn Autopilot off — soft-deleted so the ledger + ACH authorization are retained; the employee can re-enroll in-app). " +
|
|
279
285
|
"Turning Autopilot ON is NOT available here — it captures a standing recurring ACH authorization that must be " +
|
|
280
|
-
"done by the employer in the app. Requires a Plus/
|
|
286
|
+
"done by the employer in the app. Requires a Plus/Pro key. Confirm the action with the user before calling."), {
|
|
281
287
|
employer_id: EMPLOYER_ID_OPTIONAL,
|
|
282
288
|
employee_id: z.string().uuid().describe("Employee UUID whose enrollment to manage"),
|
|
283
289
|
action: z
|
|
@@ -317,7 +323,10 @@ export function createNannyKeeperServer(version, context) {
|
|
|
317
323
|
server.tool("get_payroll", context?.publicConnection ? publicDescriptions.get_payroll : ("Read payrolls. With payroll_id: that payroll's status, dates, and each employee's gross pay, every deduction " +
|
|
318
324
|
"(federal, Social Security, Medicare, state, local), net pay, and employer taxes. Without payroll_id: the " +
|
|
319
325
|
"household's payrolls, newest first, with totals (list_payrolls filters that list by employee and pay date). " +
|
|
320
|
-
"Use it to confirm what run_payroll created.
|
|
326
|
+
"Use it to confirm what run_payroll created. For a paycheck the family pays outside NannyKeeper, paid_outside gives " +
|
|
327
|
+
"family_method (how the family says it paid) and confirmation: confirmed, mismatch (the employee said it does not " +
|
|
328
|
+
"match what arrived; NannyKeeper does not know the difference, so suggest the two of them talk), waiting, or " +
|
|
329
|
+
"not_asked. A missing confirmation is never a problem. Read-only."), {
|
|
321
330
|
payroll_id: z.string().uuid().optional().describe("A payroll id from run_payroll. Leave it out to list payrolls."),
|
|
322
331
|
employer_id: EMPLOYER_ID_OPTIONAL,
|
|
323
332
|
}, {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* status/history and MANAGE an existing enrollment (pause / resume / skip /
|
|
6
6
|
* disable). Enrollment itself is intentionally NOT exposed — turning Autopilot
|
|
7
7
|
* on captures a standing recurring ACH authorization that must be employer-
|
|
8
|
-
* driven in the app. Requires a Plus/
|
|
8
|
+
* driven in the app. Requires a Plus/Pro key (the `ach` scope).
|
|
9
9
|
*/
|
|
10
10
|
import { type ToolContext } from "../context.ts";
|
|
11
11
|
/** Read Autopilot status for one employee, or list the employer's active enrollments. */
|
package/dist/tools/autopilot.js
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
* status/history and MANAGE an existing enrollment (pause / resume / skip /
|
|
6
6
|
* disable). Enrollment itself is intentionally NOT exposed — turning Autopilot
|
|
7
7
|
* on captures a standing recurring ACH authorization that must be employer-
|
|
8
|
-
* driven in the app. Requires a Plus/
|
|
8
|
+
* driven in the app. Requires a Plus/Pro key (the `ach` scope).
|
|
9
9
|
*/
|
|
10
10
|
import { CLIENT_HEADER, getToolContext } from "../context.js";
|
|
11
11
|
function missingKey() {
|
|
12
12
|
return JSON.stringify({
|
|
13
|
-
error: "NANNYKEEPER_API_KEY environment variable is not set. Autopilot management requires a Plus/
|
|
13
|
+
error: "NANNYKEEPER_API_KEY environment variable is not set. Autopilot management requires a Plus/Pro key: nannykeeper.com/developers/keys",
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
16
|
/** Read Autopilot status for one employee, or list the employer's active enrollments. */
|
package/dist/tools/household.js
CHANGED
|
@@ -125,7 +125,13 @@ export async function executeGetPayStub(args, context) {
|
|
|
125
125
|
* "align" these two with it.
|
|
126
126
|
*/
|
|
127
127
|
async function getTaxFormLink(path, body, context) {
|
|
128
|
-
const result = await getJson(path, {
|
|
128
|
+
const result = await getJson(path, {
|
|
129
|
+
method: "POST",
|
|
130
|
+
// The hosted connector's link opens only for the family's signed-in
|
|
131
|
+
// NannyKeeper session: its transcript is held by the assistant's
|
|
132
|
+
// vendor. The npm package's stays a plain link.
|
|
133
|
+
body: JSON.stringify({ ...body, delivery: "link", ...(context?.publicConnection ? { link_requires_sign_in: true } : {}) }),
|
|
134
|
+
}, context);
|
|
129
135
|
if (!result.ok)
|
|
130
136
|
return result.text;
|
|
131
137
|
const data = result.data.data;
|
|
@@ -138,8 +144,12 @@ async function getTaxFormLink(path, body, context) {
|
|
|
138
144
|
file_name: download.file_name,
|
|
139
145
|
download_url: download.url,
|
|
140
146
|
expires_at: download.expires_at,
|
|
141
|
-
instructions:
|
|
142
|
-
"
|
|
147
|
+
instructions: context?.publicConnection
|
|
148
|
+
? "Give the user this link and tell them to open it in the browser where they are signed in to NannyKeeper " +
|
|
149
|
+
"(from a phone app, their usual browser, not the app's own). It works for 15 minutes and only for their own " +
|
|
150
|
+
"NannyKeeper login. Do not open or fetch the link yourself."
|
|
151
|
+
: "Give the user this link and tell them to open it in their browser to download the PDF. " +
|
|
152
|
+
"It works for 15 minutes. Do not open or fetch the link yourself.",
|
|
143
153
|
});
|
|
144
154
|
}
|
|
145
155
|
export async function executeGetW2(args, context) {
|
|
@@ -3,7 +3,8 @@ import { CLIENT_HEADER, getToolContext } from "../context.js";
|
|
|
3
3
|
import { EMPLOYER_ID_OPTIONAL } from "../params.js";
|
|
4
4
|
import { toolResult } from "../public-profile.js";
|
|
5
5
|
export const LIST_PAYROLLS_DESCRIPTION = "List the household's payrolls, newest first, each with its status, pay period, pay date, total gross pay, " +
|
|
6
|
-
"total net pay, employer taxes
|
|
6
|
+
"total net pay, employer taxes, the employee_ids it paid and paid_outside_confirmation (for paychecks paid outside " +
|
|
7
|
+
"NannyKeeper: confirmed, mismatch, waiting, or null when nobody was asked). Filter with employee_id (only payrolls that paid " +
|
|
7
8
|
"that employee) and pay_date_from / pay_date_to (inclusive pay-date range, YYYY-MM-DD). Use limit for " +
|
|
8
9
|
'"the last three payrolls" (limit: 3). When has_more is true, pass next_cursor back as cursor for the next ' +
|
|
9
10
|
"page; a cursor it did not issue answers invalid_cursor, so start again without one. Totals are for the whole payroll; call get_payroll with a payroll id for each employee's gross pay, " +
|
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 with mileage, read and list payrolls and pay stubs, read a quarter's taxes, get download links for W-2s and Schedule H, list state agency account numbers, and manage existing Autopilot enrollments.
|
|
4
|
+
"version": "1.20.1",
|
|
5
|
+
"description": "Calculate US household employer (nanny) taxes for all 50 states. List employees, preview and run payroll with mileage, read and list payrolls and pay stubs, read a quarter's taxes and record a tax payment, void a payroll that has not moved money, get download links for W-2s and Schedule H, list state agency account numbers, and manage existing Autopilot enrollments. 16 tools: calculate_nanny_taxes, check_threshold, list_employees, preview_payroll, run_payroll, void_payroll, get_payroll, list_payrolls, get_pay_stub, get_w2, get_schedule_h, get_quarter_taxes, record_tax_payment, get_state_filing_status, get_autopilot, manage_autopilot.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "nannykeeper",
|
|
8
8
|
"url": "https://github.com/nannykeeper"
|
|
@@ -28,5 +28,10 @@
|
|
|
28
28
|
"NANNYKEEPER_API_KEY": ""
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
+
},
|
|
32
|
+
"compatibility": {
|
|
33
|
+
"runtimes": {
|
|
34
|
+
"node": ">=20.0.0"
|
|
35
|
+
}
|
|
31
36
|
}
|
|
32
37
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nannykeeper/mcp-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.20.1",
|
|
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": [
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@modelcontextprotocol/sdk": "^1.32.1",
|
|
57
|
-
"zod": "^4.
|
|
57
|
+
"zod": "^4.6.6"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/node": "^22.0.0",
|
|
@@ -62,6 +62,6 @@
|
|
|
62
62
|
"vitest": "^4.1.2"
|
|
63
63
|
},
|
|
64
64
|
"engines": {
|
|
65
|
-
"node": ">=
|
|
65
|
+
"node": ">=20"
|
|
66
66
|
}
|
|
67
67
|
}
|