Skip to main content

Model Context Protocol server for Billit API integration, enabling AI assistants to manage invoices and financial transactions

Project description

Billit MCP Server

A Model Context Protocol (MCP) server that provides AI assistants with access to the Billit API for invoice management, financial transactions, and e-invoicing.

Add to Cursor

Copy this URL to add to Cursor (Auto-Update with pipx):

cursor://anysphere.cursor-deeplink/mcp/install?name=billit-mcp&config=eyJjb21tYW5kIjoicGlweCIsImFyZ3MiOlsicnVuIiwiLS1zcGVjIiwiYmlsbGl0LW1jcD09MC4yLjYiLCJweXRob24iLCItbSIsImJpbGxpdF9tY3AiXSwiZW52Ijp7IkJJTExJVF9BUElfS0VZIjoiIiwiQklMTElUX0JBU0VfVVJMIjoiaHR0cHM6Ly9hcGkuYmlsbGl0LmJlL3YxIiwiQklMTElUX1BBUlRZX0lEIjoiIiwiQklMTElUX0NPTlRFWFRfUEFSVFlfSUQiOiIifX0%3D

Overview

This MCP server provides 66 tools across 15 domains of the Billit API, enabling AI assistants to:

  • ๐Ÿ“„ Create and manage invoices, credit notes, and quotes
  • ๐Ÿ‘ฅ Manage customers and suppliers
  • ๐Ÿ“ฆ Handle product catalogs
  • ๐Ÿ’ฐ Track financial transactions
  • ๐Ÿ“ง Send invoices via email or Peppol e-invoicing
  • ๐Ÿช Configure webhooks for real-time updates
  • ๐Ÿค– Use AI-powered tools for reconciliation and analysis
  • ๐Ÿ“Š Generate financial reports

Quick Start

Option 1: One-Click Installation (Recommended)

Click the "Add to Cursor" button above to automatically configure the server in Cursor.

Option 2: Install from PyPI

pip install billit-mcp

Then add to Cursor manually:

  • Open Cursor Settings โ†’ MCP โ†’ "Add new MCP server"
  • Enter server name: billit-mcp
  • Enter command: python -m billit_mcp
  • Add your environment variables

๐Ÿ’ก Auto-Update Available: Want to always run the latest version? Use the pipx configuration - see AUTO-UPDATE.md for details.

Option 3: Manual Installation

  1. Clone and install:

    git clone https://github.com/markov-kernel/Billit-mcp.git
    cd Billit-mcp
    ./setup.sh  # or manually: poetry install
    
  2. Configure your environment: Create a .env file with your Billit credentials:

    BILLIT_API_KEY=your-api-key
    BILLIT_BASE_URL=https://api.billit.be/v1
    BILLIT_PARTY_ID=your-party-id
    BILLIT_CONTEXT_PARTY_ID=  # Optional, for accountant use
    
  3. Add to Cursor manually:

    • Open Cursor Settings โ†’ MCP โ†’ "Add new MCP server"
    • Enter the server name: billit-mcp
    • Enter the command: python -m billit_mcp
    • Add the environment variables from your .env file

Getting Started with Billit

  1. Create a Billit Production Account:

  2. Find Your Credentials:

    • API Key: Profile โ†’ Users & API Key
    • Party ID: Navigate to "My Company" and find the ID in the URL (e.g., .../Company/Edit/12345)

Available Tools

Core Business Operations

Party Management (4 tools)

  • list_parties - List customers or suppliers with filtering
  • create_party - Create new customers/suppliers
  • get_party - Get detailed party information
  • update_party - Update party details

Order Management (9 tools)

  • list_orders - List invoices, credit notes, quotes
  • create_order - Create new invoices/orders
  • get_order - Get order details
  • update_order - Update order properties
  • delete_order - Delete draft orders
  • record_payment - Record payments
  • send_order - Send via email/Peppol
  • add_booking_entries - Add accounting entries
  • list_deleted_orders - Track deleted orders

Product Management (3 tools)

  • list_products - Browse product catalog
  • get_product - Get product details
  • upsert_product - Create/update products

Financial Operations

Financial Transactions (3 tools)

  • list_financial_transactions - View bank transactions
  • import_transactions_file - Import bank statements
  • confirm_transaction_import - Confirm imports

Account Management (4 tools)

  • get_account_information - Account details
  • get_sso_token - Single sign-on access
  • get_next_sequence_number - Invoice numbering
  • register_company - Register new companies

Document & Communication

Document Management (4 tools)

  • list_documents - Browse documents
  • upload_document - Upload files
  • get_document - Get document metadata
  • download_file - Download files

Webhook Management (4 tools)

  • create_webhook - Subscribe to events
  • list_webhooks - View subscriptions
  • delete_webhook - Remove webhooks
  • refresh_webhook_secret - Rotate secrets

Peppol E-invoicing (7 tools)

  • check_peppol_participant - Verify Peppol status
  • register_peppol_participant - Join Peppol network
  • send_peppol_invoice - Send e-invoices
  • Plus 4 more tools for inbox management

AI-Powered Tools (11 tools)

  • suggest_payment_reconciliation - Match payments to invoices
  • generate_invoice_summary - Period summaries
  • list_overdue_invoices - Track late payments
  • get_cashflow_overview - Financial insights
  • Plus 7 more AI analysis tools

Additional Domains

  • Accountant Tools (6 tools) - Feed management
  • GL Account Tools (3 tools) - Chart of accounts
  • OCR Processing (3 tools) - Document processing
  • Reporting (2 tools) - Financial reports
  • Miscellaneous (3 tools) - Company search, system codes

Example Usage in Cursor

Once installed, you can ask the AI assistant to:

  • "Create an invoice for customer 'Tech Corp' for โ‚ฌ5,000 of consulting services"
  • "List all overdue invoices and suggest which ones to follow up on"
  • "Check if company VAT BE0123456789 is on the Peppol network"
  • "Generate a summary of this month's sales"
  • "Import this bank statement and match transactions to invoices"

Development

Running the MCP Server Locally

# Activate environment and run
poetry shell
python -m billit_mcp

Running Tests

# Run all tests
poetry run pytest

# Run with coverage
poetry run pytest --cov=billit

# Run live integration tests (requires credentials)
poetry run pytest tests/test_live_integration.py --live

Running the FastAPI Server (Legacy)

# Development server with auto-reload
poetry run uvicorn server:app --reload

# Production server
poetry run uvicorn server:app --host 0.0.0.0 --port 8000

Docker Deployment

# Build and run with Docker
docker build -t billit-mcp .
docker run --env-file .env -p 8000:8000 billit-mcp

Project Structure

billit-mcp/
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ billit_mcp/
โ”‚       โ”œโ”€โ”€ __init__.py
โ”‚       โ””โ”€โ”€ server.py      # MCP server implementation
โ”œโ”€โ”€ billit/
โ”‚   โ”œโ”€โ”€ client.py          # API client with rate limiting
โ”‚   โ”œโ”€โ”€ models/            # Pydantic models
โ”‚   โ””โ”€โ”€ tools/             # FastAPI routers (legacy)
โ”œโ”€โ”€ tests/                 # Comprehensive test suite
โ”œโ”€โ”€ mcp.json              # MCP configuration
โ””โ”€โ”€ pyproject.toml        # Package configuration

Features

  • ๐Ÿ”’ Secure: API key authentication with environment variables
  • โšก Rate Limited: Built-in rate limiting to respect API limits
  • ๐Ÿงช Well Tested: 87% test coverage with comprehensive test suite
  • ๐Ÿ“š Documented: All tools have detailed descriptions and parameter documentation
  • ๐Ÿ”„ Async: Full async/await support for optimal performance
  • ๐ŸŽฏ Type Safe: Full type annotations with Pydantic models

Environment Variables

# Required
BILLIT_API_KEY="your-api-key"
BILLIT_BASE_URL="https://api.billit.be/v1"
BILLIT_PARTY_ID="your-party-id"

# Optional
BILLIT_CONTEXT_PARTY_ID=""  # For accountant use cases
RATE_LIMIT_PER_MINUTE=50    # Default: 50
MCP_SERVER_PORT=8000        # Default: 8000
LOG_LEVEL="INFO"            # Default: INFO

Support

License

This project is licensed under the MIT License.

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

billit_mcp-0.2.12.tar.gz (21.1 kB view details)

Uploaded Source

Built Distribution

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

billit_mcp-0.2.12-py3-none-any.whl (27.9 kB view details)

Uploaded Python 3

File details

Details for the file billit_mcp-0.2.12.tar.gz.

File metadata

  • Download URL: billit_mcp-0.2.12.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.5 Darwin/24.5.0

File hashes

Hashes for billit_mcp-0.2.12.tar.gz
Algorithm Hash digest
SHA256 e27220db3cd1765c23b0149f7d3d7c3424191c7d1349ff61aed9b5079805483f
MD5 ee0ff6fc183c477c93e8637118a715eb
BLAKE2b-256 3a5ffa906ef3c35048f9d1aca4d082423e3b4951ec29761da78ebb9571ae2df1

See more details on using hashes here.

File details

Details for the file billit_mcp-0.2.12-py3-none-any.whl.

File metadata

  • Download URL: billit_mcp-0.2.12-py3-none-any.whl
  • Upload date:
  • Size: 27.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.5 Darwin/24.5.0

File hashes

Hashes for billit_mcp-0.2.12-py3-none-any.whl
Algorithm Hash digest
SHA256 dd79e3e309a1235de2ea23b908dc59dc3673cd3fba5402fdedcec5d6663d6688
MD5 515f7927f6bd8328f3a21fddb884b32a
BLAKE2b-256 f4d23981bf4ae1521d406e910dd2c6b1dd9bfeee3c62625ace64e9c909d68992

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