NOVA MCP Server
NOVA MCP Server
Model Context Protocol-Server im Nur-Lese-Modus, der die Buchhaltungs- und
Geschäftsdaten der Demonstrationsgesellschaft NOVA (Dolibarr 23.0.3) für die schrittweise
Untersuchung durch einen KI-Assistenten über Cowork bereitstellt. Siehe spec-final.md
für die vollständige Spezifikation.
Architektur
Auth (
app/auth/) : JWT-Keycloak-Validierung (JWKS überPyJWKClient), Identitätsauflösung(iss, sub),CredentialStore(lokales YAML), das auf einen Dolibarr-API-Schlüssel pro Benutzer abbildet, Middlewarecredential_gate(403, wenn die Identität nicht zugeordnet ist).Dolibarr (
app/dolibarr/) : zentraler HTTP-Client (persistenter Verbindungspool, begrenzte Wiederholungsversuche, Decimal-Konvertierung) für die Dolibarr-REST-API (Drittanbieter, Rechnungen, Zahlungen, Bank).NOVA-Begleitmodul (
dolibarr-module/) : Der Kontenplan und das Hauptbuch werden von der Standard-Dolibarr-API nicht bereitgestellt – siehe den entsprechenden Abschnitt unten.Privacy Layer (
app/privacy/) : ersetzt jede Drittanbieter-Identität durch eine stabile technische Referenz (THIRDPARTY:<id>, usw.), die von den Diensten systematisch angewendet wird.Domain (
app/domain/) : deterministische Buchhaltungsregeln (EBITDA, Aging, Paginierung, Validierung), unabhängig von jedem Framework.Services (
app/services/) : Geschäftslogik, ein Modul pro Domäne.MCP (
app/mcp_server/) : MCP-Server (offizielles Anthropic-SDK), Tools pro Domäne, zentraler Dekorator für Fehlerübersetzung + Protokollierung (errors.py).
Related MCP server: NuMetric MCP Server
Warum ein Dolibarr-Begleitmodul?
Die Dolibarr-23.0-REST-API bietet keinen Endpoint für den Kontenplan oder das Hauptbuch (der
einzige native Einstiegspunkt, GET /accountancy/exportdata, schreibt eine Datei auf der
Serverseite, ohne sie in der HTTP-Antwort zurückzugeben). dolibarr-module/nova/ fügt zwei
Nur-Lese-Endpoints hinzu (GET /nova/accounts, GET /nova/bookkeeping) unter demselben
nativen REST-Mechanismus (DOLAPIKEY, Anwendungsberechtigungen). Dieses Modul wird separat
auf der Dolibarr-NOVA-Instanz installiert – siehe dolibarr-module/README.md.
Lokaler Start
uv sync --extra dev
cp .env.example .env # renseigner OIDC_ISSUER, CREDENTIAL_STORE_PATH, DOLIBARR_API_URL
cp credentials/credentials.example.yaml credentials/credentials.yaml # ne pas versionner
uv run uvicorn app.main:app --reloadGET /health/live,GET /health/ready: Healthchecks (nicht authentifiziert).POST /mcp: MCP-Endpoint (Streamable HTTP).
Tests
uv run pytest # suite complète (couverture terminal + coverage.xml)
uv run pytest --cov=app --cov-report=htmlKeine Datenbank: Die Tests verwenden einen Test-Double (tests/fixtures/) für
DolibarrClient, keine PostgreSQL/NullPool-Fixtures.
Docker
docker compose up --buildDer CredentialStore ist schreibgeschützt gemountet (./credentials:/app/credentials:ro) –
credentials/credentials.yaml niemals versionieren.
Voraussetzungen auf der Dolibarr-NOVA-Seite
dolibarr-module/nova/installieren (siehe dessen README).Für jeden Prüfer: einen dedizierten Dolibarr-Benutzer erstellen, dessen
DOLAPIKEYgenerieren, das Recht Kontenplan und Hauptbuch über die NOVA-API lesen gewähren und dann seinen Eintrag incredentials/credentials.yamlhinzufügen (mit demsubseines Keycloak-Tokens) – den MCP-Server neu starten, damit die Änderung wirksam wird (kein Hot-Reload, H2).Für
get_company: die Dolibarr-KonstanteAPI_LOGINS_ALLOWED_FOR_GET_COMPANYausfüllen (oder das Admin-Recht gewähren) für jeden verwendeten Login – andernfalls schlägt genau dieses Tool mit einem Upstream-403-Fehler fehl (erwartetes Verhalten).
This server cannot be deployed
Maintenance
Related MCP Connectors
Query your books, company data, business health, and ship invoices from your AI assistant.
Odoo MCP connector for ChatGPT and Claude: ask sales, invoices and stock in plain words. Read-only.
- KipperOAuthcom.kipper
Read-only by architecture: ask AI about QuickBooks, Xero and NetSuite, across every entity.
Open-source AI accounting skills verified by licensed accountants (tax, VAT, payroll).
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables comprehensive interaction with ERPNext systems through natural language, providing secure access to any document type (customers, items, invoices, etc.) with enterprise-grade permission controls and audit logging.MIT
- AlicenseNot gradedqualityCmaintenanceA read-only MCP server for the NuMetric.work accounting/POS/ERP platform, exposing 38 tools to query live business data such as financial statements, invoices, taxes, projects, inventory, and documents. It enables AI assistants to answer from real accounting data without any create, edit, or delete capabilities.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to natively interact with Dolibarr ERP/CRM through its REST API, providing over 30 tools for managing customers, contacts, products, quotes, orders, invoices, stock, projects, contracts, interventions, and PDF generation, while supporting complex workflow orchestration and read-only security modes.MIT
- AlicenseBqualityBmaintenanceEnables read-only access to Merit Aktiva accounting data, including customers, vendors, sales invoices, accounts, payments, and taxes, through natural language MCP tools.771MIT