GitScrum / Docs

Invoices

Invoice management through MCP. Create, send, and track invoices through complete billing lifecycle from draft to payment.

Open Source β€” GitScrum MCP Server is open source under the MIT license. Available on npm and GitHub. Model Context Protocol server for GitScrum β€” Claude, GitHub Copilot, Cursor, and any MCP-compatible client full operational access to your project management stack.

The invoice tool provides 8 actions covering the complete billing lifecycle β€” from creating draft invoices through sending, tracking payment, and handling cancellations. Every billing operation available in the GitScrum web application is accessible through natural language conversation with your AI assistant.

Invoices in GitScrum follow a strict status lifecycle. Each invoice progresses through defined states, and the MCP Server enforces these transitions automatically. Your AI assistant can create itemized invoices, send them to clients, record payments, and generate billing analytics β€” all without leaving your IDE or AI client.


Actions Overview

ActionPurposeRequired Parameters
listList invoices in a workspacecompany_slug
getGet full details of a specific invoiceuuid, company_slug
createCreate a new draft invoicecompany_slug, title
updateModify a draft invoiceuuid, company_slug
sendSend an invoice to the client (draft β†’ sent)uuid, company_slug
mark_paidRecord payment on an invoiceuuid, company_slug
cancelCancel an invoiceuuid, company_slug
statsGet billing metrics for the workspacecompany_slug

Status Lifecycle

Every invoice follows a defined status progression. The MCP Server enforces valid transitions β€” you cannot mark a draft invoice as paid without sending it first, and cancelled invoices cannot be reopened.

  β”Œβ”€β”€β”€β”€β”€β”€β”€β”      send      β”Œβ”€β”€β”€β”€β”€β”€β”     mark_paid    β”Œβ”€β”€β”€β”€β”€β”€β”
  β”‚ Draft β”‚ ──────────────► β”‚ Sent β”‚ ────────────────► β”‚ Paid β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”˜                 β””β”€β”€β”€β”€β”€β”€β”˜                   β””β”€β”€β”€β”€β”€β”€β”˜
      β”‚                         β”‚
      β”‚       cancel            β”‚        (auto)
      │◄────────────────────    │──────────────────►  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
      β”‚                         β”‚    past due_date    β”‚ Overdue β”‚
      β–Ό                         β–Ό                     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                    β”‚
  β”‚ Cancelled β”‚           β”‚ Cancelled β”‚                    β”‚ cancel
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                    β–Ό
                                                     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                                     β”‚ Cancelled β”‚
                                                     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  • Draft β€” Initial state. Editable. Can be sent or cancelled.
  • Sent β€” Delivered to client. Transitions to paid, overdue, or cancelled.
  • Paid β€” Payment recorded. Terminal state.
  • Overdue β€” Automatically set when a sent invoice passes its due date.
  • Cancelled β€” Terminated. Terminal state.

Listing Invoices

The list action returns invoices within a workspace. Filter by status or client to narrow results.

Required Parameters

ParameterTypeDescription
company_slugstringWorkspace identifier (from the workspace tool)

Optional Parameters

ParameterTypeDescription
statusstringFilter by status: draft, sent, paid, overdue, cancelled
client_uuidstringFilter by client UUID (from the client tool)
pagenumberPage number for pagination

Example Prompts

You:  "Show all invoices"
AI:   Calls invoice action=list β†’ returns invoice list with status and amounts

You:  "List unpaid invoices"
AI:   Calls invoice action=list with status="sent"

You:  "Show overdue invoices"
AI:   Calls invoice action=list with status="overdue"

You:  "List all invoices for Acme Corp"
AI:   Finds client UUID β†’ calls invoice action=list with client_uuid

Getting Invoice Details

The get action returns the complete invoice β€” title, client, line items, amounts, tax, dates, status, and payment history.

Required Parameters

ParameterTypeDescription
uuidstringInvoice UUID (from list response)
company_slugstringWorkspace identifier
You:  "Show me invoice details for the Acme Corp website project"
AI:   Finds invoice β†’ calls invoice action=get β†’ returns full invoice with line items

You:  "What's the total on our latest invoice?"
AI:   Lists recent invoices β†’ calls invoice action=get β†’ extracts total amount

Creating Invoices

The create action builds a new draft invoice. You can include line items, tax rates, client association, and currency in a single call. The invoice starts in Draft status, allowing review and edits before sending.

Required Parameters

ParameterTypeDescription
company_slugstringWorkspace identifier
titlestringInvoice title or reference name

Optional Parameters

ParameterTypeDescription
client_uuidstringClient UUID to associate (referenced as contactcompanyuuid in the API)
currencystringCurrency code: USD, EUR, BRL (default: workspace currency)
due_datestringPayment deadline in YYYY-MM-DD format
itemsarrayLine items, each with description (string), quantity (number), and unit_price (number)
notesstringAdditional notes or payment instructions visible on the invoice
tax_ratenumberTax percentage applied to the subtotal (e.g. 10 for 10%)

Line Items Structure

Each item in the items array follows this structure:

FieldTypeDescription
descriptionstringLine item description (e.g. "Frontend Development - Phase 1")
quantitynumberQuantity or hours (e.g. 40)
unit_pricenumberPrice per unit in the invoice currency (e.g. 150.00)

Example Prompts

You:  "Create an invoice for Acme Corp: Website Redesign, $5,000, due March 15"
AI:   Finds client UUID β†’ calls invoice action=create with title="Website Redesign",
      client_uuid, items=[{description: "Website Redesign", quantity: 1, unit_price: 5000}],
      due_date="2026-03-15"

You:  "Invoice TechStart for 40 hours of development at $150/hour plus 10% tax"
AI:   Calls invoice action=create with title, client_uuid,
      items=[{description: "Development Services", quantity: 40, unit_price: 150}],
      tax_rate=10

You:  "Create an invoice with three line items:
       - UX Design: 20 hours at $120
       - Frontend Dev: 60 hours at $150
       - QA Testing: 15 hours at $100"
AI:   Calls invoice action=create with items array containing all three entries

Updating Invoices

The update action modifies a draft invoice. Only invoices in Draft status can be updated β€” once sent, the invoice is locked.

Required Parameters

ParameterTypeDescription
uuidstringInvoice UUID
company_slugstringWorkspace identifier

All optional parameters from create are available in update.

You:  "Add a 10% tax to the Acme Corp invoice"
AI:   Calls invoice action=update with tax_rate=10

You:  "Change the due date to April 1"
AI:   Calls invoice action=update with due_date="2026-04-01"

You:  "Update the invoice notes: 'Net 30 payment terms'"
AI:   Calls invoice action=update with notes="Net 30 payment terms"

Sending Invoices

The send action transitions an invoice from Draft to Sent. This delivers the invoice to the client and locks it from further edits. The status change is recorded with a timestamp.

Required Parameters

ParameterTypeDescription
uuidstringInvoice UUID
company_slugstringWorkspace identifier
You:  "Send the Acme Corp invoice"
AI:   Calls invoice action=send β†’ invoice transitions from Draft to Sent

You:  "Send all draft invoices"
AI:   Lists draft invoices β†’ calls invoice action=send for each

Recording Payment

The mark_paid action records payment on a sent or overdue invoice. You can optionally specify the payment date and method for accounting records.

Required Parameters

ParameterTypeDescription
uuidstringInvoice UUID
company_slugstringWorkspace identifier

Optional Parameters

ParameterTypeDescription
payment_datestringDate payment was received in YYYY-MM-DD format (default: today)
payment_methodstringPayment method description (e.g. "Bank transfer", "Credit card", "PayPal")
You:  "Mark the Acme Corp invoice as paid"
AI:   Calls invoice action=mark_paid β†’ invoice transitions to Paid

You:  "Record payment for invoice, received yesterday via bank transfer"
AI:   Calls invoice action=mark_paid with payment_date="2026-02-05",
      payment_method="Bank transfer"

You:  "Mark all overdue invoices from TechStart as paid"
AI:   Lists overdue invoices for client β†’ calls mark_paid for each

Cancelling Invoices

The cancel action terminates an invoice. This works on invoices in Draft, Sent, or Overdue status. You can optionally provide a reason for the cancellation.

Required Parameters

ParameterTypeDescription
uuidstringInvoice UUID
company_slugstringWorkspace identifier

Optional Parameters

ParameterTypeDescription
reasonstringCancellation reason (recorded in the invoice history)
You:  "Cancel the draft invoice for Global Media"
AI:   Calls invoice action=cancel β†’ invoice transitions to Cancelled

You:  "Cancel invoice with reason: 'Project scope changed, new invoice to follow'"
AI:   Calls invoice action=cancel with reason

Billing Statistics

The stats action returns workspace-level billing metrics β€” total invoiced amount, paid vs outstanding, overdue totals, average payment time, and revenue trends. These numbers power the billing dashboard in the GitScrum web application.

Required Parameters

ParameterTypeDescription
company_slugstringWorkspace identifier
You:  "Show billing stats"
AI:   Calls invoice action=stats β†’ returns total invoiced, paid, outstanding, overdue

You:  "How much revenue is outstanding?"
AI:   Calls invoice action=stats β†’ extracts outstanding invoice total

You:  "What's our average payment time?"
AI:   Calls invoice action=stats β†’ returns average days to payment

Billing Workflow

For agencies managing multiple client engagements, this workflow covers the complete billing lifecycle:

1. Create the invoice

Build an itemized invoice linked to a client.

You:  "Create an invoice for Acme Corp: Phase 1 delivery β€” 80 hours frontend at $150,
       20 hours design at $120, 10% tax, due March 30"
AI:   Single create call with all line items, tax, and due date

2. Review and adjust

Check the draft before sending.

You:  "Show me the Acme Corp invoice"
AI:   Calls invoice action=get β†’ displays full invoice for review

You:  "Add a note: 'Payment via bank transfer to account ending 4521'"
AI:   Calls invoice action=update with notes

3. Send to client

Deliver the invoice.

You:  "Send the Acme Corp invoice"
AI:   Calls invoice action=send β†’ invoice is delivered and locked

4. Track payment

Monitor for payment and record when received.

You:  "Any overdue invoices?"
AI:   Calls invoice action=list with status="overdue" β†’ shows overdue items

You:  "Acme Corp paid their invoice via wire transfer"
AI:   Calls invoice action=mark_paid with payment_method="Wire transfer"

5. Review billing health

Monitor overall billing performance.

You:  "Show me the billing overview"
AI:   Calls invoice action=stats β†’ summarizes revenue, outstanding, and payment trends

Next Steps

  • Clients: Manage client records linked to your invoices.
  • Proposals: Create proposals that convert into invoiced projects.
  • ClientFlow Dashboards: Access billing analytics and cross-workspace reports.
  • Projects: Manage project delivery alongside billing.