billingengine-mcp 0.1.1 → 0.1.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/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # BillingEngine MCP server
2
2
 
3
+ [![AllMCPs Verified](https://allmcps.com/api/badge/billingengine-mcp)](https://allmcps.com/mcp/billingengine-mcp?verify=e69e154f-3c18-4a25-b8a9-42bfcd9c6182)
4
+
3
5
  Create customers and invoices, look up open invoices and record payments in
4
6
  [BillingEngine](https://www.billingengine.com) by talking to Claude, Cursor or any other
5
7
  [MCP](https://modelcontextprotocol.io) client:
package/dist/index.js CHANGED
@@ -20,7 +20,7 @@ const INSTRUCTIONS = [
20
20
  "Invoices are created as drafts and are not sent: tell the user to review and send them in BillingEngine, using the app_url in the result.",
21
21
  "Nothing can be deleted through this server.",
22
22
  ].join(" ");
23
- const server = new McpServer({ name: "billingengine", version: "0.1.1" }, { instructions: INSTRUCTIONS });
23
+ const server = new McpServer({ name: "billingengine", version: "0.1.2" }, { instructions: INSTRUCTIONS });
24
24
  const date = z.string().regex(/^\d{4}-\d{2}-\d{2}$/, "Use YYYY-MM-DD");
25
25
  const page = z.number().int().min(1).optional().describe("Page of the list, starting at 1");
26
26
  const address = z.object({
@@ -51,13 +51,14 @@ const item = z.object({
51
51
  const invoiceFields = {
52
52
  date: date.optional().describe("Invoice date, defaults to today"),
53
53
  due_days: z.number().int().min(0).optional().describe("Days until payment is due"),
54
- introduction: z.string().optional(),
55
- signature: z.string().optional(),
54
+ opening_text: z.string().optional().describe("Text above the items, defaults to the account's text"),
55
+ closing_text: z.string().optional().describe("Text below the items, defaults to the account's text"),
56
56
  service_period_start_date: date.optional(),
57
57
  service_period_end_date: date.optional(),
58
58
  };
59
59
  const READ = { readOnlyHint: true, openWorldHint: false };
60
60
  const WRITE = { readOnlyHint: false, destructiveHint: false, openWorldHint: false };
61
+ const UPDATE = { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false };
61
62
  const output = z.looseObject({});
62
63
  async function respond(action) {
63
64
  try {
@@ -98,7 +99,7 @@ server.registerTool("update_customer", {
98
99
  description: "Changes the given fields of a customer; fields that are left out stay as they are.",
99
100
  inputSchema: { id: z.number().int(), ...customerFields, address: address.partial().optional() },
100
101
  outputSchema: output,
101
- annotations: { ...WRITE, idempotentHint: true },
102
+ annotations: UPDATE,
102
103
  }, ({ id, address, ...fields }) => respond(() => client.patch(`/customers/${id}`, { ...fields, ...(address && { address_attributes: address }) })));
103
104
  server.registerTool("create_invoice", {
104
105
  title: "Create a draft invoice",
@@ -113,7 +114,7 @@ server.registerTool("update_invoice", {
113
114
  description: "Changes a draft invoice. Passing items replaces all existing items, so send the complete list. Sent invoices cannot be changed.",
114
115
  inputSchema: { id: z.number().int(), items: z.array(item).min(1).optional(), ...invoiceFields },
115
116
  outputSchema: output,
116
- annotations: { ...WRITE, idempotentHint: true },
117
+ annotations: UPDATE,
117
118
  }, ({ id, ...changes }) => respond(async () => withInvoiceLinks(await client.patch(`/invoices/${id}`, changes))));
118
119
  server.registerTool("list_invoices", {
119
120
  title: "List invoices",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "billingengine-mcp",
3
3
  "mcpName": "com.billingengine/mcp",
4
- "version": "0.1.1",
4
+ "version": "0.1.2",
5
5
  "description": "MCP server for BillingEngine: create customers and invoices, look up invoices and record payments from Claude, Cursor and other MCP clients.",
6
6
  "keywords": [
7
7
  "mcp",