mcp-dolibarr
🚀 mcp-dolibarr
FastMCPベースの高性能・高セキュリティなMCP(Model Context Protocol)サーバーです。あらゆるAIアシスタント(Claude Desktop、Cursor、AIエージェント)が、公式REST APIを介してDolibarr ERP/CRMとネイティブに連携できるようにします。
✨ 主な機能
このMCPサーバーは、12モジュールに分散された30以上の専用ツールを通じて、Dolibarr上の企業管理のあらゆるニーズをカバーします:
🏢 取引先・会社(
tools/thirdparties.py): 一覧表示、名前による全文検索、IDによる詳細照会、顧客・見込み客レコードの作成および部分更新。👤 連絡先・担当者(
tools/contacts.py): 会社に紐づく連絡先(個人)の一覧表示と作成。📦 製品・サービス(
tools/products.py): 品目とサービスの完全なカタログ、参照番号による検索、作成、更新、税抜価格・消費税率の管理。📄 見積・商談提案(
tools/proposals.py): 複数行の見積書の作成、承認、行の更新・削除、自動変換。🛒 顧客注文(
tools/orders.py): 承認済み見積書からの注文生成、注文明細の参照・詳細修正。💳 請求書・支払い(
tools/invoices.py): 注文または直接からの請求書作成、最終承認、請求書明細行の管理。📊 倉庫別在庫(
tools/stocks.py): 倉庫ごとの製品の実在庫レベルを即時参照。📁 プロジェクト(
tools/projects.py): プロジェクトの作成、参照、および顧客レコードへの関連付け。📜 契約(
tools/contracts.py): サービス契約の追跡と、取引先向けの契約作成。🛠️ 作業報告書(
tools/interventions.py): 現場での技術介入票の管理。📑 ドキュメント・PDF(
tools/documents.py): 公式PDF(Azur、Crabeなどのテンプレート)の自動生成と、Base64エンコードでのダウンロード。🔌 直接REST API(フォールバックモード)(
tools/raw.py):call_dolibarr_apiツールにより、専用ツールでカバーされていないDolibarrの任意のRESTルートを直接照会できます。
Related MCP server: MCP Server for Odoo
🌟 他のMCPサーバーと比べてmcp-dolibarrが提供する付加価値
基本的なMCPゲートウェイや汎用ゲートウェイとは異なり、このサーバーは決定的な付加価値をもたらします:
🔄 1回の呼び出しによる複雑なオーケストレーション(
convert_proposal_to_invoice): AIに4回の連続リクエストを強いる代わりに、オーケストレーターツールが、検証済み見積 → 顧客注文 → 請求書 → 請求書の検証 を自動的に連鎖させます。✏️ 明細行の細粒度操作(追加/更新/削除): 見積、注文、請求書の明細行単位の管理を完全サポート(品目の追加、数量・ラベル・明細の変更、行の削除)。
🛡️ ネイティブなセキュリティ/読み取り専用モード(
READ_ONLY=true): 機密性の高い本番環境向けにサーバーを閲覧専用に制限可能。すべての書き込みリクエスト(POST、PUT、DELETE)はソースレベルで傍受され拒否されます。🔁 レジリエンスと指数バックオフ(HTTP 429): Dolibarrのレート制限をインテリジェントに処理: 過負荷時には自動的に再試行し(1秒、2秒、4秒)、AIエージェントを失敗させません。
🛡️ LLM向けに最適化されたクリーンアップとフォーマット:
Dolibarrからの生のJSONレスポンス(多くの場合50以上の内部フィールドを含む)をクリーンアップし、明確で読みやすいテキストに要約します。
事前の厳格な検証(メールアドレス、正の金額、必須フィールド)により、Dolibarrへの不正なリクエスト送信を防止します。
📄 実際のPDFファイルの生成と抽出: 規制要件を満たすPDFの生成を指示し、AIエージェントが使用できるようにBase64エンコードされたコンテンツを取得できます。
🌐 ネイティブなマルチトランスポート対応(
stdio、http、sse、streamable-http): ローカルコンピューター(Claude Desktop、Cursor)だけでなく、クラウドサーバー上のマイクロサービスとしても動作します。
🏃 MCPサーバーの起動と実行方法(Run)
1. ローカル環境の準備
# 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 .env.envファイルで、Dolibarrインスタンスへのアクセスを設定します:
DOLIBARR_URL=http://localhost:8080/api/index.php
DOLIBARR_API_KEY=votre_cle_api_dolibarr
MCP_TRANSPORT=stdio
LOG_LEVEL=INFO
READ_ONLY=false2. MCPサーバーの起動
A. ローカルモード stdio (Claude Desktop / Cursor / VS Code)
以下のコマンドで簡単に起動できます:
python server.pyClaude Desktopに接続するには、claude_desktop_config.jsonファイルに次の設定を追加します:
{
"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. リモートサーバーモード(Streamable HTTP)
HTTP経由でMCPサーバーを公開する場合(リモートサーバーやクラウドコンテナなど):
MCP_TRANSPORT=http MCP_PORT=8000 python server.pyサーバーは http://0.0.0.0:8000 でアクセス可能になります。
3. Dockerでの実行
Docker Composeを使用する場合(推奨)
docker-compose up -d --buildDocker CLIを使用する場合
docker build -t mcp-dolibarr .
docker run -d -p 8000:8000 --env-file .env mcp-dolibarr🧪 単体テストの実行
単体テストスイートは、pytestとrespxを使用してクライアントとツールの動作を検証します(実際のネットワーク呼び出しはありません):
pytest📁 プロジェクト構造
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