@nannykeeper/mcp-server 1.6.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/README.md +1 -1
- package/dist/index.js +21 -1
- package/dist/tools/state-filing-status.d.ts +30 -0
- package/dist/tools/state-filing-status.js +92 -0
- package/manifest.json +3 -3
- package/package.json +3 -3
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. " +
|
|
@@ -169,6 +170,25 @@ server.tool("run_payroll", "Run payroll for a household employee end-to-end in a
|
|
|
169
170
|
const result = await executeRunPayroll(args);
|
|
170
171
|
return { content: [{ type: "text", text: result }] };
|
|
171
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
|
+
});
|
|
172
192
|
// Start server
|
|
173
193
|
async function main() {
|
|
174
194
|
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
|
@@ -4,13 +4,13 @@
|
|
|
4
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": {
|