Enhanced Odoo MCP server (STDIO, SSE, Streamable HTTP)
Configuration
View docs{
"mcpServers": {
"alanogic-mcp-odoo-adv": {
"command": "python",
"args": [
"-m",
"odoo_mcp"
],
"env": {
"ODOO_DB": "your-database-name",
"ODOO_URL": "https://your-odoo-instance.com",
"ODOO_PASSWORD": "your-password",
"ODOO_USERNAME": "your-username"
}
}
}
}You have an MCP server that lets you control an Odoo instance through two universal tools: execute_method to call any Odoo method on any model, and batch_execute to run multiple operations atomically. This design gives you full API access with a simple, predictable interface, enabling AI assistants and integrations to automate, query, and customize your Odoo data and workflows with confidence.
Connect your MCP client to the Odoo MCP server using one of the available transports. You can run the server locally in STDIO mode for direct interaction with Claude Desktop, or you can use uvx to run a no-install variant, or deploy via Docker. The two core tools youβll use are execute_method and batch_execute. Use execute_method to call any model method with precise arguments. Use batch_execute to group multiple operations into a single, atomic transaction where either all succeed or all fail.
Practical usage patterns include: querying records with filters and specific fields, creating or updating records, and performing business workflows that involve several steps. When you need to perform multiple actions that must succeed together, wrap them in a single batch_execute call with atomic set to true. This ensures data integrity across related operations.
Prerequisites you need installed on your system:
- Python 3.10β3.13 or a compatible Python runtime
- Optional: Docker if you prefer container deployment
Choose one of the installation options below and follow the steps to get the MCP server running.
Option 1: Traditional pip install (from source)
# 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-mcpOption 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:latestCreate a minimal environment file with your Odoo connection details. This config is used by the server to connect to your Odoo instance. You can extend it to organize multiple configurations in a dedicated directory if you manage dev, staging, and production instances.
# Minimal environment file example
ODOO_URL=https://your-odoo-instance.com
ODOO_DB=your-database-name
ODOO_USERNAME=your-username
ODOO_PASSWORD=your-password-or-api-keyStart the server using one of the available transports. Each transport serves different clients and use cases.
# STDIO ( Claude Desktop )
python run_server.py
# SSE (Web browsers)
python run_server_sse.py
# HTTP (API integrations)
python run_server_http.pyConfigure Claude Desktop to connect to the Odoo MCP server. You can either use a local Python run command or a no-install option via uvx.
{
"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"
}
}
}
}Create credentials in a secure location and point Claude Desktop to the uvx-based MCP server. This approach keeps credentials out of the main config and uses the latest published version.
# Credentials location
mkdir -p ~/.config/odoo
cat > ~/.config/odoo/.env << 'EOF'
ODOO_URL=https://your-instance.odoo.com
ODOO_DB=your-database
ODOO_USERNAME=your-username
ODOO_PASSWORD=your-password
EOF{
"mcpServers": {
"odoo": {
"command": "uvx",
"args": ["--from", "odoo-mcp", "odoo-mcp"]
}
}
}If you prefer containers, you can run each transport with its respective image and port mappings.
# STDIO transport (Claude Desktop)
docker run -i --rm --env-file .env alanogic/mcp-odoo-adv:latest
# SSE transport (Web browsers)
docker run -p 8009:8009 --env-file .env alanogic/mcp-odoo-adv:sse
# HTTP transport (API integrations)
docker run -p 8008:8008 --env-file .env alanogic/mcp-odoo-adv:http- The two core tools give you universal access to Odoo. Use them to automate, query, and extend your Odoo instance with AI-powered workflows.
- If you encounter authentication issues, ensure your Odoo API credentials are valid and that the API version you use is supported by your Odoo server.
- For production deployments, consider using the HTTPS transport with proper SSL configuration and a stable environment for credentials.
- Find customers with specific criteria using the execute_method tool.
- Create records and relate them to existing documents in a single atomic transaction with batch_execute.
- Use strong credentials for Odoo access and prefer token-based authentication where available.
- Limit the scope of what the MCP server can do by applying appropriate access rights on the Odoo side and by using atomics for critical multi-step operations.
Call any Odoo method on any model with specified positional and keyword arguments, enabling full API access.
Execute multiple operations atomically in a single transaction, ensuring all succeed or all fail.