@nannykeeper/mcp-server 1.10.0 → 1.10.2

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
@@ -10,9 +10,9 @@ Calculate nanny taxes for all 50 US states.
10
10
  - `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)
11
11
  - `get_autopilot` — Read Autopilot (recurring auto-run payroll) status for an employee, or list an employer's active enrollments (Plus/Professional, `ach` scope)
12
12
  - `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/Professional, `ach` scope) — added 1.9.0
13
- - `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` (NK-695) — omit it for a single-household customer; ⚠️ a **test-mode key must pass one**, because a key's default household is always the user's REAL one and the endpoint enforces the test/live boundary.
13
+ - `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.
14
14
 
15
- ⛔ **Declare tool parameters in `index.ts`, never in the tool descriptor.** `server.tool()` takes its own zod shape, so a `inputSchema` on the exported descriptor is read by NOTHING. That is the same trap as the inline tool DESCRIPTION that `index.ts` used to restate: on NK-395/NK-695 a second copy turned out to be the dead one **five times**, including a rewritten description that reached zero agents. Import the descriptor's `name`/`description`; put parameters in the zod shape.
15
+ **Declare tool parameters in `index.ts`, never in the tool descriptor.** `server.tool()` takes its own zod shape, so an `inputSchema` on the exported descriptor is read by nothing. The same applies to the tool description: `index.ts` must import the descriptor's `name` and `description` rather than restating them, or the copy an agent actually reads can drift from the one being edited.
16
16
 
17
17
  ## Autopilot (get_autopilot, manage_autopilot)
18
18
  Autopilot auto-runs each period's payroll onto the existing scheduled-fire path so a household never misses a paycheck. The MCP surface is **manage-only**: read status/enrollments and pause/resume/skip/disable. Turning it ON must happen in the app (standing ACH authorization = employer-driven consent), so there is no enroll tool — `POST /api/v1/autopilot/enroll` returns 403 pointing back to the app. `skip` with `through_date` skips every period up to that date (vacation). Confirm any management action with the user before calling.
package/dist/index.js CHANGED
@@ -17,6 +17,7 @@
17
17
  */
18
18
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
19
19
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
20
+ import { createRequire } from "node:module";
20
21
  import { z } from "zod";
21
22
  import { executeCalculate } from "./tools/calculate.js";
22
23
  import { executeThreshold } from "./tools/threshold.js";
@@ -24,9 +25,21 @@ import { executePreviewPayroll } from "./tools/preview-payroll.js";
24
25
  import { executeRunPayroll } from "./tools/run-payroll.js";
25
26
  import { executeStateFilingStatus, stateFilingStatusTool, } from "./tools/state-filing-status.js";
26
27
  import { executeGetAutopilot, executeManageAutopilot } from "./tools/autopilot.js";
28
+ /**
29
+ * Derived, never hardcoded. This is the version the client sees in the
30
+ * `initialize` handshake, so a literal here can disagree with the package it
31
+ * ships in — the version fields live in several files and a hardcoded copy is
32
+ * the one that gets missed.
33
+ *
34
+ * `createRequire` rather than an import attribute: this package targets Node
35
+ * >=18, where `with { type: "json" }` is still behind a flag on the older
36
+ * runtimes in that range. npm always ships package.json, and `dist/index.js`
37
+ * sits one level down, so `../package.json` resolves in the published layout.
38
+ */
39
+ const { version: SERVER_VERSION } = createRequire(import.meta.url)("../package.json");
27
40
  const server = new McpServer({
28
41
  name: "nannykeeper",
29
- version: "1.9.0",
42
+ version: SERVER_VERSION,
30
43
  });
31
44
  /**
32
45
  * Authority: SSA Contribution and Benefit Base; IRS Pubs. 15 and 926 (2026).
@@ -210,16 +223,13 @@ server.tool("run_payroll", "Run payroll for a household employee end-to-end in a
210
223
  });
211
224
  // Register get_state_filing_status tool
212
225
  server.tool(stateFilingStatusTool.name,
213
- // ⛔ IMPORTED, not restated. The inline copy that used to sit here was the
214
- // one agents actually read, and it drifted out of date the moment NK-395
215
- // edited the exported descriptor instead — promising "a registration URL for
216
- // any that are missing" long after that stopped being true.
226
+ // Imported, not restated. An inline copy here is the one agents actually
227
+ // read, so it silently diverges the moment someone edits the exported
228
+ // descriptor instead.
217
229
  stateFilingStatusTool.description, {
218
- // ⛔ THIS is the shape agents actually see — the `{}` that used to sit here
219
- // is why the descriptor's own `inputSchema` was read by nothing and has now
220
- // been deleted rather than extended (NK-695). Declaring a parameter there
221
- // would have reached zero agents, which is the fifth time on this issue
222
- // that a second copy turned out to be the dead one.
230
+ // This is the parameter shape agents actually see. Declare parameters
231
+ // here — an `inputSchema` on the exported descriptor is read by nothing,
232
+ // which is why the descriptor no longer carries one.
223
233
  employer_id: z
224
234
  .string()
225
235
  .uuid()
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * `index.ts` registers this tool with its own description, so the exported
10
10
  * const was imported by nothing — and had already drifted from the shipped
11
- * text in both directions. It cost NK-395 a HIGH on the sibling tool: a
11
+ * text in both directions. It has already bitten the sibling tool once: a
12
12
  * customer-facing prompt was rewritten in the dead copy while every agent kept
13
13
  * reading the stale live one.
14
14
  *
@@ -9,7 +9,7 @@ const API_BASE = process.env.NANNYKEEPER_API_URL || "https://www.nannykeeper.com
9
9
  *
10
10
  * `index.ts` registers this tool with its own description, so the exported
11
11
  * const was imported by nothing — and had already drifted from the shipped
12
- * text in both directions. It cost NK-395 a HIGH on the sibling tool: a
12
+ * text in both directions. It has already bitten the sibling tool once: a
13
13
  * customer-facing prompt was rewritten in the dead copy while every agent kept
14
14
  * reading the stale live one.
15
15
  *
@@ -19,37 +19,21 @@
19
19
  * confirmation context.
20
20
  */
21
21
  /**
22
- * ⛔ THE SINGLE DEFINITION, and `index.ts` now imports it.
23
- *
24
- * It did not. `index.ts` registered this tool with its OWN inline description
25
- * string, so this const was exported and imported by nothing — dead. NK-395
26
- * carefully rewrote it to define `not_required` and to say "never tell them to
27
- * go register for it", and none of that reached a single agent: the live
28
- * registration still promised "a registration URL for any that are missing",
29
- * which is now false, and the word `not_required` appeared in no prompt any
30
- * model would ever see.
31
- *
32
- * 🔑 That is the fourth time on this issue that a fix landed somewhere nothing
33
- * reads — after a guard keyed on an unbackfilled column, a parameter no caller
34
- * passed, and a tRPC option nothing forwarded. The pattern is the same every
35
- * time: **a second copy is the defect generator.** Two of the other tool
36
- * descriptors in this package are dead the same way and have already drifted
37
- * from what ships, which is what makes this worth removing rather than
38
- * policing. Import this; never restate it.
22
+ * The single definition of this tool's name and description. `index.ts` imports
23
+ * it rather than restating it: an inline copy there is the one agents actually
24
+ * read, so edits made here would never reach a model.
39
25
  */
40
26
  export declare const stateFilingStatusTool: {
41
27
  name: string;
42
28
  description: string;
43
29
  };
44
30
  /**
45
- * ⛔ The `employer_id` passthrough is not optional plumbing.
31
+ * The `employer_id` passthrough is required, not optional plumbing.
46
32
  *
47
- * `/api/v1/state-registrations` enforces the test/live boundary (NK-695), and
48
- * an API key's stamped household is always the user's REAL one. So a server
49
- * configured with a `nk_test_` key and no way to name a household would get a
50
- * permanent 403 here — the endpoint "enforced" by being unreachable, which is
51
- * the exact failure the route's own docblock argues against, just moved one
52
- * layer up into the tool that calls it. Found by `/code-review` on NK-695.
33
+ * `/api/v1/state-registrations` enforces the test/live boundary, and an API
34
+ * key's stored household is always the real one. A server configured with a
35
+ * `nk_test_` key and no way to name a household would therefore be refused on
36
+ * every call, with no way to reach the sandbox it is meant to work against.
53
37
  */
54
38
  export declare function executeStateFilingStatus(args?: {
55
39
  employer_id?: string;
@@ -20,23 +20,9 @@
20
20
  */
21
21
  const API_BASE = process.env.NANNYKEEPER_API_URL || "https://www.nannykeeper.com";
22
22
  /**
23
- * ⛔ THE SINGLE DEFINITION, and `index.ts` now imports it.
24
- *
25
- * It did not. `index.ts` registered this tool with its OWN inline description
26
- * string, so this const was exported and imported by nothing — dead. NK-395
27
- * carefully rewrote it to define `not_required` and to say "never tell them to
28
- * go register for it", and none of that reached a single agent: the live
29
- * registration still promised "a registration URL for any that are missing",
30
- * which is now false, and the word `not_required` appeared in no prompt any
31
- * model would ever see.
32
- *
33
- * 🔑 That is the fourth time on this issue that a fix landed somewhere nothing
34
- * reads — after a guard keyed on an unbackfilled column, a parameter no caller
35
- * passed, and a tRPC option nothing forwarded. The pattern is the same every
36
- * time: **a second copy is the defect generator.** Two of the other tool
37
- * descriptors in this package are dead the same way and have already drifted
38
- * from what ships, which is what makes this worth removing rather than
39
- * policing. Import this; never restate it.
23
+ * The single definition of this tool's name and description. `index.ts` imports
24
+ * it rather than restating it: an inline copy there is the one agents actually
25
+ * read, so edits made here would never reach a model.
40
26
  */
41
27
  export const stateFilingStatusTool = {
42
28
  name: "get_state_filing_status",
@@ -53,21 +39,17 @@ export const stateFilingStatusTool = {
53
39
  "quarterly filing instructions, or when a customer asks 'do I have my " +
54
40
  "state account numbers set up?' Read-only — to update, use the REST " +
55
41
  "API or direct the customer to /settings/states.",
56
- // ⛔ No `inputSchema` here on purpose. There used to be one, and it was read
57
- // by NOTHING — `index.ts` passes its own zod shape to `server.tool()`, so the
58
- // declaration here reached zero agents exactly the way the inline description
59
- // above it did. Declare parameters in `index.ts`; a second copy is the defect
60
- // generator, and on this issue it has now been the dead one five times.
42
+ // No `inputSchema` here on purpose: `index.ts` passes its own zod shape to
43
+ // `server.tool()`, so a declaration here would reach no agent. Declare
44
+ // parameters there.
61
45
  };
62
46
  /**
63
- * ⛔ The `employer_id` passthrough is not optional plumbing.
47
+ * The `employer_id` passthrough is required, not optional plumbing.
64
48
  *
65
- * `/api/v1/state-registrations` enforces the test/live boundary (NK-695), and
66
- * an API key's stamped household is always the user's REAL one. So a server
67
- * configured with a `nk_test_` key and no way to name a household would get a
68
- * permanent 403 here — the endpoint "enforced" by being unreachable, which is
69
- * the exact failure the route's own docblock argues against, just moved one
70
- * layer up into the tool that calls it. Found by `/code-review` on NK-695.
49
+ * `/api/v1/state-registrations` enforces the test/live boundary, and an API
50
+ * key's stored household is always the real one. A server configured with a
51
+ * `nk_test_` key and no way to name a household would therefore be refused on
52
+ * every call, with no way to reach the sandbox it is meant to work against.
71
53
  */
72
54
  export async function executeStateFilingStatus(args) {
73
55
  const apiKey = process.env.NANNYKEEPER_API_KEY;
@@ -107,7 +89,7 @@ export async function executeStateFilingStatus(args) {
107
89
  agency: r.agency,
108
90
  last_four: r.account_number_last_four,
109
91
  status: r.status,
110
- // ⛔ `not_required` joins `registered` here (NK-395). The upstream
92
+ // ⛔ `not_required` joins `registered` here. The upstream
111
93
  // route already nulls it, so this is belt-and-braces — but this tool
112
94
  // is what an agent actually reads, and handing it a URL for a
113
95
  // registration we just said is not required is how the agent ends up
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * `index.ts` registers this tool with its own description, so the exported
10
10
  * const was imported by nothing — and had already drifted from the shipped
11
- * text in both directions. It cost NK-395 a HIGH on the sibling tool: a
11
+ * text in both directions. It has already bitten the sibling tool once: a
12
12
  * customer-facing prompt was rewritten in the dead copy while every agent kept
13
13
  * reading the stale live one.
14
14
  *
@@ -9,7 +9,7 @@ const API_BASE = process.env.NANNYKEEPER_API_URL || "https://www.nannykeeper.com
9
9
  *
10
10
  * `index.ts` registers this tool with its own description, so the exported
11
11
  * const was imported by nothing — and had already drifted from the shipped
12
- * text in both directions. It cost NK-395 a HIGH on the sibling tool: a
12
+ * text in both directions. It has already bitten the sibling tool once: a
13
13
  * customer-facing prompt was rewritten in the dead copy while every agent kept
14
14
  * reading the stale live one.
15
15
  *
package/manifest.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": "0.3",
3
3
  "name": "nannykeeper",
4
- "version": "1.10.0",
4
+ "version": "1.10.2",
5
5
  "description": "Calculate US household employer (nanny) taxes for all 50 states. Preview and run payroll, list state agency account numbers, and manage existing Autopilot enrollments. 7 tools: calculate_nanny_taxes, check_threshold, preview_payroll, run_payroll, get_state_filing_status, get_autopilot, manage_autopilot.",
6
6
  "author": {
7
7
  "name": "nannykeeper",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nannykeeper/mcp-server",
3
- "version": "1.10.0",
3
+ "version": "1.10.2",
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": [
@@ -44,7 +44,7 @@
44
44
  "AGENTS.md"
45
45
  ],
46
46
  "scripts": {
47
- "_comment_prepublishOnly": "⛔ dist/ is gitignored, so it NEVER updates from a git pull — only from a build in that exact directory. 1.9.0 shipped from a checkout whose dist/ was 2.5 months old: no autopilot tools, no NK-395 description, no NK-695 employer_id. A version number said 1.9.0 over mid-June code, and npm versions are immutable, so the only remedy was to burn the number and cut 1.10.0. npm runs this hook in the publish directory immediately before packing, which is the one place a build cannot be in the wrong tree. Do not remove it (NK-696).",
47
+ "_comment_prepublishOnly": "dist/ is gitignored, so it is refreshed only by a build in this directory. This hook runs immediately before packing, in whatever directory the publish runs from, so the compiled output always matches the source being published. Do not remove it.",
48
48
  "prepublishOnly": "npm run build",
49
49
  "build": "tsc",
50
50
  "dev": "tsc --watch",