MCP 服务器

invoice-generator

io.github.theluckystrike/invoice-generator
商业与运营 公开且可连接 MCP 2026-07-28

此 MCP 可以做什么

Manages clients and invoices, records payments, renders invoice PDFs, and reports overdue balances.

business_set
Set your business details
The ONE business profile for the whole suite: name, address, VAT id, bank details and defaults (currency, tax rate, terms, prefix, timezone). Saved to the shared profile every other server reads. Call it once, first.
输入模式
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['name'], 'properties': {'vat': {'type': 'number', 'description': 'Alias for default_tax_rate'}, 'bank': {'type': 'string', 'description': 'Bank name / BIC'}, 'iban': {'type': 'string', 'description': 'IBAN or account number for payment'}, 'name': {'type': 'string', 'description': 'Your business or freelancer name'}, 'email': {'type': 'string', 'description': 'Your own email address. Leave it out unless the user gave it: no server ever fills an email from anything but this profile or an explicit argument'}, 'phone': {'type': 'string', 'description': 'Your own phone number. Same rule as email: only if the user gave it'}, 'vat_id': {'type': 'string', 'description': 'VAT / tax registration id'}, 'address': {'type': 'string', 'description': 'Postal address, newlines allowed'}, 'tax_rate': {'type': 'number', 'description': 'Alias for default_tax_rate'}, 'timezone': {'type': 'string', 'description': 'IANA zone you work in, e.g. Europe/Warsaw. Shared with time-tracker (entries are stamped in it) and timezone (your home zone)'}, 'vat_rate': {'type': 'number', 'description': 'Alias for default_tax_rate'}, 'logo_path': {'type': 'string', 'description': 'Path to a PNG or JPG logo (Pro)'}, 'invoice_prefix': {'type': 'string', 'description': 'Invoice number prefix, default INV (custom prefix is Pro)'}, 'default_currency': {'type': 'string', 'pattern': '^[A-Za-z]{3}$', 'description': 'ISO code, e.g. EUR, USD, JPY. Default EUR'}, 'default_tax_rate': {'type': 'number', 'description': 'Default VAT percent applied to items without their own rate'}, 'payment_terms_days': {'type': 'number', 'description': 'Default days until due. Default 14'}}, 'additionalProperties': True}
client_add
Add a client
Store a client so invoice_create can refer to them by name. Re-adding the same name updates the stored address, email and VAT id; a record identical to a stored one is refused, naming the id that already holds it.
输入模式
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['name'], 'properties': {'name': {'type': 'string'}, 'email': {'type': 'string'}, 'vat_id': {'type': 'string', 'description': 'Client VAT id, printed for reverse-charge invoices'}, 'address': {'type': 'string'}}, 'additionalProperties': False}
client_delete
Delete a client
Delete one stored client that nothing refers to. A client named on any invoice, quote, credit note, purchase order, deposit, statement or schedule is refused with those documents listed.
可能执行破坏性操作
输入模式
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['client'], 'properties': {'client': {'type': 'string', 'description': 'Client name or id, exactly as client_list shows it'}}, 'additionalProperties': False}
client_list
List clients
List every stored client with id, address, email and VAT id. No arguments, and it writes nothing. With none stored it says so: invoice_create also creates a client from the name you pass.
只读 幂等
输入模式
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'properties': {}}
invoice_create
Create an invoice
Create an invoice from line items and return the record with its next, never-reused number. unit_price is in MAJOR units; lines are rounded then summed. One currency per invoice. Free: 3 a month.
输入模式
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['client', 'items'], 'properties': {'items': {'type': 'array', 'items': {'type': 'object', 'required': ['description', 'quantity', 'unit_price'], 'properties': {'vat': {'$ref': '#/properties/items/items/properties/tax_rate', 'description': 'Alias for tax_rate'}, 'currency': {'type': 'string', 'pattern': '^[A-Za-z]{3}$', 'description': 'Currency this line was captured in. Every line on one invoice must agree; convert first with expense_to_invoice target_currency + fx_rates'}, 'quantity': {'type': 'number', 'maximum': 1000000000000, 'minimum': -1000000000000, 'description': 'Hours, units or 1 for a flat fee'}, 'tax_rate': {'type': 'number', 'maximum': 1000, 'minimum': -100, 'description': 'VAT percent for this line, overrides the business default'}, 'vat_rate': {'$ref': '#/properties/items/items/properties/tax_rate', 'description': 'Alias for tax_rate'}, 'unit_price': {'type': 'number', 'maximum': 1000000000000, 'minimum': -1000000000000, 'description': 'Price per unit in major units, e.g. 90 for 90 EUR'}, 'description': {'type': 'string'}, 'round_total': {'type': 'boolean', 'description': "D-R46: round this line's TOTAL to the exact converted amount instead of rounding the unit price to cents first. Default false keeps the D-R24 basis (unit price x quantity always equals the printed gross); true trades that off so the gross matches an fx conversion to the cent."}}, 'additionalProperties': False}, 'description': 'Line items. Amounts are held as integer minor units and every line is rounded first, then summed, so the printed lines can never disagree with the total. A line may carry its own currency'}, 'notes': {'type': 'string', 'description': 'Free text printed under the totals'}, 'client': {'type': 'string', 'description': 'Client name or id. Unknown names are added automatically'}, 'currency': {'type': 'string', 'pattern': '^[A-Za-z]{3}$', 'description': 'Invoice currency, 3-letter ISO code. Defaults to the one currency every item agrees on, else your business default. Every line on one invoice must agree with it; a mix is refused with the exact conversion argument to pass rather than billed as if it were one currency'}, 'due_days': {'type': 'number', 'description': 'Days until due, defaults to your payment terms'}, 'issue_date': {'type': 'string', 'description': 'YYYY-MM-DD, defaults to today'}, 'discount_percent': {'type': 'number', 'maximum': 100, 'minimum': 0, 'description': 'Discount percent applied to every line before tax, 0-100'}}, 'additionalProperties': False}
invoice_from_hours
Invoice from hours
Shortcut for the common case: bill one client for N hours at an hourly rate. Creates and returns a single-line invoice, converting the rate into target_currency when you supply fx_rates, and echoing back any entry_ids.
输入模式
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['client', 'hours', 'rate'], 'properties': {'rate': {'type': 'number', 'maximum': 1000000000000, 'minimum': -1000000000000, 'description': 'Hourly rate in major units, expressed in currency (or the business default currency)'}, 'hours': {'type': 'number', 'maximum': 1000000000000, 'minimum': -1000000000000}, 'notes': {'type': 'string'}, 'client': {'type': 'string'}, 'currency': {'type': 'string', 'pattern': '^[A-Za-z]{3}$', 'description': 'Currency the rate is in. Without target_currency this is also the invoice currency'}, 'due_days': {'type': 'number'}, 'fx_rates': {'type': 'object', 'description': 'Conversion rates, the same pair expense_to_invoice takes: fx_rates maps the RATE\'s currency to the number of target units one of it buys, meaning 1 unit of that currency = X units of target_currency, e.g. {"EUR": 1.1578} with target_currency "USD". You supply the rate; nothing here fetches or guesses one', 'additionalProperties': {'type': 'number', 'exclusiveMinimum': 0}}, 'tax_rate': {'type': 'number', 'maximum': 1000, 'minimum': -100}, 'entry_ids': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Time-tracker entry ids these hours came from (the entry_ids invoice_summary returns). Echoed back with the new invoice number so you can call entry_mark_billed'}, 'issue_date': {'type': 'string'}, 'description': {'type': 'string', 'description': "Line description, default 'Consulting services'"}, 'round_total': {'type': 'boolean', 'description': "D-R46: when converting with fx_rates, round the line's TOTAL to the exact converted amount instead of rounding the hourly rate to cents first. Default false keeps the D-R24 basis (unit price x hours always equals the printed line, so a rounding_note explains any drift from the exact conversion); true removes the drift but unit_price x hours may then be a cent or two off the printed total."}, 'target_currency': {'type': 'string', 'pattern': '^[A-Za-z]{3}$', 'description': 'Issue the invoice in this currency instead, converting the rate. Needs fx_rates for the rate currency'}, 'discount_percent': {'type': 'number', 'maximum': 100, 'minimum': 0}}, 'additionalProperties': False}
invoice_get
Get one invoice
Return the full stored record for one invoice number, including every line, tax breakdown, and the balance still open after any credit note issued against it (see credited_minor).
只读 幂等
输入模式
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['number'], 'properties': {'number': {'type': 'string'}}, 'additionalProperties': False}
invoice_list
List invoices
List invoices by number: client, dates, currency, subtotal, discount, tax lines, total, status, paid, credited and the balance still due after any credit note. Filter by status, client and date range.
只读 幂等
输入模式
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'properties': {'to': {'type': 'string', 'description': 'YYYY-MM-DD inclusive'}, 'from': {'type': 'string', 'description': 'YYYY-MM-DD inclusive'}, 'client': {'type': 'string'}, 'status': {'enum': ['unpaid', 'paid', 'partial'], 'type': 'string'}}, 'additionalProperties': False}
invoice_mark_paid
Mark an invoice paid
Record a payment on one invoice. amount is in MAJOR units and ADDS to what is paid, never replaces it; omit it to settle the rest. An overpayment is refused, naming the open balance.
输入模式
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['number'], 'properties': {'amount': {'type': 'number', 'description': 'Amount received in major units, ADDED to what is already paid on this invoice. Omit to pay off the remaining balance in full', 'exclusiveMinimum': 0}, 'method': {'type': 'string', 'description': "How it was paid, e.g. bank transfer, card. Stored on this payment's row"}, 'number': {'type': 'string'}, 'paid_date': {'type': 'string', 'description': 'YYYY-MM-DD, defaults to today'}, 'reference': {'type': 'string', 'description': "Bank reference or transaction id for this payment. Stored on this payment's row"}}, 'additionalProperties': False}
invoice_pdf
Render invoice PDF
Call this tool to write one stored invoice as an A4 PDF and return the path: issuer, BILL TO, dates, items, taxes and totals. Free stamps a credit line and no logo; Pro renders it unbranded with your logo.
只读 幂等
输入模式
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['number'], 'properties': {'number': {'type': 'string', 'description': 'Invoice number to render, as returned by invoice_create'}, 'out_path': {'type': 'string', 'description': 'Where to write the PDF; defaults to <data dir>/pdf/<number>.pdf. The page carries the issuer block, the BILL TO client block, dates, an item table with wrapped descriptions, subtotal, discount, one tax line per rate, the total, payment details and notes, and every money value on it carries its currency code. Use a .pdf path: the bytes written are always PDF'}}, 'additionalProperties': False}
license_activate
Activate license
Turn Pro on for this connection with key, an MCPL1.<payload>.<signature> issued at checkout for this server or the bundle. Data under your token stays; a wrong or expired key changes nothing. license_status confirms it.
输入模式
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['key'], 'properties': {'key': {'type': 'string', 'description': 'License key from checkout, MCPL1.<payload>.<signature>'}}, 'additionalProperties': False}
license_status
License status
Report this endpoint's licence state for your token as JSON: the product, the tier free or pro, why it is not Pro, and the checkout URL. Call it to explain a free-tier refusal. No arguments, nothing changes.
只读 幂等
输入模式
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'properties': {}}
overdue_report
Overdue report
List every invoice not paid in full whose due date has passed, worst first, with days overdue and the amount, then a total per currency. Free. Use invoice_list for everything still open.
只读 幂等
输入模式
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'properties': {'as_of': {'type': 'string', 'description': 'YYYY-MM-DD, defaults to today'}}, 'additionalProperties': False}
已添加
license_activate
2026年9月24日 02:40
已添加
license_status
2026年9月24日 02:40
已添加
overdue_report
2026年9月24日 02:40
已添加
invoice_pdf
2026年9月24日 02:40
已添加
invoice_mark_paid
2026年9月24日 02:40
已添加
invoice_get
2026年9月24日 02:40
已添加
invoice_list
2026年9月24日 02:40
已添加
invoice_from_hours
2026年9月24日 02:40
已添加
invoice_create
2026年9月24日 02:40
已添加
client_list
2026年9月24日 02:40
已添加
client_delete
2026年9月24日 02:40
已添加
client_add
2026年9月24日 02:40
已添加
business_set
2026年9月24日 02:40