LD

latinogino/dolibarr-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

23 stars 14 forks 质量 71 趋势 0MIT

Dolibarr MCP 服务器

概览

Dolibarr MCP 为 Dolibarr ERP/CRM 提供了模型上下文协议(MCP)接口。该项目结构类似于 prestashop-mcp 的项目结构:一个异步 API 客户端、一个就绪的生产环境 STDIO 服务器以及专注于文档的编写。 虽然共享相同架构,但该服务器实现了(例如search_products_by_ref、resolve_product_ref)而非单一统一的get_工具。这种设计选择确保了通过Dolibarr的SQL API实现高效的服务器端过滤,防止代理意外加载数千条记录或超出上下文限制。 Claude Desktop 及其他 MCP 支持的工具可以使用服务器管理客户、产品、发票、订单和联系人,在 Dolibarr 实例中。 请参阅捆绑文档索引,深入了解配置、API 覆盖率和贡献者工作流程。 - – 用户、客户、产品、发票、订单、联系人、项目及原始API访问的CRUD工具。

概述(AI 翻译)

Dolibarr MCP 为 Dolibarr 提供了模型上下文协议(MCP)接口 ERP/CRM。该项目与prestashop-mcp的项目结构相呼应: 一个异步API客户端、一个生产准备的STDIO服务器,并且有专注 文档。

设计说明: 虽然共享相同架构,但该服务器实现了专用搜索工具(如search_products_by_ref、resolve_product_ref),而非统一的get_工具。这一设计选择确保了通过Dolibarr的SQL API实现高效的服务器端过滤,防止代理意外加载数千条记录或超出上下文限制。

Claude Desktop 及其他支持 MCP 的工具可以利用服务器 在Dolibarr中管理客户、产品、发票、订单和联系人 实例。

请查阅捆绑的文档索引以深入了解 配置、API 覆盖率和贡献者工作流程。

✨ 特色

  • 全面ERP覆盖——用户、客户、产品、发票的CRUD工具, 订单、联系人、项目以及原始API访问。
  • 高级搜索——对产品、客户和项目进行服务器端过滤,以最小化令牌使用和成本。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 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)

# Copy the template and update credentials (file is gitignored)
cp .env.example .env

# Start the HTTP listener for MCP clients (Open WebUI, MCPO, etc.)
docker compose up -d
# or
docker build -t dolibarr-mcp .
docker run -d \
在 GitHub 查看完整 README

安装

docker run -d \
新手?先看 mcpskill.org 教程 →

配置

{ "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" } } } }