Odoo MCP Gateway MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
pip install odoo-mcp-gateway
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "ODOO_DB=${ODOO_DB}" odoo-mcp-gateway -- node "<FULL_PATH_TO_ODOO_MCP_GATEWAY>/dist/index.js"

Replace <FULL_PATH_TO_ODOO_MCP_GATEWAY>/dist/index.js with the actual folder you prepared in step 1.

Required:ODOO_DB+ 5 optional
README.md

Security-first MCP gateway for Odoo 17/18/19

odoo-mcp-gateway

Security-first, version-agnostic MCP gateway for Odoo 17/18/19. Works with stock and custom modules via YAML configuration. Zero Odoo-side code required.

Why This Exists

Existing Odoo MCP servers share common problems: hardcoded model lists that miss custom modules, security as an afterthought, mandatory custom Odoo addons, and single-version targets. This gateway solves all of them:

  • Two-layer security — MCP restrictions (YAML) + Odoo's built-in ACLs (ir.model.access + ir.rule)
  • YAML-driven configuration — model restrictions, RBAC, field-level access, rate limiting, audit logging
  • Custom module support — auto-discovers models via ir.model, add YAML config and it works
  • Version-agnostic — Odoo 17, 18, 19 with version-specific adapters
  • Zero Odoo-side codepip install + YAML config = done. No custom addon required
  • Full MCP primitives — 27 Tools + 5 Resources + 7 Prompts (most servers only implement Tools)
  • Plugin architecture — extend with pip-installable domain packs via entry_points

Architecture

MCP Client (Claude Desktop / Claude Code / HTTP)
    |  User calls login tool with Odoo credentials
    v
MCP Server (FastMCP)
    |
    |-- security_gate()    --> Rate limit + RBAC tool access + audit logging
    |-- restrictions       --> Model/method/field block lists (YAML + hardcoded)
    |-- rbac               --> Field-level filtering + write sanitization
    |
    |-- tools/             --> 27 MCP tools (auth + schema + CRUD + plugins)
    |-- resources/         --> 5 MCP resources (odoo:// URIs)
    |-- prompts/           --> 7 reusable prompt templates
    |-- plugins/           --> Entry-point plugin system (HR, Sales, Project, Helpdesk)
    |
    |  JSON-RPC / XML-RPC as authenticated user
    v
Odoo 17/18/19 (security enforced per user via ir.model.access + ir.rule)

Security Pipeline

Every tool and resource call passes through this pipeline:

Request --> Rate Limit --> Authentication Check --> RBAC Tool Access
    --> Model Restriction --> Method Restriction --> Field Validation
    --> Handler Execution --> RBAC Field Filtering --> Audit Log --> Response

Hardcoded safety guardrails that cannot be overridden by YAML:

  • 18 always-blocked models (ir.config_parameter, ir.cron, ir.module.module, ir.rule, ir.mail_server, etc.)
  • 18 always-blocked methods (sudo, with_user, with_env, _sql, _write, _create, etc.)
  • 28 ORM methods blocked in execute_method (prevents bypassing field-level checks)

Quick Start

pip install odoo-mcp-gateway

# Copy and edit config files
cp config/restrictions.yaml.example config/restrictions.yaml
cp config/model_access.yaml.example config/model_access.yaml
cp config/rbac.yaml.example config/rbac.yaml

# Set environment variables
export ODOO_URL=http://localhost:8069
export ODOO_DB=mydb

# Run (stdio mode for Claude Desktop / Claude Code)
python -m odoo_mcp_gateway

# Or HTTP mode for web clients
MCP_TRANSPORT=streamable-http python -m odoo_mcp_gateway

Claude Desktop Configuration

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "odoo": {
      "command": "python",
      "args": ["-m", "odoo_mcp_gateway"],
      "env": {
        "ODOO_URL": "http://localhost:8069",
        "ODOO_DB": "mydb"
      }
    }
  }
}

Claude Code Configuration

# Add as MCP server
claude mcp add odoo -- python -m odoo_mcp_gateway

Environment Variables

Variable Default Description
ODOO_URL http://localhost:8069 Odoo server URL
ODOO_DB (required) Odoo database name
MCP_TRANSPORT stdio Transport mode (stdio or streamable-http)
MCP_HOST 127.0.0.1 HTTP host (streamable-http mode)
MCP_PORT 8080 HTTP port (streamable-http mode)
MCP_LOG_LEVEL INFO Logging level

Security

Two-Layer Security Model

  1. MCP gateway restrictions (YAML config + hardcoded guardrails) — blocks sensitive models, dangerous methods, privileged fields before any Odoo call is made
  2. Odoo's built-in ACLs — enforces per-user access on actual records via ir.model.access and ir.rule

Model Restriction Tiers

Tier Effect Example
always_blocked Nobody can access, including admins ir.config_parameter, res.users.apikeys
admin_only Only admin users ir.model, ir.model.fields
admin_write_only Read OK for all, write needs admin res.company, res.currency

Hardcoded Safety Guardrails

These cannot be overridden by YAML conf

Tools (1)

loginAuthenticate with the Odoo server

Environment Variables

ODOO_URLOdoo server URL
ODOO_DBrequiredOdoo database name
MCP_TRANSPORTTransport mode (stdio or streamable-http)
MCP_HOSTHTTP host (streamable-http mode)
MCP_PORTHTTP port (streamable-http mode)
MCP_LOG_LEVELLogging level

Configuration

claude_desktop_config.json
{"mcpServers": {"odoo": {"command": "python", "args": ["-m", "odoo_mcp_gateway"], "env": {"ODOO_URL": "http://localhost:8069", "ODOO_DB": "mydb"}}}}

Try it

List all open sales orders in the CRM for the current month.
Create a new task in the Project module assigned to the development team.
Search for the customer record associated with email address contact@example.com.
Update the status of the inventory item with SKU 12345 to 'out of stock'.

Frequently Asked Questions

What are the key features of Odoo MCP Gateway?

Two-layer security using YAML-based restrictions and Odoo's native ACLs. Zero Odoo-side code required for installation. Support for Odoo 17, 18, and 19 with version-specific adapters. Plugin architecture for extending functionality via pip-installable domain packs. Comprehensive audit logging and rate limiting for all tool calls.

What can I use Odoo MCP Gateway for?

Automating CRM data entry and retrieval for sales teams. Managing project tasks and resource allocation directly from Claude. Querying inventory levels and product information for support staff. Enforcing strict field-level access controls on sensitive business data.

How do I install Odoo MCP Gateway?

Install Odoo MCP Gateway by running: pip install odoo-mcp-gateway

What MCP clients work with Odoo MCP Gateway?

Odoo MCP Gateway works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Odoo MCP Gateway docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare