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.
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
-
Clone and install:
git clone https://github.com/markov-kernel/Billit-mcp.git cd Billit-mcp ./setup.sh # or manually: poetry install
-
Configure your environment: Create a
.envfile 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
-
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
.envfile
Getting Started with Billit
-
Create a Billit Production Account:
- Register at https://my.billit.be/Account/Register
- This gives you access to the production environment
-
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 filteringcreate_party- Create new customers/suppliersget_party- Get detailed party informationupdate_party- Update party details
Order Management (9 tools)
list_orders- List invoices, credit notes, quotescreate_order- Create new invoices/ordersget_order- Get order detailsupdate_order- Update order propertiesdelete_order- Delete draft ordersrecord_payment- Record paymentssend_order- Send via email/Peppoladd_booking_entries- Add accounting entrieslist_deleted_orders- Track deleted orders
Product Management (3 tools)
list_products- Browse product catalogget_product- Get product detailsupsert_product- Create/update products
Financial Operations
Financial Transactions (3 tools)
list_financial_transactions- View bank transactionsimport_transactions_file- Import bank statementsconfirm_transaction_import- Confirm imports
Account Management (4 tools)
get_account_information- Account detailsget_sso_token- Single sign-on accessget_next_sequence_number- Invoice numberingregister_company- Register new companies
Document & Communication
Document Management (4 tools)
list_documents- Browse documentsupload_document- Upload filesget_document- Get document metadatadownload_file- Download files
Webhook Management (4 tools)
create_webhook- Subscribe to eventslist_webhooks- View subscriptionsdelete_webhook- Remove webhooksrefresh_webhook_secret- Rotate secrets
Peppol E-invoicing (7 tools)
check_peppol_participant- Verify Peppol statusregister_peppol_participant- Join Peppol networksend_peppol_invoice- Send e-invoices- Plus 4 more tools for inbox management
AI-Powered Tools (11 tools)
suggest_payment_reconciliation- Match payments to invoicesgenerate_invoice_summary- Period summarieslist_overdue_invoices- Track late paymentsget_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
- Billit API Documentation: See
billit_docs_markdown/directory - MCP Documentation: Model Context Protocol
- Issues: GitHub Issues
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file billit_mcp-0.2.9.tar.gz.
File metadata
- Download URL: billit_mcp-0.2.9.tar.gz
- Upload date:
- Size: 20.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01c59ba3408b672b95de67bddc5e783146049b0187300cd900b0cf02fdfc61f6
|
|
| MD5 |
b10dfbe739c7c33a72b827633b3c0ac2
|
|
| BLAKE2b-256 |
9661fbffb3ada5a01e86b0d50d25a086572e207ba64b467af55f6a3a1c333108
|
File details
Details for the file billit_mcp-0.2.9-py3-none-any.whl.
File metadata
- Download URL: billit_mcp-0.2.9-py3-none-any.whl
- Upload date:
- Size: 26.4 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef7a253bf453885322db3e2f148c0dc44510011d80d165a188f811e330d5e2f5
|
|
| MD5 |
c7f1d1ec25130c6e4a7f971359e78e11
|
|
| BLAKE2b-256 |
b724ef24582382d336ef822541064690163bb6827ccf82c1ca6d9e5f5ef15693
|