Skip to main content
Glama
mcp-server-dolibarr

mcp-server-dolibarr

by sachitha7

mcp-server-dolibarr

An MCP server for Dolibarr ERP/CRM. Lets Claude (or any MCP-compatible client) read and manage your Dolibarr thirdparties (clients/suppliers), commercial proposals, contracts, and invoices directly — no manual API scripting needed.

Built by Nexora 360 Digital, released for anyone running Dolibarr to use for free.

Requirements

  • A running Dolibarr instance (v15+) with the REST API module enabled (Setup → Modules → API)

  • A Dolibarr API key for the user the assistant should act as (your user profile → API/REST tab → Generate Key)

  • Node.js 18 or newer

Related MCP server: clio-mcp

Installation

No install needed — run it directly with npx (see configuration below), or clone this repo and run npm install.

Configuration

The server reads two environment variables:

Variable

Description

Example

DOLIBARR_URL

Your Dolibarr REST API base URL

https://your-domain.com/dolibarr/api/index.php

DOLIBARR_API_KEY

The API key generated for your Dolibarr user

abc123...

Claude Code

claude mcp add dolibarr \
  --env DOLIBARR_URL=https://your-domain.com/dolibarr/api/index.php \
  --env DOLIBARR_API_KEY=your_api_key_here \
  -- npx -y mcp-server-dolibarr

Claude Desktop / other MCP clients

Add to your MCP config file (e.g. claude_desktop_config.json):

{
  "mcpServers": {
    "dolibarr": {
      "command": "npx",
      "args": ["-y", "mcp-server-dolibarr"],
      "env": {
        "DOLIBARR_URL": "https://your-domain.com/dolibarr/api/index.php",
        "DOLIBARR_API_KEY": "your_api_key_here"
      }
    }
  }
}

Available tools

Connectivity

  • dolibarr_ping — verify the URL/API key are working

Thirdparties (clients/suppliers)

  • dolibarr_list_thirdparties

  • dolibarr_get_thirdparty

  • dolibarr_find_thirdparty_by_email

  • dolibarr_create_thirdparty

  • dolibarr_update_thirdparty

Commercial Proposals (Quotes)

  • dolibarr_list_proposals

  • dolibarr_get_proposal

  • dolibarr_create_proposal

  • dolibarr_add_proposal_line

  • dolibarr_validate_proposal

Contracts

  • dolibarr_list_contracts

  • dolibarr_get_contract

  • dolibarr_create_contract

  • dolibarr_add_contract_line

Invoices

  • dolibarr_list_invoices

  • dolibarr_get_invoice

  • dolibarr_create_invoice

  • dolibarr_add_invoice_line

  • dolibarr_validate_invoice

  • dolibarr_get_invoice_pdf_url

Anything else

  • dolibarr_request — raw passthrough to any Dolibarr REST endpoint (/products, /users, /projects, etc.) for the parts of Dolibarr's huge API surface this server doesn't wrap explicitly yet.

Notes & known Dolibarr quirks

  • Proposals, contracts and invoices are created in two steps in Dolibarr's API: create the header first, then add line items separately (*_lines endpoints). The tools above mirror that.

  • Dolibarr 23.x line-creation silent-failure bug: on Dolibarr 23 instances, POST /{proposals|invoices|contracts}/{id}/lines actually expects the body wrapped as {"request_data": {...fields...}}, not a flat object of fields (despite this not matching the field names documented for older Dolibarr versions). Sending a flat object doesn't error — it silently creates a blank line with special_code: "3" (no description, qty 0, price 0) instead of your real data. dolibarr_add_proposal_line, dolibarr_add_invoice_line and dolibarr_add_contract_line already wrap the body correctly to work around this. If you see blank/special_code: 3 lines appearing on Dolibarr versions other than 23.x, check your instance's live schema at /api/index.php/explorer/swagger.json and adjust index.js accordingly — Dolibarr's REST API shape has changed across major versions.

  • On some Dolibarr versions, certain endpoints (e.g. contracts) only work reliably for admin/SuperAdmin API keys — if a non-admin key fails, try generating the key as an admin user.

  • country_id for thirdparties follows Dolibarr's internal country table (e.g. 144 = Sri Lanka in standard Dolibarr installs) — check your instance if unsure.

Contributing

Issues and PRs welcome — this was built to scratch a real itch (managing client proposals/invoices via Claude) and intentionally keeps a dolibarr_request escape hatch so it stays useful even where dedicated tools haven't been written yet.

License

MIT — see LICENSE.

Available Tools

22 tools
dolibarr_add_contract_lineB

Add a line item to an existing contract (e.g. an annual hosting/maintenance service).

Inputs: contract_id (required), description (required), subprice (required), qty, +3 more.

dolibarr_add_invoice_lineC

Add a line item to an existing draft invoice.

Inputs: invoice_id (required), desc (required), subprice (required), qty, +2 more.

dolibarr_add_proposal_lineC

Add a line item to an existing commercial proposal.

Inputs: proposal_id (required), desc (required), subprice (required), qty, +2 more.

dolibarr_create_contractB

Create a new contract header. Add line items afterwards with dolibarr_add_contract_line.

Inputs: socid (required), date_contrat, note_public, note_private, +2 more.

dolibarr_create_invoiceA

Create a new invoice header (draft). Add line items afterwards with dolibarr_add_invoice_line, then validate it.

Inputs: socid (required), date, note_public, note_private, +2 more.

dolibarr_create_proposalA

Create a new commercial proposal (quote) header. Add line items afterwards with dolibarr_add_proposal_line.

Inputs: socid (required), date, duree_validite, note_public, +2 more.

dolibarr_create_thirdpartyC

Create a new thirdparty (client/supplier) in Dolibarr.

Inputs: name (required), email, phone, address, +3 more.

dolibarr_find_thirdparty_by_emailA

Find a Dolibarr thirdparty (client/supplier) by email address.

Inputs: email (required).

dolibarr_get_contractA

Get a single contract, including its lines, by ID.

Inputs: id (required).

dolibarr_get_invoiceA

Get a single invoice, including its lines and payment status, by ID.

Inputs: id (required).

dolibarr_get_invoice_pdf_urlA

Build the Dolibarr web URL where a generated invoice PDF can be downloaded/printed in the browser (requires a logged-in Dolibarr session).

Inputs: id (required).

dolibarr_get_proposalA

Get a single commercial proposal (quote), including its lines, by ID.

Inputs: id (required).

dolibarr_get_thirdpartyA

Get a single Dolibarr thirdparty (client/supplier) by its ID.

Inputs: id (required).

dolibarr_list_contractsC

List contracts in Dolibarr.

Inputs: limit, sortfield, sortorder, sqlfilters.

dolibarr_list_invoicesC

List invoices in Dolibarr.

Inputs: limit, sortfield, sortorder, sqlfilters.

dolibarr_list_proposalsC

List commercial proposals (quotes) in Dolibarr.

Inputs: limit, sortfield, sortorder, sqlfilters.

dolibarr_list_thirdpartiesA

List thirdparties (clients/suppliers) in Dolibarr. Supports basic filtering and pagination.

Inputs: limit, page, sortfield, sortorder, +1 more.

dolibarr_pingA

Check that the configured Dolibarr URL and API key work, by fetching a single thirdparty record.

Inputs: no named parameters.

dolibarr_requestA

Make a raw authenticated request to any Dolibarr REST API endpoint not covered by the dedicated tools above (e.g. /products, /users, /projects, /agendaevents). Path is relative, e.g. '/products?limit=10'.

Inputs: method (required), path (required), body.

dolibarr_update_thirdpartyB

Update fields on an existing Dolibarr thirdparty.

Inputs: id (required), fields (required).

dolibarr_validate_invoiceC

Validate a draft invoice, assigning it a definitive invoice number.

Inputs: id (required).

dolibarr_validate_proposalA

Validate (confirm) a draft commercial proposal so it can be sent to the client.

Inputs: id (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 22 tools

    Disambiguation5/5

    Each tool targets a distinct resource (contract, invoice, proposal, thirdparty) and action (create, add_line, get, list, validate, find, update). The catch-all 'dolibarr_request' tool is clearly distinguished as a generic fallback. There is no ambiguity or overlap.

    Naming Consistency5/5

    All tools follow a consistent 'dolibarr_verb_noun' pattern (e.g., create_invoice, list_proposals). The only exception is 'dolibarr_request', which is a generic tool and intentionally deviates. Overall, naming is highly predictable and uniform.

    Tool Count5/5

    22 tools cover multiple ERP entities (thirdparties, contracts, invoices, proposals) with appropriate CRUD-like operations. The number is well-scoped for a comprehensive integration without being excessive.

    Completeness4/5

    The tool set covers core workflows for thirdparties, contracts, invoices, and proposals, including creation, line addition, retrieval, listing, and validation. Missing are update and delete operations for most entities, but the raw request tool can compensate. Minor gaps in update/delete completeness.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      A
      maintenance
      An MCP server that enables AI assistants like Claude to interact with Odoo ERP systems through natural language, allowing users to search, create, update, and manage business data in their Odoo instance.
      16,479 PyPI
      416
      Mozilla Public 2.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      An MCP server for Clio Manage legal practice management software that enables Claude and other MCP clients to read and write Clio data including contacts, matters, and activities directly from chat.
      8
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      MCP server to connect Claude with Odoo 18, enabling CRUD operations on Odoo models via natural language.
      2
      -
    • F
      license
      Not graded
      quality
      C
      maintenance
      An MCP server that connects Claude to FreshBooks, enabling reading and management of invoices, clients, expenses, projects, and time entries via natural language.
      1
      -