Skip to main content

MCP server exposing Fakturownia (InvoiceOcean) invoices, clients and products as tools

Project description

fakturownia-mcp

MCP (Model Context Protocol) server exposing a Fakturownia (InvoiceOcean) account as tools for Claude: invoices (list/search, create, update, status changes, PDF download), clients and products.

Built on fakturownia-client — the API token is sent only in the Authorization: Bearer header, never in URLs. All tools are async (backed by AsyncFakturowniaClient), so concurrent tool calls don't block the server's event loop.

There is deliberately no invoice-delete tool (destructive on financial records); use change_invoice_status instead.

Approval gate for writes

Every mutating tool (create_*, update_*, delete_client, change_invoice_status) asks for confirmation via MCP elicitation before touching the API — clients with elicitation support (Claude Code, Claude Desktop, MCP Inspector) show a native approval dialog describing the exact operation. Declining aborts the call before any request is sent.

For clients without elicitation support, or for trusted automation, set FAKTUROWNIA_SKIP_CONFIRM=1 in the server env to disable the gate.

Tools

Tool Description
list_invoices Search invoices by period, date range, client, number, kind (summaries + has_more)
get_invoice Full invoice with positions
create_invoice Issue an invoice (buyer by client_id or buyer_* fields)
update_invoice Partial update of invoice fields
change_invoice_status issued / sent / paid / partial / rejected
download_invoice_pdf Saves the PDF (default ~/Downloads/faktura-<number>.pdf)
list_clients / get_client / create_client / update_client / delete_client Contractor CRUD
list_products / get_product / create_product / update_product Product management

Setup

Once published to PyPI, no checkout is needed — uvx fakturownia-mcp runs the server directly (use "command": "uvx", "args": ["fakturownia-mcp"] in client configs below instead of the uv run --directory ... form).

For development, a sibling checkout of fakturownia-client is required (editable path dependency — see [tool.uv.sources] in pyproject.toml for the git alternative):

git clone https://github.com/KrzysztofMarmol/fakturownia-client
git clone https://github.com/KrzysztofMarmol/fakturownia-mcp
cd fakturownia-mcp && uv sync

Configuration (from Fakturownia: Ustawienia → Ustawienia konta → Integracja):

  • FAKTUROWNIA_DOMAIN — your account subdomain (e.g. mycompany)
  • FAKTUROWNIA_API_TOKEN — API authorization code

Claude Code

claude mcp add fakturownia \
  -e FAKTUROWNIA_DOMAIN=mycompany \
  -e FAKTUROWNIA_API_TOKEN=... \
  -- uv run --directory /path/to/fakturownia-mcp fakturownia-mcp

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "fakturownia": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/fakturownia-mcp", "fakturownia-mcp"],
      "env": {
        "FAKTUROWNIA_DOMAIN": "mycompany",
        "FAKTUROWNIA_API_TOKEN": "..."
      }
    }
  }
}

MCP Inspector (interactive testing)

FAKTUROWNIA_DOMAIN=... FAKTUROWNIA_API_TOKEN=... uv run mcp dev src/fakturownia_mcp/server.py

Development

uv sync --extra dev
uv run ruff check . && uv run mypy && uv run pytest

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fakturownia_mcp-0.0.1.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fakturownia_mcp-0.0.1-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file fakturownia_mcp-0.0.1.tar.gz.

File metadata

  • Download URL: fakturownia_mcp-0.0.1.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for fakturownia_mcp-0.0.1.tar.gz
Algorithm Hash digest
SHA256 b08a8263f3b5b4c70b0136ba0c57118203776522b7efdba1f4dad9c19be31aab
MD5 2bcb6e874e4bb6e80ef2826654039f55
BLAKE2b-256 df40d0952edc1e34a69c15ddf7c52467b75c99d8b0c9d96f0c0d58e1d6ea7e96

See more details on using hashes here.

File details

Details for the file fakturownia_mcp-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for fakturownia_mcp-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1865f1cac608aa7c0ad9dae6532a7c3c728fc76ad5c5122e7c9ec8b093589e73
MD5 0489c4a6dcbf61ee6d9ba39890a9329b
BLAKE2b-256 9095fc6886ed33da30e844fb469f282fe023375dcb8abd6661eb17a7caca6a27

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page