beeswax-mcp 0.2.1 → 0.4.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/dist/index.js +2 -2
- package/dist/tools.js +183 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ if (!token) {
|
|
|
14
14
|
}
|
|
15
15
|
const client = new BeeswaxClient(baseUrl, token);
|
|
16
16
|
const toolsByName = new Map(TOOLS.map((tool) => [tool.name, tool]));
|
|
17
|
-
const server = new Server({ name: "beeswax-mcp", version: "0.
|
|
17
|
+
const server = new Server({ name: "beeswax-mcp", version: "0.4.0" }, { capabilities: { tools: {} } });
|
|
18
18
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
19
19
|
tools: TOOLS.map(({ name, description, inputSchema }) => ({ name, description, inputSchema })),
|
|
20
20
|
}));
|
|
@@ -34,7 +34,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
34
34
|
async function main() {
|
|
35
35
|
await server.connect(new StdioServerTransport());
|
|
36
36
|
// stderr only — stdout is the MCP protocol channel.
|
|
37
|
-
console.error(`beeswax-mcp ready → ${baseUrl}; ${TOOLS.length} tools (read + tax-return
|
|
37
|
+
console.error(`beeswax-mcp ready → ${baseUrl}; ${TOOLS.length} tools (read + tax-return preparation)`);
|
|
38
38
|
}
|
|
39
39
|
main().catch((err) => {
|
|
40
40
|
console.error("Fatal:", err);
|
package/dist/tools.js
CHANGED
|
@@ -290,6 +290,189 @@ export const TOOLS = [
|
|
|
290
290
|
},
|
|
291
291
|
handler: (client, args) => client.mutate("POST", `/tax_returns/${args.id}/sections/${args.section_key}/confirm`, {}),
|
|
292
292
|
},
|
|
293
|
+
{
|
|
294
|
+
name: "unconfirm_tax_return_section",
|
|
295
|
+
description: "Unlock a previously-confirmed tax-return section for editing again. Requires a token with the tax_returns:write scope.",
|
|
296
|
+
inputSchema: {
|
|
297
|
+
type: "object",
|
|
298
|
+
properties: {
|
|
299
|
+
id: { type: "integer", description: "Tax return id." },
|
|
300
|
+
section_key: { type: "string", description: "Section key to unlock." },
|
|
301
|
+
},
|
|
302
|
+
required: ["id", "section_key"],
|
|
303
|
+
},
|
|
304
|
+
handler: (client, args) => client.mutate("POST", `/tax_returns/${args.id}/sections/${args.section_key}/unconfirm`, {}),
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
name: "tax_return_preflight_check",
|
|
308
|
+
description: "Run the pre-creation reconciliation checks for a financial year (BAS periods locked, bank accounts reconciled, unallocated transactions, unmapped accounts). Blockers must be fixed in Beeswax before a tax return can be created; warnings are informational.",
|
|
309
|
+
inputSchema: {
|
|
310
|
+
type: "object",
|
|
311
|
+
properties: {
|
|
312
|
+
financial_year: { type: "integer", description: "Financial year ending, e.g. 2025 for FY2024-25." },
|
|
313
|
+
},
|
|
314
|
+
required: ["financial_year"],
|
|
315
|
+
},
|
|
316
|
+
handler: (client, args) => client.getOne(`/tax_returns/preflight_check?financial_year=${args.financial_year}`, ""),
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
name: "create_tax_return",
|
|
320
|
+
description: "Create a draft tax return for a financial year and auto-populate it from the ledger. Runs the preflight reconciliation checks first and fails with the blockers if any exist. return_type defaults to the account's business structure. Requires a token with the tax_returns:write scope.",
|
|
321
|
+
inputSchema: {
|
|
322
|
+
type: "object",
|
|
323
|
+
properties: {
|
|
324
|
+
financial_year: { type: "integer", description: "Financial year ending, e.g. 2025 for FY2024-25." },
|
|
325
|
+
return_type: { type: "string", description: "Optional: sole_trader or company." },
|
|
326
|
+
},
|
|
327
|
+
required: ["financial_year"],
|
|
328
|
+
},
|
|
329
|
+
handler: (client, args) => client.mutate("POST", "/tax_returns", {
|
|
330
|
+
financial_year: args.financial_year,
|
|
331
|
+
return_type: args.return_type,
|
|
332
|
+
}),
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
name: "repopulate_tax_return",
|
|
336
|
+
description: "Refresh a draft tax return's auto-filled figures from the latest ledger data (after new transactions or mapping changes). Manual overrides are preserved. Requires a token with the tax_returns:write scope.",
|
|
337
|
+
inputSchema: {
|
|
338
|
+
type: "object",
|
|
339
|
+
properties: { id: { type: "integer", description: "Tax return id." } },
|
|
340
|
+
required: ["id"],
|
|
341
|
+
},
|
|
342
|
+
handler: (client, args) => client.mutate("POST", `/tax_returns/${args.id}/repopulate`, {}),
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
name: "request_tax_return_ai_review",
|
|
346
|
+
description: "Start an AI review of the tax return. The review runs in the background — poll get_tax_return (latest_review) or list_tax_return_findings to see the outcome. Requires a token with the tax_returns:write scope.",
|
|
347
|
+
inputSchema: {
|
|
348
|
+
type: "object",
|
|
349
|
+
properties: { id: { type: "integer", description: "Tax return id." } },
|
|
350
|
+
required: ["id"],
|
|
351
|
+
},
|
|
352
|
+
handler: (client, args) => client.mutate("POST", `/tax_returns/${args.id}/review`, {}),
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
name: "resolve_tax_return_finding",
|
|
356
|
+
description: "Resolve one pending AI review finding: accept (applies the suggested value to the field), reject, or defer. Every pending finding in a section must be resolved before that section can be confirmed. Requires a token with the tax_returns:write scope.",
|
|
357
|
+
inputSchema: {
|
|
358
|
+
type: "object",
|
|
359
|
+
properties: {
|
|
360
|
+
id: { type: "integer", description: "Tax return id." },
|
|
361
|
+
finding_id: { type: "integer", description: "Finding id (from list_tax_return_findings)." },
|
|
362
|
+
resolution: { type: "string", enum: ["accept", "reject", "defer"], description: "How to resolve the finding." },
|
|
363
|
+
},
|
|
364
|
+
required: ["id", "finding_id", "resolution"],
|
|
365
|
+
},
|
|
366
|
+
handler: (client, args) => client.mutate("POST", `/tax_returns/${args.id}/findings/${args.finding_id}/resolve`, {
|
|
367
|
+
resolution: args.resolution,
|
|
368
|
+
}),
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
name: "finalise_tax_return",
|
|
372
|
+
description: "Finalise a tax return once every section is confirmed. A finalised return is locked against edits (use unfinalise_tax_return to unlock it). This does NOT lodge the return with the ATO. Requires a token with the tax_returns:write scope.",
|
|
373
|
+
inputSchema: {
|
|
374
|
+
type: "object",
|
|
375
|
+
properties: { id: { type: "integer", description: "Tax return id." } },
|
|
376
|
+
required: ["id"],
|
|
377
|
+
},
|
|
378
|
+
handler: (client, args) => client.mutate("POST", `/tax_returns/${args.id}/finalise`, {}),
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
name: "list_tax_return_field_notes",
|
|
382
|
+
description: "The note timeline for one tax-return field, oldest first — who wrote what, when, and from where (web, api, or assistant). This is the durable record of WHY a figure is what it is; read it before changing a field that has notes.",
|
|
383
|
+
inputSchema: {
|
|
384
|
+
type: "object",
|
|
385
|
+
properties: {
|
|
386
|
+
id: { type: "integer", description: "Tax return id." },
|
|
387
|
+
section_key: { type: "string" },
|
|
388
|
+
field_key: { type: "string" },
|
|
389
|
+
},
|
|
390
|
+
required: ["id", "section_key", "field_key"],
|
|
391
|
+
},
|
|
392
|
+
handler: (client, args) => client.getOne(`/tax_returns/${args.id}/sections/${args.section_key}/fields/${args.field_key}/notes`, ""),
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
name: "add_tax_return_field_note",
|
|
396
|
+
description: "Append a dated, attributed note to a tax-return field's timeline — a decision, its reasoning, a follow-up, or context for next year. Notes are never deleted (you can correct your own with edit_tax_return_field_note). Recorded as written by the assistant. Requires tax_returns:write.",
|
|
397
|
+
inputSchema: {
|
|
398
|
+
type: "object",
|
|
399
|
+
properties: {
|
|
400
|
+
id: { type: "integer", description: "Tax return id." },
|
|
401
|
+
section_key: { type: "string" },
|
|
402
|
+
field_key: { type: "string" },
|
|
403
|
+
text: { type: "string", description: "The note (up to 4000 characters)." },
|
|
404
|
+
},
|
|
405
|
+
required: ["id", "section_key", "field_key", "text"],
|
|
406
|
+
},
|
|
407
|
+
handler: (client, args) => client.mutate("POST", `/tax_returns/${args.id}/sections/${args.section_key}/fields/${args.field_key}/notes`, {
|
|
408
|
+
text: args.text,
|
|
409
|
+
source: "mcp",
|
|
410
|
+
}),
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
name: "edit_tax_return_field_note",
|
|
414
|
+
description: "Correct a field note you wrote earlier (a typo, a wrong figure). The note keeps its place in the timeline and is marked as edited. You can only edit notes written under this token's user. Requires tax_returns:write.",
|
|
415
|
+
inputSchema: {
|
|
416
|
+
type: "object",
|
|
417
|
+
properties: {
|
|
418
|
+
id: { type: "integer", description: "Tax return id." },
|
|
419
|
+
section_key: { type: "string" },
|
|
420
|
+
note_id: { type: "integer" },
|
|
421
|
+
text: { type: "string", description: "The corrected note text." },
|
|
422
|
+
},
|
|
423
|
+
required: ["id", "section_key", "note_id", "text"],
|
|
424
|
+
},
|
|
425
|
+
handler: (client, args) => client.mutate("PATCH", `/tax_returns/${args.id}/sections/${args.section_key}/notes/${args.note_id}`, { text: args.text }),
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
name: "get_tax_return_conversation",
|
|
429
|
+
description: "The discussion thread on a tax return — the same conversation the business owner, bookkeeper and accountant see in Beeswax. Read it to pick up questions, decisions and context before working on the return.",
|
|
430
|
+
inputSchema: {
|
|
431
|
+
type: "object",
|
|
432
|
+
properties: {
|
|
433
|
+
id: { type: "integer", description: "Tax return id." },
|
|
434
|
+
limit: { type: "integer", description: "Most recent messages to return (default 100)." },
|
|
435
|
+
},
|
|
436
|
+
required: ["id"],
|
|
437
|
+
},
|
|
438
|
+
handler: (client, args) => client.getOne(`/tax_returns/${args.id}/conversation?limit=${args.limit ?? 100}`, ""),
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
name: "post_tax_return_message",
|
|
442
|
+
description: "Post a message into the tax return's discussion thread, visible to everyone on the return in Beeswax. Use it to ask the owner or accountant a question, report what you did, or flag something for a human decision. Requires tax_returns:write.",
|
|
443
|
+
inputSchema: {
|
|
444
|
+
type: "object",
|
|
445
|
+
properties: {
|
|
446
|
+
id: { type: "integer", description: "Tax return id." },
|
|
447
|
+
body: { type: "string" },
|
|
448
|
+
},
|
|
449
|
+
required: ["id", "body"],
|
|
450
|
+
},
|
|
451
|
+
handler: (client, args) => client.mutate("POST", `/tax_returns/${args.id}/conversation/messages`, { body: args.body }),
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
name: "compare_tax_returns",
|
|
455
|
+
description: "Field-by-field comparison of a tax return against the same-type return for another financial year: prior value, current value, delta and % change per field. Fields blank in both years are omitted.",
|
|
456
|
+
inputSchema: {
|
|
457
|
+
type: "object",
|
|
458
|
+
properties: {
|
|
459
|
+
id: { type: "integer", description: "Tax return id (the current-year return)." },
|
|
460
|
+
financial_year: { type: "integer", description: "The other financial year to compare against, e.g. 2024." },
|
|
461
|
+
},
|
|
462
|
+
required: ["id", "financial_year"],
|
|
463
|
+
},
|
|
464
|
+
handler: (client, args) => client.getOne(`/tax_returns/${args.id}/compare?financial_year=${args.financial_year}`, ""),
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
name: "unfinalise_tax_return",
|
|
468
|
+
description: "Unlock a finalised (not lodged) tax return back to draft for further editing. Requires a token with the tax_returns:write scope.",
|
|
469
|
+
inputSchema: {
|
|
470
|
+
type: "object",
|
|
471
|
+
properties: { id: { type: "integer", description: "Tax return id." } },
|
|
472
|
+
required: ["id"],
|
|
473
|
+
},
|
|
474
|
+
handler: (client, args) => client.mutate("POST", `/tax_returns/${args.id}/unfinalise`, {}),
|
|
475
|
+
},
|
|
293
476
|
// ── Manual / general journal entries (RawJournalEntry) ──────────────────
|
|
294
477
|
{
|
|
295
478
|
name: "list_manual_journals",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "beeswax-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Official MCP server for Beeswax (beeswaxapp.com) — query invoices, quotes, expenses, payments, journals, time entries, projects and tax returns from Claude and other MCP clients.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://www.beeswaxapp.com/support/mcp-setup",
|