AO

alanogic/odoo-mcp-19

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

11 stars 6 forks Качество 82 Тренд 28MIT

MCP Server for Odoo 19+ with v2 JSON-2 API Support

Обзор

Ask Claude to read and write your Odoo 19 data in plain language — and stop it from doing the dangerous parts by accident. This server connects any Model Context Protocol (MCP) client to Odoo 19+ over the v2 JSON-2 API. An assistant discovers your models by reading schemas rather than guessing field names, then calls any ORM method through one tool. Before anything destructive runs, a safety layer classifies the operation and holds it behind a single-use confirmation token. - and want an assistant that queries and updates it directly, instead of copying data between a chat window and the ERP. - Posting a journal entry or validating a picking is irreversible. Every such call is gated, and eight security-critical models refuse writes outright. - Compact schemas, batched model bundles, and one-call session bootstrap keep discovery cheap on long conversations. If you only need read-only reporting, this still works — set a readonly role and the safety layer blocks every non-safe method.

README

Показан фрагмент оригинального README. Открыть оригинал.

   ____      __               __  _____________     _______
  / __ \____/ /___  ____     /  |/  / ____/ __ \   <  / __ \  __
 / / / / __  / __ \/ __ \   / /|_/ / /   / /_/ /   / / /_/ /_/ /_
/ /_/ / /_/ / /_/ / /_/ /  / /  / / /___/ ____/   / /\__, /_  __/
\____/\__,_/\____/\____/  /_/  /_/\____/_/       /_//____/ /_/

Ask Claude to read and write your Odoo 19 data in plain language — and stop it from doing the dangerous parts by accident.

This server connects any Model Context Protocol (MCP) client to Odoo 19+ over the v2 JSON-2 API. An assistant discovers your models by reading schemas rather than guessing field names, then calls any ORM method through one tool. Before anything destructive runs, a safety layer classifies the operation and holds it behind a single-use confirmation token.

# The assistant reads the schema first, then queries — no guessed field names
read_resource("odoo://model/sale.order/quick-schema")
execute_method("sale.order", "search_read",
    kwargs_json='{"domain": [["state", "=", "sale"]], "fields": ["name", "amount_total"], "limit": 10}')

Who this is for

  • You run Odoo 19+ and want an assistant that queries and updates it directly, instead of copying data between a chat window and the ERP.
  • You need writes to be safe. Posting a journal entry or validating a picking is irreversible. Every such call is gated, and eight security-critical models refuse writes outright.
  • You care about token cost. Compact schemas, batched model bundles, and one-call session bootstrap keep discovery cheap on long conversations.

If you only need read-only reporting, this still works — set a readonly role and the safety layer blocks every non-safe method.

What you get

3 tools execute_method reaches any method on any model; batch_execute and read_resource cover the rest
38 resources Model discovery, compact schemas, state-machine workflows, introspection, API reference (odoo://api/*), and runtime posture (odoo://server-status)
12 prompts Generic guided workflows (aging reports, inventory checks, domain building, pagination, …)
Safety layer Risk classification before execution, 8 blocked models, 6 sensitive models, cascade warnings
Locked mode One flag (MCP_SAFETY_MODE=locked) turns writes off, enforces a write allowlist, binds HTTP to localhost, and pre-flights payloads against live fields_get — each layer independently overridable
Multi-user mode Per-user bearer keys and personal Odoo clients, so every write is attributed to a real person
Reference data 30 documented ORM methods, 13 modules with special-method knowledge, including the Enterprise AI module

Built on FastMCP 4 (>=4.1.5,<5): one deployment speaks both MCP 2026-07-28 (sessionless — any replica behind a plain load balancer can answer) and MCP 2025-11-25

Открыть полный README на GitHub

Установка

docker run --rm -i -e ODOO_URL=https://your-instance.odoo.com -e ODOO_DB=your-database -e ODOO_USERNAME=your-username -e ODOO_API_KEY=your-api-key odoo-mcp-19:latest
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "odoo19-mcp": { "command": "/path/to/odoo-mcp-19/run-docker.sh" } } }