@nannykeeper/mcp-server 1.6.0 → 1.7.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/README.md +1 -1
- package/dist/index.js +24 -1
- package/dist/tools/state-filing-status.d.ts +30 -0
- package/dist/tools/state-filing-status.js +92 -0
- package/manifest.json +5 -5
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -159,7 +159,7 @@ Full privacy policy: [nannykeeper.com/privacy](https://www.nannykeeper.com/priva
|
|
|
159
159
|
## Support
|
|
160
160
|
|
|
161
161
|
- **Email:** hello@nannykeeper.com
|
|
162
|
-
- **GitHub Issues:** [github.com/
|
|
162
|
+
- **GitHub Issues:** [github.com/nannykeeper/mcp-server/issues](https://github.com/nannykeeper/mcp-server/issues)
|
|
163
163
|
- **Documentation:** [nannykeeper.com/developers](https://www.nannykeeper.com/developers)
|
|
164
164
|
- **MCP Setup Guide:** [nannykeeper.com/developers/mcp](https://www.nannykeeper.com/developers/mcp)
|
|
165
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. " +
|
|
@@ -111,6 +112,9 @@ server.tool("run_payroll", "Run payroll for a household employee end-to-end in a
|
|
|
111
112
|
"Returns the finalized status (processing/pending_funding/completed/scheduled) plus full tax breakdown, " +
|
|
112
113
|
"net pay, employer costs, and the payroll ID for reference. " +
|
|
113
114
|
"Requires a Starter+ subscription. " +
|
|
115
|
+
"Plans cap active employees per employer (Starter 1, Plus 5, Professional 5 included, expandable " +
|
|
116
|
+
"to 25 at $6/mo each); if the roster exceeds the plan's count, the API returns 403 with guidance — " +
|
|
117
|
+
"the user adds employees at Settings → Billing in the dashboard (never billed implicitly via API), then retry. " +
|
|
114
118
|
"pay_date is optional — when omitted, the server picks the earliest valid pay date " +
|
|
115
119
|
"based on ACH submission lead time and echoes it back. If supplied and past the " +
|
|
116
120
|
"submission deadline, the request is rejected with next_valid_pay_date in the error. " +
|
|
@@ -169,6 +173,25 @@ server.tool("run_payroll", "Run payroll for a household employee end-to-end in a
|
|
|
169
173
|
const result = await executeRunPayroll(args);
|
|
170
174
|
return { content: [{ type: "text", text: result }] };
|
|
171
175
|
});
|
|
176
|
+
// Register get_state_filing_status tool
|
|
177
|
+
server.tool("get_state_filing_status", "List the employer's state agency account numbers (last-four only) per " +
|
|
178
|
+
"(state, registration_type) tuple — UC, withholding, SDI. Returns the " +
|
|
179
|
+
"agency name and a registration URL for any that are missing. Use " +
|
|
180
|
+
"before generating quarterly filing instructions (e.g., 'file Form UC-2 " +
|
|
181
|
+
"for Q2 — your PA UC account is ••••5678') or when a customer asks " +
|
|
182
|
+
"whether their state setup is complete. Read-only. To update, use the " +
|
|
183
|
+
"POST /api/v1/state-registrations REST endpoint or direct the customer " +
|
|
184
|
+
"to /settings/states — LLMs shouldn't fabricate account numbers since " +
|
|
185
|
+
"they land on real tax filings.", {}, {
|
|
186
|
+
title: "Get State Filing Status",
|
|
187
|
+
readOnlyHint: true,
|
|
188
|
+
destructiveHint: false,
|
|
189
|
+
idempotentHint: true,
|
|
190
|
+
openWorldHint: true,
|
|
191
|
+
}, async () => {
|
|
192
|
+
const result = await executeStateFilingStatus();
|
|
193
|
+
return { content: [{ type: "text", text: result }] };
|
|
194
|
+
});
|
|
172
195
|
// Start server
|
|
173
196
|
async function main() {
|
|
174
197
|
const transport = new StdioServerTransport();
|
|
@@ -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.
|
|
5
|
-
"description": "Calculate US household employer (nanny) taxes for all 50 states. Preview and run payroll, generate W-2s and pay stubs.
|
|
4
|
+
"version": "1.7.0",
|
|
5
|
+
"description": "Calculate US household employer (nanny) taxes for all 50 states. Preview and run payroll, generate W-2s and pay stubs, list state agency account numbers. 5 tools: calculate, threshold, preview, run, state-filing-status.",
|
|
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.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": [
|
|
@@ -26,16 +26,16 @@
|
|
|
26
26
|
"homepage": "https://www.nannykeeper.com/developers/mcp",
|
|
27
27
|
"repository": {
|
|
28
28
|
"type": "git",
|
|
29
|
-
"url": "https://github.com/
|
|
29
|
+
"url": "git+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": {
|
|
36
|
-
"nannykeeper-mcp": "
|
|
36
|
+
"nannykeeper-mcp": "dist/index.js"
|
|
37
37
|
},
|
|
38
|
-
"main": "
|
|
38
|
+
"main": "dist/index.js",
|
|
39
39
|
"files": [
|
|
40
40
|
"dist",
|
|
41
41
|
"manifest.json",
|
|
@@ -62,4 +62,4 @@
|
|
|
62
62
|
"engines": {
|
|
63
63
|
"node": ">=18"
|
|
64
64
|
}
|
|
65
|
-
}
|
|
65
|
+
}
|