/invoiceninja:invoiceninja-create-expense-from-receiptfrom invoiceninja
Create an Invoice Ninja expense from a receipt or invoice the user provides as an image or PDF, by reading it and calling storeExpense. Use when the user passes or points to a photo/scan/PDF of a receipt, bill or supplier invoice and asks to book, log, add or create an expense from it.
Ships in invoiceninja. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Read the file yourself (an image or PDF attached in the chat, or a file on disk in Claude Code), extract the details, create the expense and attach the original file. Never invent values: anything the document doesn't show is left out or asked.
If more than one Invoice Ninja instance is connected this session, resolve which one to use first — see Working with multiple instances.
Read the document. Use the file attached in the chat, or get its path from the user in Claude Code (ask if they only described it). Read it and extract: vendor name, document date, total amount, currency, tax amount and rate (if shown), invoice/receipt number, payment method, and a short description of what was bought. Several receipts in one file or several files → handle one expense per receipt.
Resolve the vendor. getVendors with filter set to the vendor name. One clear match → use its id. None → offer to create it with storeVendor (name only) or leave the expense without a vendor. Several → ask.
Resolve the category. getExpenseCategorys and pick the one that clearly fits the purchase; if none does, or it's ambiguous, show the list and ask. Don't create categories unprompted.
Currency. If the receipt's currency differs from the account default, find its currency_id (getStatics/apiRequest GET /api/v1/statics → currencies) and set currency_id; otherwise omit it.
Show what you extracted as a short list (vendor, date, amount, tax, category, reference, notes) and flag anything uncertain — blurry digits, ambiguous date formats (03/04), net vs gross totals. Ask the user to confirm or correct before writing.
Create it with storeExpense: { "amount": <gross total>, "date": "YYYY-MM-DD", "vendor_id": ..., "category_id": ..., "currency_id": ..., "transaction_reference": <receipt/invoice no.>, "public_notes": <description>, "private_notes": "Created from <file name>" }. For tax shown on the receipt, add tax_name1/tax_rate1 (e.g. VAT, 19) and, if the amount is gross, uses_inclusive_taxes: true. Add payment_date and payment_type_id only when the receipt shows it was already paid and you know the type id. Add client_id + should_be_invoiced: true only if the user said to bill it on.
Read it back with showExpense and check the amount, date, vendor and category landed; undeclared fields are silently dropped, so redo any missing one via apiRequest PUT /api/v1/expenses/{id}. Then attach the receipt (next step) and report the expense id and the booked values.
Attach the receipt file. How depends on where you run:
With a shell and the file on disk (Claude Code): use the server's upload route, a plain HTTP POST /upload/expenses/<id> on the same host as the MCP endpoint, so the file goes straight from disk and never passes through you. Run this with Bash (the token is read from the registered MCP server and never printed; use the server name resolved for this instance, invoiceninja or invoiceninja-<label>):
read -r BASE TOKEN < <(python3 - <<'PY'
import json, os, urllib.parse as u
s = json.load(open(os.path.join(os.environ.get('CLAUDE_CONFIG_DIR', os.path.expanduser('~')), '.claude.json')))['mcpServers']['<server name>']
p = u.urlparse(s['url']); print(f'{p.scheme}://{p.netloc}', s['headers']['Authorization'])
PY
)
curl -fsS -X POST "$BASE/upload/expenses/<expense id>" -H "Authorization: $TOKEN" -F "documents=@<path to receipt>"
Then showExpense with include=documents and confirm the file is listed. If the server answers 404 for the route, the Invoice Ninja MCP server is too old: say so, tell the user to update the image, and leave the expense without the attachment. If the server entry isn't in the user config (e.g. project-scoped) or the URL has a path prefix, ask the user for the base URL instead of guessing.
Without a shell (claude.ai, the Claude apps): if the file is reachable at a URL (for example a share link from a document store), call attachDocumentFromUrl with entity expenses, the expense id and the url; the server downloads it itself. Otherwise tell the user the expense is booked without the file and that they can attach it in Invoice Ninja under the expense's Documents tab.
/upload/{entity}/{id} route and the attachDocumentFromUrl tool). Without it the expense is still created, just without the file.getExpenses with filter set to the receipt number (or vendor + amount) and warn if the same expense seems to exist already.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub marceltov/invoiceninja-plugin --plugin invoiceninja10 skills in this plugin
/invoiceninja-convert-quote-to-invoiceApprove an Invoice Ninja quote or convert it into an invoice via the bulkQuotes MCP tool. Use when the user asks to convert, turn, promote or approve a quote, or to invoice an accepted quote./invoiceninja-create-clientCreate a new Invoice Ninja client with contacts via the storeClient MCP tool. Use when the user asks to add, create or register a new client or customer in Invoice Ninja./invoiceninja-create-invoiceCreate a new Invoice Ninja invoice with line items for an existing client via the storeInvoice MCP tool. Use when the user asks to create, draft, write or bill an invoice./invoiceninja-find-clientsLook up Invoice Ninja clients by name, email, number, id number or balance using the getClients MCP tool. Use when the user asks to find, list, search or look up a client or customer, or when another skill needs a client id from a name./invoiceninja-find-invoicesList or search Invoice Ninja invoices by client, status, overdue/payable, number, text or date range using the getInvoices MCP tool. Use when the user asks which invoices are open, unpaid, overdue, paid, or asks to find an invoice by number or client./invoiceninja-manage-instancesConfigure connections to one or more Invoice Ninja MCP server deployments — add a new instance (URL + Invoice Ninja API token, optionally labeled), list which are configured/connected, or remove one. Every instance is registered as a user-scoped MCP server via `claude mcp add` (no settings.json editing, no bundled .mcp.json). Use when the invoiceninja MCP server is unconfigured, disconnected, or missing credentials (including when a SessionStart hook flags this), when the user asks to set up, configure, or connect the Invoice Ninja plugin, or when they want to add, remove, or list additional Invoice Ninja instances.