@frihet/mcp-server 1.9.0-beta.1 → 1.12.0-beta.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.
Files changed (117) hide show
  1. package/README.md +261 -13
  2. package/dist/__tests__/d4b-hr-payroll-onboarding-tools.test.d.ts +13 -0
  3. package/dist/__tests__/d4b-hr-payroll-onboarding-tools.test.d.ts.map +1 -0
  4. package/dist/__tests__/d4b-hr-payroll-onboarding-tools.test.js +420 -0
  5. package/dist/__tests__/d4b-hr-payroll-onboarding-tools.test.js.map +1 -0
  6. package/dist/__tests__/einvoice-day4-tools.test.d.ts +16 -0
  7. package/dist/__tests__/einvoice-day4-tools.test.d.ts.map +1 -0
  8. package/dist/__tests__/einvoice-day4-tools.test.js +377 -0
  9. package/dist/__tests__/einvoice-day4-tools.test.js.map +1 -0
  10. package/dist/__tests__/einvoice-tools.test.d.ts +1 -1
  11. package/dist/__tests__/einvoice-tools.test.js +25 -12
  12. package/dist/__tests__/einvoice-tools.test.js.map +1 -1
  13. package/dist/__tests__/fiscal-tools.test.d.ts +5 -4
  14. package/dist/__tests__/fiscal-tools.test.d.ts.map +1 -1
  15. package/dist/__tests__/fiscal-tools.test.js +8 -26
  16. package/dist/__tests__/fiscal-tools.test.js.map +1 -1
  17. package/dist/__tests__/recurring-tools.test.d.ts +14 -7
  18. package/dist/__tests__/recurring-tools.test.d.ts.map +1 -1
  19. package/dist/__tests__/recurring-tools.test.js +195 -9
  20. package/dist/__tests__/recurring-tools.test.js.map +1 -1
  21. package/dist/__tests__/team-tools.test.d.ts +18 -0
  22. package/dist/__tests__/team-tools.test.d.ts.map +1 -0
  23. package/dist/__tests__/team-tools.test.js +228 -0
  24. package/dist/__tests__/team-tools.test.js.map +1 -0
  25. package/dist/__tests__/time-tools.test.d.ts +9 -7
  26. package/dist/__tests__/time-tools.test.d.ts.map +1 -1
  27. package/dist/__tests__/time-tools.test.js +96 -9
  28. package/dist/__tests__/time-tools.test.js.map +1 -1
  29. package/dist/client-interface.d.ts +236 -0
  30. package/dist/client-interface.d.ts.map +1 -1
  31. package/dist/client.d.ts +236 -0
  32. package/dist/client.d.ts.map +1 -1
  33. package/dist/client.js +261 -2
  34. package/dist/client.js.map +1 -1
  35. package/dist/index.js +4 -4
  36. package/dist/index.js.map +1 -1
  37. package/dist/tools/accountingClose.d.ts +20 -0
  38. package/dist/tools/accountingClose.d.ts.map +1 -0
  39. package/dist/tools/accountingClose.js +119 -0
  40. package/dist/tools/accountingClose.js.map +1 -0
  41. package/dist/tools/audit_gl.d.ts +19 -0
  42. package/dist/tools/audit_gl.d.ts.map +1 -0
  43. package/dist/tools/audit_gl.js +86 -0
  44. package/dist/tools/audit_gl.js.map +1 -0
  45. package/dist/tools/bank_rules.d.ts +23 -0
  46. package/dist/tools/bank_rules.d.ts.map +1 -0
  47. package/dist/tools/bank_rules.js +96 -0
  48. package/dist/tools/bank_rules.js.map +1 -0
  49. package/dist/tools/einvoice.d.ts +70 -3
  50. package/dist/tools/einvoice.d.ts.map +1 -1
  51. package/dist/tools/einvoice.js +421 -3
  52. package/dist/tools/einvoice.js.map +1 -1
  53. package/dist/tools/fiscal.d.ts +3 -2
  54. package/dist/tools/fiscal.d.ts.map +1 -1
  55. package/dist/tools/fiscal.js +4 -22
  56. package/dist/tools/fiscal.js.map +1 -1
  57. package/dist/tools/gestoria.d.ts +28 -0
  58. package/dist/tools/gestoria.d.ts.map +1 -0
  59. package/dist/tools/gestoria.js +248 -0
  60. package/dist/tools/gestoria.js.map +1 -0
  61. package/dist/tools/hr.d.ts +24 -0
  62. package/dist/tools/hr.d.ts.map +1 -0
  63. package/dist/tools/hr.js +219 -0
  64. package/dist/tools/hr.js.map +1 -0
  65. package/dist/tools/igic.d.ts +19 -0
  66. package/dist/tools/igic.d.ts.map +1 -0
  67. package/dist/tools/igic.js +102 -0
  68. package/dist/tools/igic.js.map +1 -0
  69. package/dist/tools/impuesto_sociedades.d.ts +18 -0
  70. package/dist/tools/impuesto_sociedades.d.ts.map +1 -0
  71. package/dist/tools/impuesto_sociedades.js +64 -0
  72. package/dist/tools/impuesto_sociedades.js.map +1 -0
  73. package/dist/tools/onboard_vies.d.ts +22 -0
  74. package/dist/tools/onboard_vies.d.ts.map +1 -0
  75. package/dist/tools/onboard_vies.js +74 -0
  76. package/dist/tools/onboard_vies.js.map +1 -0
  77. package/dist/tools/onboarding.d.ts +19 -0
  78. package/dist/tools/onboarding.d.ts.map +1 -0
  79. package/dist/tools/onboarding.js +63 -0
  80. package/dist/tools/onboarding.js.map +1 -0
  81. package/dist/tools/payroll.d.ts +20 -0
  82. package/dist/tools/payroll.d.ts.map +1 -0
  83. package/dist/tools/payroll.js +73 -0
  84. package/dist/tools/payroll.js.map +1 -0
  85. package/dist/tools/permissions.d.ts +19 -0
  86. package/dist/tools/permissions.d.ts.map +1 -0
  87. package/dist/tools/permissions.js +52 -0
  88. package/dist/tools/permissions.js.map +1 -0
  89. package/dist/tools/portal_domain.d.ts +19 -0
  90. package/dist/tools/portal_domain.d.ts.map +1 -0
  91. package/dist/tools/portal_domain.js +85 -0
  92. package/dist/tools/portal_domain.js.map +1 -0
  93. package/dist/tools/recurring.d.ts +10 -5
  94. package/dist/tools/recurring.d.ts.map +1 -1
  95. package/dist/tools/recurring.js +178 -6
  96. package/dist/tools/recurring.js.map +1 -1
  97. package/dist/tools/register-all.d.ts +2 -2
  98. package/dist/tools/register-all.d.ts.map +1 -1
  99. package/dist/tools/register-all.js +41 -3
  100. package/dist/tools/register-all.js.map +1 -1
  101. package/dist/tools/shared.d.ts +313 -1
  102. package/dist/tools/shared.d.ts.map +1 -1
  103. package/dist/tools/shared.js +256 -0
  104. package/dist/tools/shared.js.map +1 -1
  105. package/dist/tools/team.d.ts +17 -0
  106. package/dist/tools/team.d.ts.map +1 -0
  107. package/dist/tools/team.js +141 -0
  108. package/dist/tools/team.js.map +1 -0
  109. package/dist/tools/time.d.ts +9 -8
  110. package/dist/tools/time.d.ts.map +1 -1
  111. package/dist/tools/time.js +54 -9
  112. package/dist/tools/time.js.map +1 -1
  113. package/dist/tools/webhooks.d.ts.map +1 -1
  114. package/dist/tools/webhooks.js +27 -1
  115. package/dist/tools/webhooks.js.map +1 -1
  116. package/package.json +12 -5
  117. package/scripts/audit-mcp-refs.mjs +331 -0
package/README.md CHANGED
@@ -17,13 +17,30 @@
17
17
  <a href="https://smithery.ai/server/frihet/frihet-mcp"><img src="https://smithery.ai/badge/frihet/frihet-mcp" alt="Smithery installs"></a>
18
18
  <a href="https://registry.modelcontextprotocol.io/?q=io.frihet"><img src="https://img.shields.io/badge/MCP_Registry-io.frihet%2Ferp-4A90D9?style=flat&logo=anthropic&logoColor=white" alt="MCP Registry"></a>
19
19
  <a href="https://github.com/Frihet-io/frihet-mcp/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-18181b?style=flat&labelColor=09090b" alt="license"></a>
20
- <img src="https://img.shields.io/badge/tools-94-18181b?style=flat&labelColor=09090b" alt="94 tools">
20
+ <img src="https://img.shields.io/badge/tools-151-18181b?style=flat&labelColor=09090b" alt="151 tools">
21
21
  <img src="https://img.shields.io/badge/node-%3E%3D18-18181b?style=flat&labelColor=09090b" alt="node >=18">
22
22
  <a href="https://www.typescriptlang.org/"><img src="https://img.shields.io/badge/TypeScript-18181b?style=flat&labelColor=09090b" alt="TypeScript"></a>
23
23
  </p>
24
24
 
25
25
  ---
26
26
 
27
+ ## Distribution
28
+
29
+ | Channel | Status | Install |
30
+ |---------|--------|---------|
31
+ | **npm** | Live | `npx @frihet/mcp-server` |
32
+ | **Remote endpoint** | Live | `https://mcp.frihet.io/mcp` (zero install, OAuth or API key) |
33
+ | **Smithery** | Live | [smithery.ai/server/frihet/frihet-mcp](https://smithery.ai/server/frihet/frihet-mcp) |
34
+ | **MCP Registry** | Live | [registry.modelcontextprotocol.io](https://registry.modelcontextprotocol.io/?q=io.frihet) |
35
+ | **Glama** | Pending submission | [glama.ai/mcp/servers](https://glama.ai/mcp/servers) — `glama.json` ready |
36
+ | **mcp.so** | Pending submission | [mcp.so](https://mcp.so) — indexed from npm + GitHub |
37
+ | **PulseMCP** | Pending submission | [pulsemcp.com](https://pulsemcp.com) — indexed from npm + GitHub |
38
+ | **Cursor Marketplace** | Coming soon | [cursor.com/marketplace](https://cursor.com/marketplace) |
39
+ | **ChatGPT Apps** | Coming soon | [chatgpt.com](https://chatgpt.com) |
40
+ | **Anthropic Claude Directory** | Coming soon | [claude.ai/settings/connectors](https://claude.ai/settings/connectors) |
41
+
42
+ ---
43
+
27
44
  ## What is this
28
45
 
29
46
  An MCP server that connects your AI assistant to [Frihet](https://frihet.io). Create invoices by talking. Query expenses in natural language. Manage your entire business from your IDE.
@@ -33,9 +50,9 @@ You: "Create an invoice for TechStart SL, 40 hours of consulting at 75 EUR/h
33
50
  Claude: Done. Invoice INV-2026-089 created. Total: 3,000.00 EUR + 21% IVA = 3,630.00 EUR.
34
51
  ```
35
52
 
36
- 94 tools. 8 resources. 7 prompts. Structured output on every tool. Zero boilerplate.
53
+ 151 tools. 8 resources. 7 prompts. Structured output on every tool. Zero boilerplate.
37
54
 
38
- <!-- v1.9.0-beta.1 — Wave Mature 1: Banking (5) + Fiscal (8) + Stay (5) + POS (4) + Time (4) + Recurring (2) = 94 tools total -->
55
+ <!-- v1.12.0-beta.1 — D4-B megasprint: HR (9), payroll (2), onboarding (2), permissions (2), period close (3), webhook test (1) = +19 = 152 raw → deduped ticketbai_status → 151 tools -->
39
56
 
40
57
  ---
41
58
 
@@ -163,7 +180,7 @@ Talk to your ERP. These are real prompts, not marketing copy.
163
180
 
164
181
  ## What to expect
165
182
 
166
- This MCP is a **structured data interface** -- you describe what you want in natural language, and the AI creates, queries, or modifies business records in Frihet. All 94 tools are CRUD operations over the REST API.
183
+ This MCP is a **structured data interface** -- you describe what you want in natural language, and the AI creates, queries, or modifies business records in Frihet. All 151 tools are CRUD operations over the REST API.
167
184
 
168
185
  **Works great:**
169
186
 
@@ -190,9 +207,9 @@ If you need to digitize paper invoices or receipts, extract the data first (e.g.
190
207
 
191
208
  ---
192
209
 
193
- ## Tools (94)
210
+ ## Tools (151)
194
211
 
195
- ### Invoices (6)
212
+ ### Invoices (12)
196
213
 
197
214
  | Tool | What it does |
198
215
  |------|-------------|
@@ -201,7 +218,13 @@ If you need to digitize paper invoices or receipts, extract the data first (e.g.
201
218
  | `create_invoice` | Create a new invoice with line items |
202
219
  | `update_invoice` | Update any invoice field |
203
220
  | `delete_invoice` | Permanently delete an invoice |
204
- | `search_invoices` | Find invoices by client name |
221
+ | `search_invoices` | Find invoices by client name, date, or status |
222
+ | `send_invoice` | Email invoice to client (PDF attachment) |
223
+ | `mark_invoice_paid` | Mark an invoice as paid with optional payment date |
224
+ | `get_invoice_pdf` | Get a download URL for the invoice PDF |
225
+ | `get_invoice_einvoice` | Get the e-invoice XML for a given invoice ID |
226
+ | `create_credit_note` | Create a credit note linked to an existing invoice |
227
+ | `apply_late_fee` | Apply a late payment fee to an overdue invoice |
205
228
 
206
229
  ### Expenses (5)
207
230
 
@@ -256,7 +279,7 @@ If you need to digitize paper invoices or receipts, extract the data first (e.g.
256
279
  | `update_product` | Update pricing or details |
257
280
  | `delete_product` | Remove a product |
258
281
 
259
- ### Quotes (5)
282
+ ### Quotes (6)
260
283
 
261
284
  | Tool | What it does |
262
285
  |------|-------------|
@@ -265,8 +288,9 @@ If you need to digitize paper invoices or receipts, extract the data first (e.g.
265
288
  | `create_quote` | Draft a new quote |
266
289
  | `update_quote` | Modify a quote |
267
290
  | `delete_quote` | Delete a quote |
291
+ | `send_quote` | Email quote to client for acceptance |
268
292
 
269
- ### Webhooks (5)
293
+ ### Webhooks (6)
270
294
 
271
295
  | Tool | What it does |
272
296
  |------|-------------|
@@ -275,6 +299,7 @@ If you need to digitize paper invoices or receipts, extract the data first (e.g.
275
299
  | `create_webhook` | Register a new webhook endpoint |
276
300
  | `update_webhook` | Modify events or URL |
277
301
  | `delete_webhook` | Remove a webhook |
302
+ | `test_webhook` | Send a test payload to a configured webhook endpoint |
278
303
 
279
304
  ### Intelligence (4)
280
305
 
@@ -285,9 +310,9 @@ If you need to digitize paper invoices or receipts, extract the data first (e.g.
285
310
  | `get_quarterly_taxes` | Quarterly tax prep: Modelo 303/130 fields, collected vs deductible, liability |
286
311
  | `duplicate_invoice` | Clone an invoice for recurring billing (copies items/client/tax, starts as draft) |
287
312
 
288
- ## E-Invoicing (4 new in v1.7 pre-release)
313
+ ### E-Invoicing (10)
289
314
 
290
- > **Status: beta — CF endpoints rolling out 2026-04-21 to 2026-04-28.** Tools call `api.frihet.io/v1/einvoice/*` directly. If an endpoint is not yet deployed (404), the tool falls back to `{ _stub: true, _note: "CF endpoint pending deploy", _plannedEndpoint: "..." }` so the server remains usable while transport ships.
315
+ > **Status: beta.** Tools call `api.frihet.io/v1/einvoice/*` directly. If an endpoint is not yet deployed (404), the tool falls back to `{ _stub: true, _note: "CF endpoint pending deploy", _plannedEndpoint: "..." }` so the server remains usable while transport ships.
291
316
 
292
317
  | Tool | What it does |
293
318
  |------|-------------|
@@ -295,8 +320,230 @@ If you need to digitize paper invoices or receipts, extract the data first (e.g.
295
320
  | `get_einvoice_status` | Poll Hatchet workflow run status until succeeded/failed — returns ackId, XML URL, PDF/A-3 URL |
296
321
  | `validate_einvoice_xml` | Validate raw XML against format schema + schematron rules (KOSIT / Mustang / XSD / Schematron) |
297
322
  | `export_datev` | Export accounting data as DATEV EXTF (Buchungsstapel / Debitoren / Kreditoren) in CP1252 encoding |
323
+ | `einvoice_export` | Export e-invoice data in machine-readable formats (JSON/XML) for archival or integration |
324
+ | `face_submit` | Submit invoice to FACe (Spain B2G government e-invoicing platform) |
325
+ | `face_status` | Poll submission status from FACe for a submitted invoice |
326
+ | `ticketbai_submit` | Submit TicketBAI fiscal record to Basque Country tax authority (Hacienda) |
327
+ | `ticketbai_status` | Poll TicketBAI submission status from the Basque tax authority |
328
+ | `ksef_submit` | Submit invoice to KSeF (Poland national e-invoicing system — stub) |
329
+
330
+ ### Time Tracking (6)
331
+
332
+ > **Status: stub** — `/v1/time/*` endpoints planned. Tools surface 404 until backend ships.
333
+
334
+ | Tool | What it does |
335
+ |------|-------------|
336
+ | `list_time_entries` | List time entries with filter by user, project, date range, billable status |
337
+ | `get_time_entry` | Get full details of a single time entry by ID |
338
+ | `create_time_entry` | Log hours for a project (billable flag, description, date) |
339
+ | `update_time_entry` | Update any field on an existing time entry (PATCH semantics) |
340
+ | `delete_time_entry` | Soft-delete a time entry (confirm=true required) |
341
+ | `get_time_summary` | Aggregate total/billable/non-billable hours for a period, with optional groupBy (user/project/day) |
342
+
343
+ ### Recurring Invoices (8)
344
+
345
+ > **Status: stub** — `/v1/recurring/*` endpoints planned. Tools surface 404 until backend ships.
346
+
347
+ | Tool | What it does |
348
+ |------|-------------|
349
+ | `list_recurring_invoices` | List all recurring invoice templates (filter by active/paused) |
350
+ | `get_recurring_invoice` | Get full details of a recurring template by ID |
351
+ | `create_recurring_invoice` | Create a new recurring invoice template (daily/weekly/monthly/quarterly/yearly) |
352
+ | `update_recurring_invoice` | Update template fields — affects future generated invoices only |
353
+ | `pause_recurring_invoice` | Pause an active template — no invoices generated while paused |
354
+ | `resume_recurring_invoice` | Resume a paused template — next invoice on next scheduled cycle |
355
+ | `delete_recurring_invoice` | Permanently delete a template (confirm=true required) |
356
+ | `run_recurring_now` | Manually trigger immediate generation of the next invoice instance |
357
+
358
+ ### Team Management (4)
359
+
360
+ > **Status: stub** — `/v1/team/*` endpoints planned. Tools surface 404 until backend ships.
361
+
362
+ | Tool | What it does |
363
+ |------|-------------|
364
+ | `list_team_members` | List all workspace members with role and invite status |
365
+ | `invite_team_member` | Invite a new member by email with role (admin/member/viewer) |
366
+ | `update_team_member_role` | Change an existing member's role |
367
+ | `remove_team_member` | Remove a member from the workspace (confirm=true required) |
368
+
369
+ ### Gestoria — Accountants (5)
370
+
371
+ > **Status: stub** — `/v1/gestoria/*` REST surface lands with Wave Fase 1 closure (PRs #383 bulk send, #384 aging, #385 messaging). Tools surface 404 until the backend ships.
372
+
373
+ | Tool | What it does |
374
+ |------|-------------|
375
+ | `gestoria_message_send` | Send a message in a contextual thread (documentRequest / filingItem / obligation) |
376
+ | `gestoria_messages_list` | List messages in a thread, newest first; paginate backwards with `before` |
377
+ | `gestoria_template_create` | Create a reusable document request template with variables + due-date offset |
378
+ | `gestoria_template_bulk_send` | Bulk send a template to up to 500 client workspaces in one call |
379
+ | `gestoria_aging_consolidated` | Cross-client AR aging report (buckets, per-workspace breakdown, top overdue) |
380
+
381
+ ### Audit GL (3)
382
+
383
+ > **Status: stub** — `/v1/gl/*` proxies callables `approveGLEntry`, `rejectGLEntry`, `getGLEntryAuditLog` (PR #395). Tools surface 404 until backend ships.
384
+
385
+ | Tool | What it does |
386
+ |------|-------------|
387
+ | `frihet_gl_entry_approve` | Approve a GL journal entry (gestor/admin only — TRUST AREA) |
388
+ | `frihet_gl_entry_reject` | Reject a GL entry with a mandatory reason (TRUST AREA) |
389
+ | `frihet_gl_entry_audit_log` | Retrieve full audit trail for a GL entry |
390
+
391
+ ### White-label Portal Domain (3)
392
+
393
+ > **Status: stub** — `/v1/portal/domain/*` proxies callables `addCustomPortalDomain`, `verifyCustomPortalDomain`, `removeCustomPortalDomain` (PR #397).
394
+
395
+ | Tool | What it does |
396
+ |------|-------------|
397
+ | `frihet_portal_domain_add` | Add a custom domain to the client portal (returns DNS CNAME records) |
398
+ | `frihet_portal_domain_verify` | Verify DNS propagation for a custom portal domain |
399
+ | `frihet_portal_domain_remove` | Remove a custom portal domain (reverts to default Frihet subdomain) |
400
+
401
+ ### Self-onboard & VIES (2)
402
+
403
+ > **Status: stub** — `/v1/portal/onboard/*` proxies callables `generatePortalOnboardLink`, `lookupTaxIdViaVIES` (PR #398). Public portal flows excluded from MCP.
404
+
405
+ | Tool | What it does |
406
+ |------|-------------|
407
+ | `frihet_portal_onboard_link_generate` | Generate a time-limited self-onboard link for a prospective client |
408
+ | `frihet_tax_id_vies_lookup` | Validate an EU VAT number (CIF intracomunitario) via VIES |
409
+
410
+ ### IGIC — Canary Islands Indirect Tax (4)
411
+
412
+ > **Status: stub** — `/v1/igic/*` service-layer reads (PR #390). ATC SOAP excluded (internal infra).
413
+
414
+ | Tool | What it does |
415
+ |------|-------------|
416
+ | `frihet_modelo_415_summary` | M415 annual operations >€3,005 (Canarias equivalent of M347) |
417
+ | `frihet_modelo_425_summary` | M425 annual IGIC recap for Canary Islands businesses |
418
+ | `frihet_modelo_418_summary` | M418 monthly IGIC return for large enterprises (grandes empresas) |
419
+ | `frihet_aiem_calculate` | Calculate AIEM (Arbitrio Importación) for imported/produced goods in Canarias |
420
+
421
+ ### Impuesto sobre Sociedades — Corporate Tax (2)
422
+
423
+ > **Status: stub** — `/v1/is/*` service-layer reads for Spanish SLs/SAs (PR #392).
424
+
425
+ | Tool | What it does |
426
+ |------|-------------|
427
+ | `frihet_modelo_200_summary` | Modelo 200 annual IS return (taxable base, deductions, net payable) |
428
+ | `frihet_modelo_202_summary` | Modelo 202 installment payments (1P April, 2P October, 3P December) |
429
+
430
+ ### Bank Categorization Rules (2)
431
+
432
+ > **Status: stub** — `/v1/banking/rules` Q3-flagged (PR #394). Webhook handlers excluded.
433
+
434
+ | Tool | What it does |
435
+ |------|-------------|
436
+ | `frihet_bank_rules_list` | List all bank auto-categorization rules (conditions + actions + status) |
437
+ | `frihet_bank_rule_create` | Create a new rule to auto-categorize transactions by description, amount, counterparty |
438
+
439
+ ### Deposits (7)
440
+
441
+ | Tool | What it does |
442
+ |------|-------------|
443
+ | `list_deposits` | List deposits with pagination |
444
+ | `get_deposit` | Get deposit details by ID |
445
+ | `create_deposit` | Record a new client deposit |
446
+ | `update_deposit` | Update deposit fields |
447
+ | `delete_deposit` | Delete a deposit (confirm=true required) |
448
+ | `apply_deposit` | Apply a deposit balance against an invoice |
449
+ | `refund_deposit` | Issue a refund for a deposit |
450
+
451
+ ### Vendors (5)
452
+
453
+ | Tool | What it does |
454
+ |------|-------------|
455
+ | `list_vendors` | List all vendors/suppliers |
456
+ | `get_vendor` | Get vendor details |
457
+ | `create_vendor` | Add a new vendor |
458
+ | `update_vendor` | Update vendor info |
459
+ | `delete_vendor` | Remove a vendor |
460
+
461
+ ### Banking (5)
462
+
463
+ | Tool | What it does |
464
+ |------|-------------|
465
+ | `list_bank_accounts` | List connected bank accounts |
466
+ | `get_bank_account` | Get details for a bank account |
467
+ | `list_transactions` | List bank transactions with filters |
468
+ | `categorize_transaction` | Assign a category and expense/income type to a transaction |
469
+ | `match_transaction_to_invoice` | Link a bank transaction to an existing invoice |
470
+
471
+ ### Fiscal — Spanish Tax Models (8)
472
+
473
+ | Tool | What it does |
474
+ |------|-------------|
475
+ | `get_modelo_303_summary` | Quarterly IVA return (Modelo 303) — collected vs deductible, net payable |
476
+ | `get_modelo_130_summary` | Quarterly IRPF installment for self-employed (Modelo 130) |
477
+ | `get_modelo_390_summary` | Annual IVA summary (Modelo 390) |
478
+ | `get_modelo_180_summary` | Annual withholding summary for rentals (Modelo 180) |
479
+ | `get_modelo_347_summary` | Annual third-party transactions >€3,005 (Modelo 347) |
480
+ | `verifactu_status` | Get VeriFactu submission status for a fiscal record |
481
+ | `verifactu_resubmit` | Resubmit a rejected VeriFactu fiscal record |
482
+ | `ticketbai_status` | Poll TicketBAI submission status (also available in E-Invoicing section) |
483
+
484
+ ### Vacation Rentals / Stay (5)
485
+
486
+ | Tool | What it does |
487
+ |------|-------------|
488
+ | `list_reservations` | List rental reservations with filters |
489
+ | `get_reservation` | Get reservation details |
490
+ | `create_reservation` | Create a new reservation |
491
+ | `list_properties` | List all rental properties |
492
+ | `sync_channel` | Trigger OTA channel sync (Airbnb, Booking.com, etc.) |
493
+
494
+ ### POS — Point of Sale (4)
495
+
496
+ | Tool | What it does |
497
+ |------|-------------|
498
+ | `list_terminals` | List registered POS terminals |
499
+ | `get_sale` | Get details for a POS sale transaction |
500
+ | `list_sales` | List POS sales with pagination |
501
+ | `refund_sale` | Issue a refund for a POS sale |
502
+
503
+ ### HR — Human Resources (9)
504
+
505
+ | Tool | What it does |
506
+ |------|-------------|
507
+ | `leave_request_create` | Create a leave request (vacation, sick, personal) |
508
+ | `leave_approve` | Approve a pending leave request |
509
+ | `leave_reject` | Reject a leave request with a reason |
510
+ | `leave_cancel` | Cancel an approved or pending leave request |
511
+ | `leave_list` | List leave requests with filters (user, status, date range) |
512
+ | `attendance_clock_in` | Record clock-in for an employee |
513
+ | `attendance_clock_out` | Record clock-out for an employee |
514
+ | `overtime_report` | Generate overtime report for a period |
515
+ | `anomaly_list` | List attendance anomalies (missing punches, excessive overtime) |
516
+
517
+ ### Payroll (2)
518
+
519
+ | Tool | What it does |
520
+ |------|-------------|
521
+ | `payroll_export` | Export payroll data for a period (CSV/PDF for gestoría) |
522
+ | `payroll_checklist` | Generate pre-payroll checklist: pending leaves, anomalies, overtime |
523
+
524
+ ### Onboarding (2)
525
+
526
+ | Tool | What it does |
527
+ |------|-------------|
528
+ | `onboarding_status` | Get onboarding completion status for the current workspace |
529
+ | `onboarding_persona_set` | Set or update the business persona (freelancer, SME, gestoría, etc.) |
530
+
531
+ ### Permissions (2)
532
+
533
+ | Tool | What it does |
534
+ |------|-------------|
535
+ | `permissions_matrix` | Get the full permissions matrix for all roles in the workspace |
536
+ | `permissions_me` | Get the current API key's effective permissions |
537
+
538
+ ### Period Close (3)
539
+
540
+ | Tool | What it does |
541
+ |------|-------------|
542
+ | `period_close_status` | Get the close status for an accounting period |
543
+ | `period_close` | Close an accounting period (gestor/admin only — TRUST AREA) |
544
+ | `period_reopen` | Reopen a closed period with a mandatory reason (TRUST AREA) |
298
545
 
299
- All 94 tools return **structured output** via `outputSchema` -- typed JSON, not raw text. List tools return paginated results (`{ data, total, limit, offset }`).
546
+ All 151 tools return **structured output** via `outputSchema` -- typed JSON, not raw text. List tools return paginated results (`{ data, total, limit, offset }`).
300
547
 
301
548
  ---
302
549
 
@@ -475,7 +722,7 @@ npm run build # must pass before submitting
475
722
 
476
723
  | Package | What it is |
477
724
  |---------|-----------|
478
- | [`@frihet/mcp-server`](https://www.npmjs.com/package/@frihet/mcp-server) | This MCP server (94 tools, 8 resources, 7 prompts) |
725
+ | [`@frihet/mcp-server`](https://www.npmjs.com/package/@frihet/mcp-server) | This MCP server (151 tools, 8 resources, 7 prompts) |
479
726
  | [`@frihet/sdk`](https://github.com/Frihet-io/frihet-sdk) | TypeScript SDK (`frihet.invoices.create()`) |
480
727
  | [`frihet`](https://www.npmjs.com/package/frihet) | CLI (`frihet invoices list --status overdue`) |
481
728
  | [`n8n-nodes-frihet`](https://www.npmjs.com/package/n8n-nodes-frihet) | n8n community node for workflow automation |
@@ -491,6 +738,7 @@ npm run build # must pass before submitting
491
738
  - [MCP server docs](https://docs.frihet.io/desarrolladores/mcp-server) -- Setup guides, troubleshooting
492
739
  - [npm](https://www.npmjs.com/package/@frihet/mcp-server) -- Package registry
493
740
  - [Smithery](https://smithery.ai/server/frihet/frihet-mcp) -- Smithery marketplace
741
+ - [MCP Registry](https://registry.modelcontextprotocol.io/?q=io.frihet) -- Anthropic official registry
494
742
  - [Remote endpoint](https://mcp.frihet.io) -- Hosted MCP server (Cloudflare Workers)
495
743
  - [OpenAPI spec](https://api.frihet.io/openapi.yaml) -- Machine-readable API definition
496
744
 
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Tests for D4-B megasprint MCP tools — HR + Webhook test + Payroll + Onboarding + Permissions + Period close (20 tools).
3
+ *
4
+ * Uses Node.js built-in test runner (node:test + node:assert). Run: npm test (after build).
5
+ *
6
+ * Coverage:
7
+ * - Tool registration counts per module
8
+ * - Happy path for every tool (mock client returns fixture)
9
+ * - Error path: 404 propagated as isError=true
10
+ * - Trust-area gates: confirm=false for period_close / period_reopen returns isError
11
+ */
12
+ export {};
13
+ //# sourceMappingURL=d4b-hr-payroll-onboarding-tools.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"d4b-hr-payroll-onboarding-tools.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/d4b-hr-payroll-onboarding-tools.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG"}