Add all required MokoStandards documentation files. Refactor inline sqlfilters strings to use buildSqlFilter() and searchFilter() helpers for safe query construction with proper escaping. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
dolibarr-api-mcp
A Model Context Protocol (MCP) server that exposes the Dolibarr ERP/CRM REST API as tools for AI assistants.
Connects to Dolibarr instances over HTTP using the built-in REST API (/api/index.php) and API key authentication (DOLAPIKEY header). Claude, Cursor, and other MCP clients can manage third parties, invoices, proposals, orders, products, projects, and more — without SSH or direct server access.
Table of Contents
Background
Dolibarr ships with a comprehensive REST API that supports ERP/CRM operations over HTTP. This MCP server wraps that API into structured tools, enabling:
- Third party management (customers, suppliers, prospects — list, create, update, delete)
- Invoice management (list, create, add lines, validate, mark as paid)
- Commercial proposals / quotes (list, create, add lines, validate, close)
- Customer order management (list, create, validate)
- Product and service catalog (list, create, update, stock levels)
- Contact / address management
- Project and task management
- Category management
- Bank account listing
- Supplier invoice and order listing
- Warehouse and stock management
- Company setup and system status
- Raw API passthrough for any endpoint
Supports multiple named connections for managing several Dolibarr instances from a single MCP server.
Install
git clone https://git.mokoconsulting.tech/MokoConsulting/dolibarr-api-mcp.git
cd dolibarr-api-mcp
npm install
npm run build
npm run setup
The setup wizard will prompt for your Dolibarr URL and API key. Run it again to add more connections — each site gets its own name, URL, and API key so you can manage multiple Dolibarr instances from a single MCP server.
Usage
Add to Claude Code
In your Claude Code MCP settings (~/.claude.json or project .mcp.json):
{
"mcpServers": {
"dolibarr": {
"command": "node",
"args": ["/path/to/dolibarr-api-mcp/dist/index.js"]
}
}
}
Configuration
The easiest way to configure is npm run setup, which walks you through it interactively. Run it multiple times to add connections for each Dolibarr instance you manage.
You can also create the config manually. Copy config.example.json to ~/.dolibarr-api-mcp.json and edit:
cp config.example.json ~/.dolibarr-api-mcp.json
Each connection needs the Dolibarr instance's base URL and an API key (generated in Dolibarr under Setup > Security > API or per-user settings):
{
"defaultConnection": "production",
"connections": {
"local-dev": {
"baseUrl": "https://localhost:8080",
"apiKey": "your-dolibarr-api-key-here",
"insecure": true
},
"production": {
"baseUrl": "https://erp.example.com",
"apiKey": "your-production-api-key"
},
"staging": {
"baseUrl": "https://erp-staging.example.com",
"apiKey": "your-staging-api-key"
}
}
}
| Field | Required | Description |
|---|---|---|
baseUrl |
Yes | Dolibarr instance URL (no trailing slash) |
apiKey |
Yes | Dolibarr API key (DOLAPIKEY header auth) |
insecure |
No | Skip TLS verification for self-signed certs |
Tools
Third Parties
| Tool | Description |
|---|---|
dolibarr_thirdparties_list |
List third parties with customer/supplier/prospect filters |
dolibarr_thirdparty_get |
Get a single third party by ID |
dolibarr_thirdparty_create |
Create a new third party |
dolibarr_thirdparty_update |
Update an existing third party |
dolibarr_thirdparty_delete |
Delete a third party |
Invoices
| Tool | Description |
|---|---|
dolibarr_invoices_list |
List invoices with status and customer filters |
dolibarr_invoice_get |
Get a single invoice by ID |
dolibarr_invoice_create |
Create a new invoice |
dolibarr_invoice_add_line |
Add a line item to an invoice |
dolibarr_invoice_validate |
Validate (finalize) a draft invoice |
dolibarr_invoice_set_paid |
Mark an invoice as paid |
Proposals (Quotes)
| Tool | Description |
|---|---|
dolibarr_proposals_list |
List commercial proposals |
dolibarr_proposal_get |
Get a single proposal by ID |
dolibarr_proposal_create |
Create a new proposal |
dolibarr_proposal_add_line |
Add a line item to a proposal |
dolibarr_proposal_validate |
Validate a draft proposal |
dolibarr_proposal_close |
Close a proposal (sign or refuse) |
Orders
| Tool | Description |
|---|---|
dolibarr_orders_list |
List customer orders |
dolibarr_order_get |
Get a single order by ID |
dolibarr_order_create |
Create a new order |
dolibarr_order_validate |
Validate a draft order |
Products / Services
| Tool | Description |
|---|---|
dolibarr_products_list |
List products and services with filters |
dolibarr_product_get |
Get a single product by ID |
dolibarr_product_create |
Create a new product or service |
dolibarr_product_update |
Update a product or service |
dolibarr_product_stock |
Get stock levels across warehouses |
Other
| Tool | Description |
|---|---|
dolibarr_contacts_list |
List contacts/addresses |
dolibarr_contact_get |
Get a single contact by ID |
dolibarr_projects_list |
List projects |
dolibarr_project_get |
Get a single project by ID |
dolibarr_project_create |
Create a new project |
dolibarr_tasks_list |
List project tasks |
dolibarr_task_get |
Get a single task by ID |
dolibarr_users_list |
List Dolibarr users |
dolibarr_user_get |
Get a single user by ID |
dolibarr_categories_list |
List categories by type |
dolibarr_bankaccounts_list |
List bank accounts |
dolibarr_supplier_invoices_list |
List supplier invoices |
dolibarr_supplier_orders_list |
List supplier/purchase orders |
dolibarr_warehouses_list |
List warehouses |
dolibarr_setup_company |
Get company/entity information |
dolibarr_status |
Get Dolibarr version and status |
dolibarr_api_request |
Raw API request to any endpoint |
dolibarr_list_connections |
List configured connections |
All tools accept an optional connection parameter to target a specific named connection.
Contributing
Contributions are welcome! Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
This project follows the Contributor Covenant Code of Conduct.
License
This project is licensed under the GNU General Public License v3.0 or later - see the LICENSE file for details.
Copyright © 2026 Moko Consulting hello@mokoconsulting.tech
Maintainers
For questions or support, please contact: hello@mokoconsulting.tech
Revision History
| Date | Version | Author | Notes |
|---|---|---|---|
| 2026-05-07 | 0.0.1 | jmiller | Initial MCP server with Dolibarr REST API tools |