# Freelancer Invoicing Suite

> A fast, lightweight, and robust multi-tenant invoicing web application designed specifically for freelancers, gig workers, and independent consultants.

## Core Capabilities
- **Strict Multi-Tenancy**: All data isolated by tenant identity at the repository layer.
- **Multiple Business Profiles**: Operate distinct DBA brand identities under one account.
- **Zero-Login Public Links**: Clients view, pay, and download vector PDF invoices with no password or login required.
- **Vector PDF Generation**: High-resolution vector PDF 1.4 invoices rendered natively in Go with 0 dependencies.
- **Integer-Cents Financial Arithmetic**: Guaranteed rounding accuracy on all tax, discount, and milestone calculations.
- **Data Sovereignty**: 100% full JSON and SQLite data export and backup anytime.
- **Remote Model Context Protocol (MCP)**: Native authenticated SSE endpoint allowing external AI assistants (Claude Desktop, Cursor) to safely query finances and draft invoices.

## Model Context Protocol (MCP)
Freelancer Invoicing provides a native, remote Model Context Protocol (MCP) server over authenticated Server-Sent Events (SSE). External AI assistants (such as Claude Desktop, Cursor, and custom agent frameworks) can connect directly to inspect invoicing metrics, retrieve client lists, and draft invoices without local installation.

### Endpoints
- **SSE Connection**: `GET https://freelancerinvoicing.app/api/mcp/sse?token={PERSONAL_ACCESS_TOKEN}`
- **Message Dispatch**: `POST https://freelancerinvoicing.app/api/mcp/message?sessionId={SESSION_ID}`

### Authentication
Authenticate using Personal Access Tokens (PATs) generated in the user's Settings page (`fia_live_...`). Tokens can be passed as the `token` query parameter on the SSE request or via `Authorization: Bearer fia_live_...`.

### Exposed Tools
1. `get_invoicing_summary`: Returns high-level financial summary including total outstanding balance, total paid, and counts of draft, sent, paid, and overdue invoices.
2. `list_invoices`: List and filter invoices by status (`draft`, `sent`, `paid`, `overdue`), client ID, or search terms.
3. `get_invoice`: Retrieve full invoice details by ID, including itemized line items, tax rate, and payment status.
4. `create_draft_invoice`: Create a new invoice strictly in `draft` status with line items, payment terms, and optional tax percentage.
5. `list_clients`: List active clients with names, emails, and address records.
6. `get_client`: Retrieve a single client's details and metadata by ID.
7. `create_client`: Create a new client record with contact details and default payment terms.
8. `get_payment_link`: Retrieve the secure zero-login public payment/view URL for any issued invoice.

## Pricing Tiers
- **Starter Plan**: $0 / month (Free forever. Full invoicing, vector PDF exports, client records, and public payment links).
- **Pro Plan**: $12 / month (Unlimited business profiles, recurring retainer contracts, automated overdue alerts).
- **Studio Plan**: $29 / month (Multi-currency, priority support, and agency team collaboration workflows).

## Public Endpoints
- Homepage: https://freelancerinvoicing.app/
- Pricing: https://freelancerinvoicing.app/pricing
- Sign In: https://freelancerinvoicing.app/login
- Create Account: https://freelancerinvoicing.app/register
- Privacy Policy: https://freelancerinvoicing.app/privacy
- Terms of Service: https://freelancerinvoicing.app/terms
