mcp-dolibarr
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-dolibarrShow me all unpaid invoices with their totals"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🚀 mcp-dolibarr
Highly performant and secure MCP (Model Context Protocol) server based on FastMCP, allowing any AI assistant (Claude Desktop, Cursor, AI Agents) to interact natively with the Dolibarr ERP/CRM via its official REST API.
✨ Main Features
The MCP server covers all of Dolibarr's business management needs through more than 30 dedicated tools spread across 12 modules:
🏢 Third Parties & Companies (
tools/thirdparties.py): Listing, full-text search by name, detailed consultation by ID, creation and partial update of customer/prospect records.👤 Contacts & Individuals (
tools/contacts.py): Listing and creation of contacts (individuals) linked to companies.📦 Products & Services (
tools/products.py): Complete catalog of items and services, search by reference, creation, update, and management of pre-tax prices / VAT rates.📄 Quotes & Commercial Proposals (
tools/proposals.py): Creation of multi-line quotes, validation, update/delete of lines, and automatic conversion.🛒 Customer Orders (
tools/orders.py): Generation of orders from a validated quote, consultation and fine-grained modification of order lines.💳 Invoices & Payments (
tools/invoices.py): Creation of invoices from an order or directly, final validation, and management of invoice lines.📊 Stock by Warehouse (
tools/stocks.py): Instant consultation of a product's actual stock levels, warehouse by warehouse.📁 Projects (
tools/projects.py): Creation, consultation, and attachment of projects to customer records.📜 Contracts (
tools/contracts.py): Tracking of service contracts and creation for a third party.🛠️ Intervention Reports (
tools/interventions.py): Management of technical field intervention reports.📑 Documents & PDF (
tools/documents.py): Automated generation of official PDFs (Azur, Crabe, etc. models) and download with Base64 encoding.🔌 Direct REST API (Fallback Mode) (
tools/raw.py):call_dolibarr_apitool allowing direct querying of any Dolibarr REST route not covered by a dedicated tool.
Related MCP server: MCP Server for Odoo
🌟 What mcp-dolibarr offers compared to other MCP servers
Unlike basic or generic MCP gateways, this server brings decisive added value:
🔄 Complex Orchestration in a Single Call (
convert_proposal_to_invoice): Instead of forcing the AI to make 4 successive manual requests, the orchestrator tool automatically chains: Validated quote $\rightarrow$ Customer order $\rightarrow$ Invoice $\rightarrow$ Invoice validation.✏️ Granular Line Manipulation (Add / Update / Delete): Full support for line-by-line management on quotes, orders, and invoices (adding items, modifying quantities/prices/labels, deleting lines).
🛡️ Native Security / Read-Only Mode (
READ_ONLY=true): Ability to restrict the server to read-only consultation for sensitive production environments. All write requests (POST,PUT,DELETE) are intercepted and rejected at the source.🔁 Resilience and Exponential Backoff (HTTP 429): Intelligent handling of Dolibarr API rate limits: automatically retries with delay (1s, 2s, 4s) in case of overload without causing the AI agent to fail.
🎯 Cleaning and Formatting Optimized for LLM:
Raw JSON responses from Dolibarr (often riddled with +50 useless internal fields) are cleaned and summarized into clear, readable text.
Strict upstream validation (emails, positive amounts, required fields) to avoid sending malformed requests to Dolibarr.
📄 Real PDF File Generation and Extraction: Allows ordering the generation of regulatory PDFs and retrieving their Base64-encoded content for the AI agent.
🌐 Native Multi-Transport (
stdio,http,sse,streamable-http): Works both locally on a computer (Claude Desktop, Cursor) and as a containerized microservice on a cloud server.
🏃 How to Launch and Run the MCP Server (Run)
1. Preparing the Local Environment
# 1. Créer l'environnement virtuel Python
python -m venv .venv
# 2. Activer l'environnement
# Linux / macOS / Git Bash :
source .venv/bin/activate
# Windows PowerShell :
# .venv\Scripts\Activate.ps1
# 3. Installer les dépendances
pip install -r requirements.txt
# 4. Configurer le fichier de variables d'environnement
cp .env.example .envIn the .env file, configure access to your Dolibarr instance:
DOLIBARR_URL=http://localhost:8080/api/index.php
DOLIBARR_API_KEY=votre_cle_api_dolibarr
MCP_TRANSPORT=stdio
LOG_LEVEL=INFO
READ_ONLY=false2. Starting the MCP Server
A. Local stdio Mode (Claude Desktop / Cursor / VS Code)
Simple launch in the terminal:
python server.pyTo connect Claude Desktop, add the following configuration to your claude_desktop_config.json file:
{
"mcpServers": {
"dolibarr": {
"command": "python",
"args": ["/chemin/absolu/vers/mcp-dolibarr/server.py"],
"env": {
"DOLIBARR_URL": "http://localhost:8080/api/index.php",
"DOLIBARR_API_KEY": "votre_cle_api_dolibarr"
}
}
}
}B. Remote Server Mode http / Streamable HTTP
To expose the MCP server via HTTP (for example on a remote server or a cloud container):
MCP_TRANSPORT=http MCP_PORT=8000 python server.pyThe server will be accessible at http://0.0.0.0:8000.
3. Running with Docker
Via Docker Compose (Recommended)
docker-compose up -d --buildVia Docker CLI
docker build -t mcp-dolibarr .
docker run -d -p 8000:8000 --env-file .env mcp-dolibarr🧪 Running Unit Tests
The unit test suite validates the behavior of the client and tools using pytest and the respx HTTP mock (no real network calls or modifications on your Dolibarr):
pytest📁 Project Architecture and Structure
mcp-dolibarr/
├── app.py # Initialisation de l'instance FastMCP & gestion du lifespan
├── server.py # Point d'entrée principal (Transports stdio/http & Logging)
├── config/
│ └── settings.py # Centralisation et validation des paramètres d'environnement (.env)
├── dolibarr/
│ ├── client.py # Client HTTP asynchrone httpx connecté à l'API REST Dolibarr
│ ├── auth.py # Authentification HTTP via le header DOLAPIKEY
│ └── exceptions.py # Hiérarchie des erreurs et exceptions métier
├── tools/ # 12 modules d'outils MCP exposés aux assistants IA
│ ├── thirdparties.py # Gestion des tiers et sociétés clients/prospects
│ ├── contacts.py # Gestion des contacts personnes physiques
│ ├── products.py # Catalogue produits et services
│ ├── proposals.py # Devis & Orchestrateur de conversion devis->facture
│ ├── orders.py # Commandes clients et gestion de leurs lignes
│ ├── invoices.py # Facturation, validation et paiements
│ ├── stocks.py # Suivi des niveaux de stock par entrepôt
│ ├── projects.py # Fiches projets
│ ├── contracts.py # Suivi des contrats clients
│ ├── interventions.py # Fiches d'intervention technique
│ ├── documents.py # Génération & téléchargement de PDF
│ └── raw.py # Outil de secours API REST brute
├── utils/
│ ├── formatters.py # Nettoyage et mise en forme des réponses JSON pour les LLM
│ └── validators.py # Validation stricte des entrées utilisateur
├── tests/ # Tests unitaires automatisés (pytest + respx)
├── Dockerfile # Image Docker du serveur MCP
├── docker-compose.yml # Fichier Docker Compose
├── requirements.txt # Liste des dépendances Python
└── README.md # Documentation du projetThis server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to interact with Odoo ERP systems through natural language to search records, create entries, update data, and manage business operations. Supports secure authentication and configurable access controls for production environments.
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to interact with Odoo ERP systems through natural language, allowing users to search, create, update, and manage business records like customers, products, and invoices across any Odoo instance.1Mozilla Public 2.0
- AlicenseNot gradedqualityDmaintenanceProvides a Model Context Protocol interface for the Dolibarr ERP/CRM, enabling AI agents to manage customers, products, invoices, and orders. It features specialized search tools and server-side filtering to efficiently interact with Dolibarr's REST API while minimizing token usage.1MIT
- FlicenseNot gradedqualityCmaintenanceExposes a curated subset of the Officegest API v2 (22 CRUD tools) for managing clients, sales, and stock to AI clients like Claude Code and Claude Desktop.1
Related MCP Connectors
Odoo ERP for AI agents: hosted OAuth endpoint, gated writes, one endpoint for every instance.
Chile DTE for AI agents - boleta/factura electronica via OpenFactura or LibreDTE. Stateless BYO.
Universal AI API Orchestrator — 1,554 tools, 96 services. One install.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Houmamba1/mcp-dolibarr'
If you have feedback or need assistance with the MCP directory API, please join our Discord server