Dolibarr MCP Server

Dolibarr MCP Server

Provides 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.

Category
访问服务器

README

Dolibarr MCP Server

Dolibarr MCP delivers a Model Context Protocol (MCP) interface for the Dolibarr ERP/CRM. The project mirrors the project structure of prestashop-mcp: an async API client, a production-ready STDIO server, and focused documentation.

Design Note: While sharing the same architecture, this server implements specialized search tools (e.g., search_products_by_ref, resolve_product_ref) instead of a single unified get_ tool. This design choice ensures efficient server-side filtering via Dolibarr's SQL API, preventing the agent from accidentally loading thousands of records and exceeding context limits.

Claude Desktop and other MCP-aware tools can use the server to manage customers, products, invoices, orders, and contacts in a Dolibarr instance.

Consult the bundled documentation index for deep dives into configuration, API coverage, and contributor workflows.

✨ Features

  • Full ERP coverage – CRUD tools for users, customers, products, invoices, orders, contacts, projects, and raw API access.
  • Advanced Search – Server-side filtering for products, customers, and projects to minimize token usage and costs.
  • Async/await HTTP client – Efficient Dolibarr API wrapper with structured error handling.
  • Ready for MCP hosts – STDIO transport compatible with Claude Desktop out of the box.
  • Shared workflow with prestashop-mcp – Identical developer ergonomics and documentation structure across both repositories.

✅ Prerequisites

  • Python 3.8 or newer.
  • Access to a Dolibarr installation with the REST API enabled and a personal API token.

📦 Installation

Linux / macOS

git clone https://github.com/latinogino/dolibarr-mcp.git
cd dolibarr-mcp
python3 -m venv venv_dolibarr
source venv_dolibarr/bin/activate
pip install -e .
# Optional development extras
pip install -e '.[dev]'

While the virtual environment is active record the Python executable path with which python. Claude Desktop must launch the MCP server using this interpreter.

Windows (PowerShell)

git clone https://github.com/latinogino/dolibarr-mcp.git
Set-Location dolibarr-mcp
py -3 -m venv venv_dolibarr
./venv_dolibarr/Scripts/Activate.ps1
pip install -e .
# Optional development extras (escape brackets in PowerShell)
pip install -e .`[dev`]

Run Get-Command python (or Get-Command python.exe) while the environment is activated and note the absolute path. Claude Desktop should use this interpreter inside the virtual environment, for example C:\\path\\to\\dolibarr-mcp\\venv_dolibarr\\Scripts\\python.exe.

Docker (optional)

docker compose up -d
# or
docker build -t dolibarr-mcp .
docker run -d \
  -e DOLIBARR_URL=https://your-dolibarr.example.com/api/index.php \
  -e DOLIBARR_API_KEY=YOUR_API_KEY \
  dolibarr-mcp

⚙️ Configuration

Environment variables

The server reads configuration from the environment or a .env file. Both DOLIBARR_URL and DOLIBARR_SHOP_URL are accepted for the base API address.

Variable Description
DOLIBARR_URL / DOLIBARR_SHOP_URL Base Dolibarr API endpoint, e.g. https://example.com/api/index.php. Trailing slashes are handled automatically.
DOLIBARR_API_KEY Personal Dolibarr API token.
LOG_LEVEL Optional logging verbosity (INFO, DEBUG, WARNING, …).
MCP_TRANSPORT Transport to use: stdio (default) or http for streamable HTTP.
MCP_HTTP_HOST Host/interface to bind when using HTTP transport (default 0.0.0.0).
MCP_HTTP_PORT Port to bind when using HTTP transport (default 8080).

Example .env:

DOLIBARR_URL=https://your-dolibarr.example.com/api/index.php
DOLIBARR_API_KEY=YOUR_API_KEY
LOG_LEVEL=INFO

Claude Desktop configuration

Add the following block to claude_desktop_config.json, replacing the paths and credentials with your own values:

{
  "mcpServers": {
    "dolibarr": {
      "command": "C:\\path\\to\\dolibarr-mcp\\venv_dolibarr\\Scripts\\python.exe",
      "args": ["-m", "dolibarr_mcp.dolibarr_mcp_server"],
      "cwd": "C:\\path\\to\\dolibarr-mcp",
      "env": {
        "DOLIBARR_SHOP_URL": "https://your-dolibarr.example.com",
        "DOLIBARR_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

Restart Claude Desktop after saving the configuration. The MCP server reads the same environment variables when launched from Linux or macOS hosts.

▶️ Usage

Start the MCP server

The server communicates over STDIO by default, so run it in the foreground from the virtual environment:

python -m dolibarr_mcp.dolibarr_mcp_server

Logs are written to stderr to avoid interfering with the MCP protocol. Keep the process running while Claude Desktop is active.

HTTP streaming mode (for Open WebUI or remote MCP clients)

Enable the HTTP transport by setting MCP_TRANSPORT=http (and optionally MCP_HTTP_HOST / MCP_HTTP_PORT). This keeps the server running without STDIO and exposes the Streamable HTTP transport compatible with Open WebUI:

MCP_TRANSPORT=http MCP_HTTP_PORT=8080 python -m dolibarr_mcp.dolibarr_mcp_server

Then point Open WebUI’s MCP configuration at http://<host>:8080/. The MCP protocol headers (including mcp-protocol-version) are handled automatically by Open WebUI’s MCP client.

Test the Dolibarr credentials

Use the standalone connectivity check before wiring the server into an MCP host:

python -m dolibarr_mcp.test_connection --url https://your-dolibarr.example.com/api/index.php --api-key YOUR_API_KEY

When the environment variables are already set, omit the overrides and run python -m dolibarr_mcp.test_connection.

🧪 Development

  • Run the test-suite with pytest (see docs/development.md for coverage options and Docker helpers).
  • Editable installs rely on the src/ layout and expose the dolibarr-mcp console entry point for backwards compatibility.
  • The repository structure, tooling, and docs intentionally mirror prestashop-mcp to keep the companion projects aligned.

📄 License

Released under the MIT License.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选