AM

alanogic/mcp-odoo-adv

开发工具

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

10 stars 4 forks 质量 73 趋势 16NOASSERTION

Enhanced Odoo MCP server (STDIO, SSE, Streamable HTTP)

概览

An advanced MCP (Model Context Protocol) server for Odoo ERP — STDIO, SSE, and Streamable HTTP transports — that gives Claude, Cursor, ChatGPT-via-MCP and other AI hosts direct access to your Odoo data and workflows. read AGENTS.md for the tool-first quick reference. Connect AI assistants to Odoo with plus a self-improving knowledge base: 1. — call any Odoo method on any model 2. — execute multiple operations atomically (with @N result references) 3. — document hard-won recipes after ≥4 failed attempts Plus 11 discovery resources, 3 prompts, and an odoo://cookbook/patterns resource that surfaces past lessons. No specialized tools, no validation layer, no artificial limits — full Odoo API. Everything you need, just ask AI: automate, query, manage, customize, develop new modules, integrate with external systems, enhance your Odoo instance through AI.

README

以下为原文 README 节选,完整内容请查看原文。

Odoo MCP Server Advanced

Two universal tools. A growing cookbook. Full Odoo API access for AI assistants.

An advanced MCP (Model Context Protocol) server for Odoo ERP — STDIO, SSE, and Streamable HTTP transports — that gives Claude, Cursor, ChatGPT-via-MCP and other AI hosts direct access to your Odoo data and workflows.

AI assistants: read AGENTS.md for the tool-first quick reference.


🎯 Philosophy: Simplicity & Power

Connect AI assistants to Odoo with two universal tools plus a self-improving knowledge base:

  1. execute_method — call any Odoo method on any model
  2. batch_execute — execute multiple operations atomically (with @N result references)
  3. add_cookbook_pattern — document hard-won recipes after ≥4 failed attempts

Plus 11 discovery resources, 3 prompts, and an odoo://cookbook/patterns resource that surfaces past lessons. No specialized tools, no validation layer, no artificial limits — full Odoo API.

To rule them all. What You Can Do

Everything you need, just ask AI: automate, query, manage, customize, develop new modules, integrate with external systems, enhance your Odoo instance through AI.


🚀 Quick Start

Installation

Option 1: Traditional pip install

# From source
git clone https://github.com/AlanOgic/mcp-odoo-adv.git
cd mcp-odoo-adv
# Virtual Environment
python3 -m venv .venv
source .venv/bin/activate
# Installation
pip install -e .

Option 2: Using uvx (No Installation)

# From source directory
uvx --from . odoo-mcp

Option 3: Using Docker

# build STDIO
docker build -t alanogic/mcp-odoo-adv:latest -f Dockerfile .

# build SSE
docker build -t alanogic/mcp-odoo-adv-sse:latest -f Dockerfile.sse .

# build HTTP
docker build -t alanogic/mcp-odoo-adv-http:latest -f Dockerfile.http .

# Run STDIO
docker run --env-file .env alanogic/mcp-odoo-adv:latest

# Run SSE
docker run --env-file .env alanogic/mcp-odoo-adv-sse:latest

# Run HTTP
docker run --env-file .env alanogic/mcp-odoo-adv-http:latest

Configuration

Create a .env file (minimum):

cp .env.example .env
vim .env
ODOO_URL=https://your-odoo-instance.com
ODOO_DB=your-database-name
ODOO_USERNAME=your-username
ODOO_PASSWORD=your-password-or-api-key

Optional: Custom Configuration Directory

Organize multiple Odoo configurations by setting a custom directory:

# Create custom config directory
export ODOO_CONFIG_DIR=~/mcp-odoo-env
mkdir -p $ODOO_CONFIG_DIR

# Copy and configure
cp .env.example $ODOO_CONFIG_DIR/.env
vim $ODOO_CONFIG_DIR/.env

# Run server (automatically uses custom directory)
odoo-mcp

This is useful for:

  • Managing multiple Odoo instances (dev, staging, production)
  • Organizing configs outside project directory
  • Docker/Compose deployments with volume mounts

Run Server

After pip install -e ., four console scripts are wired up:

# STDIO (Claude Desktop, Claude Code, Cursor)
在 GitHub 查看完整 README

安装

uvx --from odoo-mcp odoo-mcp
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "odoo": { "command": "python", "args": ["-m", "odoo_mcp"], "env": { "ODOO_URL": "https://your-instance.odoo.com", "ODOO_DB": "your-database", "ODOO_USERNAME": "your-username", "ODOO_PASSWORD": "your-password" } } } }