
Mcp Odoo
io.github.tuanle96由 GitHub 账号 tuanle96 发布v1.2.2更新于 Oct 25, 2026
Odoo MCP: gated writes, multi-instance. Free hosted: ERPipe (mcp.erpipe.com)
概览
本地 MCP 服务器,让 AI 助手连接 Odoo 16+ ERP 数据库,读取记录、做诊断、辅助迁移,并在审批后执行写入。
- 可以做什么
- 读取与发现 Odoo 模型、字段、记录、员工、休假、附件和服务器信息,支持服务端聚合与查询条件构建。预览、校验并执行经审批的创建、修改、删除操作,调用白名单内的模型方法,发布 chatter 消息。诊断失败的调用、访问权限和模型关系,生成 JSON-2 请求体、升级风险报告和模型改名查询。扫描本地插件源码,生成适配差距和业务包报告,并运行后台只读任务。建立本地 BM25 知识索引并检索,生成应收应付账龄和会计健康摘要。在多个已配置的 Odoo 实例之间做只读的跨库搜索与汇总。
- 适用场景
- 当助手需要真实的 Odoo 业务上下文(客户、发票、库存、会计问题)而不想手写脚本时适用,也适合需要审批环节的受控写入。同样适用于 Odoo 迁移、插件审计,以及代理机构同时查询多个客户数据库的场景。
- 运行要求
- 以 Python 包形式在本机运行(odoo-mcp,可通过 uvx、pip 或 Docker 安装),使用 stdio 或本地 HTTP。需要一个 Odoo 16+ 实例,以及环境变量 ODOO_URL、ODOO_DB、ODOO_USERNAME 和 ODOO_PASSWORD(密码或 API 密钥);Odoo 19+ 的 JSON-2 传输使用 ODOO_API_KEY。需要能访问 Odoo 服务器的网络。
安装
在 SourceWeft 中
- 打开 控制台中的 Mcp Odoo,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Odoo MCP
ERPipe is the managed Odoo MCP gateway from the maintainer of erpipe-org/mcp-odoo, formerly tuanle96/mcp-odoo; the Python project remains the self-hosted server.
The free AI layer for Odoo — any edition, any version.
Odoo's built-in AI is Enterprise-only. Odoo MCP gives Community and Enterprise 16+ the same power for $0 with the LLM you already use (Claude, GPT, Gemini, DeepSeek, Ollama).
Five-minute install. Zero Odoo-side setup. Safe writes, real diagnostics, JSON-2 ready years before the Odoo 22 XML-RPC removal.
[PyPI] [Python] [Downloads] [License] [CI] [Stars] [Forks] [Agent Skills]
🚀 ERPipe hosted — free v1 · live at erpipe.com · TypeScript open core · 🔍 Fixed-price audits
Want ChatGPT / Claude on a stable remote URL without running a process?
ERPipe is the hosted product from the same author — free v1 public beta, live in production.
Sign up → add HTTPS Odoo instance(s) → connect once tohttps://mcp.erpipe.com/mcp(workspace OAuth, multi-instance, gated writes, audit dashboard).
This repo stays the local / self-host Python server (full 41-tool surface, stdio, Docker). TypeScript building blocks:erpipe.
Odoo MCP turns any Odoo 16+ database into a Model Context Protocol server — using only your existing credentials. No App Store module, no permission setup, no admin access required. Built for local agents, IDEs, and automation tools that need real Odoo context without hand-rolled scripts or unsafe direct write access.
It speaks XML-RPC for Odoo 16-18 and External JSON-2 for Odoo 19+. It exposes a compact MCP surface with read tools, diagnostics, schema discovery, migration helpers, local addon scanning, and a gated write workflow. One server can serve multiple named Odoo instances at once.
Try it in 30 seconds
Once configured (see Setup), ask your agent things like:
"Show me all customers from Spain with unpaid invoices."
"Find products with stock below 10 units in the main warehouse."
"Audit the
custom_billingaddon for upgrade risks before we move to Odoo 19."
Highlights
Why Odoo MCP
Comparing specific projects? See the per-project breakdown in docs/comparison.md.
Setup
Two paths to a working server: set it up yourself, or paste one prompt and let your coding agent do it for you.
For humans
The fastest path is the interactive wizard via uvx, which fetches the package on demand:
The wizard asks for your Odoo URL, database, and credentials, tests the connection live, writes the config file, and prints ready-to-paste snippets for Claude Code, Cursor, and Claude Desktop. Prefer a quick smoke check instead? uvx odoo-mcp --health.
Using Claude Desktop on macOS? It reads MCP configuration from:
Use an absolute Python path because GUI apps may not inherit your shell PATH:
More client configs (Windsurf, VS Code, Zed, Continue.dev, Streamable HTTP) are in docs/client-configs.md.
Other ways to install:
Prefer a container? See Docker. For local development:
For AI agents
Paste this into Claude Code, Cursor, Codex, or any coding agent and it will install the server for you:
Already know your client? One-liners and config snippets:
- Claude Code
.mcp.jsonand Codex CLIconfig.toml:examples/README.md - Cursor
.cursor/mcp.json+ agent rules:examples/cursor/ - Windsurf, VS Code, Zed, Continue.dev, Cline, Streamable HTTP, Docker:
docs/client-configs.md - Machine-readable install guide for agents (Cline-style):
llms-install.md
Framework SDKs
Copy-paste-runnable integrations live in examples/:
Configuration reference
Set connection values in the environment:
For Odoo 19 JSON-2:
ODOO_JSON2_DATABASE_HEADER=1 sends X-Odoo-Database on JSON-2 calls. Set it to 0 only when host or dbfilter routing already selects the intended database.
Optional environment variables:
You can also use odoo_config.json:
Multiple Odoo instances
One server can talk to several Odoo databases. Add an instances map to your config file (auto-detected — a file without instances keeps the flat single-instance shape above):
- Every read/write tool accepts an optional
instanceparameter; omitted → thedefaultinstance.defaultitself is optional when only one instance is defined. - Each entry supports the same keys as the flat config (
url,db,username,password,api_key,transport,json2_database_header,lang) plustimeoutandverify_ssl. Instance entries are self-contained: credentials and transport never fall back to env vars (so one instance can never inherit another deployment'sODOO_API_KEY). Only non-credential knobs (ODOO_TIMEOUT,ODOO_VERIFY_SSL,ODOO_LOCALE) act as fallback defaults for entries that omit them. Env overrides likeODOO_TRANSPORT/ODOO_API_KEYstill apply to legacy flat configs, as before. ODOO_CONFIG_FILE=/path/to/config.jsonpoints at an explicit config file, checked before./odoo_config.json,~/.config/odoo/config.json, and~/.odoo_config.json.- Precedence: when
ODOO_URL/ODOO_DB/ODOO_USERNAME/ODOO_PASSWORDare all set, the environment wins and defines a single instance nameddefault— unset them to use a multi-instance file. - Instance names must match
[A-Za-z0-9_-]{1,64}. Clients connect lazily — an instance is only contacted when a tool targets it. - Discovery: the
list_instancestool returns configured names, URLs, databases, and transports — never credentials. - Write-approval tokens encode the instance name, so a token validated against one instance can never execute on another.
- MCP resources (
odoo://…) always use the default instance in this release; use tools for multi-instance access.
Run
Start the MCP server over stdio:
or:
Start Streamable HTTP for local clients:
Non-local HTTP binds are rejected unless you pass --allow-remote-http or set MCP_ALLOW_REMOTE_HTTP=1. This server does not include built-in HTTP authentication. Put remote HTTP deployments behind your own authentication, TLS, and network policy.
Check runtime posture without starting the server loop:
MCP Tools
41 tools grouped by use case. Each tool name is a single-purpose handle the agent can call. Tools that talk to Odoo accept an optional instance parameter when multiple instances are configured (see Multiple Odoo instances).
Read & Discover (11)
Write & Operate (5)
Diagnose (3)
Migrate (3)
Audit & Plan (3)
Knowledge search — local-first (3)
Accounting (2)
Background tasks (4)
Cross-instance fan-out — read-only (3)
One question across many configured instances, merged and attributed. See the partner playbook.
Utility (2)
Resources
Prompts
11 prompts: 5 diagnostic, plus 6 operational workflow prompts that encode end-to-end business processes and route every write through the approval gate.
Safe Write Model
Writes are intentionally boring.
preview_writecreates a canonical, non-executing payload.validate_writechecks model metadata, required fields, readonly fields, relation hints, record IDs, and payload shape.execute_approved_writeruns only when all gates pass:- the approval came from
validate_writein the same server process, - validation used trusted, non-empty live Odoo
fields_getmetadata, - the token has not expired or been consumed,
confirm=trueis passed,ODOO_MCP_ENABLE_WRITES=1is set.
- the approval came from
Odoo access rules, record rules, and server-side constraints still decide the final result.
Batch creates go through the same gates: pass values_list (one dict per
record, max 100) to preview_write/validate_write — execution maps to a
single atomic Odoo create(vals_list) call. Per-record differing write
values are deliberately unsupported (they would need one non-atomic RPC per
record). Optional extras: ODOO_MCP_ELICIT_WRITES=1 adds a native
human-confirmation form, ODOO_MCP_AUDIT_LOG records every write-path event.
Large binary fields (a resume attached to ir.attachment.datas, a product
image, ...) don't have to be inlined as base64 in the tool call — pass
<field>_from_path instead (e.g. datas_from_path: "/local/path/cv.pdf") to
validate_write. The server reads the file itself; the approval only ever
carries a sha256:<hex>:<size> fingerprint for that field, never the real
content, so nothing large has to round-trip through the calling agent's
context. Requires ODOO_MCP_ATTACHMENT_UPLOAD_ROOTS (fails closed otherwise)
and respects ODOO_MCP_MAX_ATTACHMENT_UPLOAD_BYTES. No new tool — this rides
the same preview_write → validate_write → execute_approved_write gate as
every other write.
Reviewed side-effect methods such as sale.order.action_confirm can be enabled
one by one:
ODOO_MCP_ALLOW_UNKNOWN_METHODS=1 is still supported for trusted deployments,
but health_check reports it as broad mode. Prefer exact allowlist entries when
you only need a small number of reviewed methods.
Docker
Use the prebuilt GHCR image:
Or build it locally:
Run over stdio from an MCP client (replace mcp/odoo:latest with ghcr.io/erpipe-org/mcp-odoo:latest to use the prebuilt image):
Run Streamable HTTP locally:
Test
Run the normal quality gates:
Run real Odoo smoke tests:
The smoke harness boots disposable Docker Compose stacks, validates direct Odoo access, validates MCP stdio, and for Odoo 19 also validates JSON-2 and Streamable HTTP.
Run the multi-instance smoke (one stack, three databases, two accounts on one instance):
Compatibility
XML-RPC remains the default transport for broad compatibility. Odoo 19 supports External JSON-2 through ODOO_TRANSPORT=json2. XML-RPC and JSON-RPC are deprecated since Odoo 19 and scheduled for removal in Odoo 22 (fall 2028), so new integrations should plan for JSON-2.
Documentation
Contributing
Issues, pull requests, and compatibility reports are welcome. Start with CONTRIBUTING.md, include your Odoo version, transport, client type, and the verification you ran.
Security
Do not publish logs that contain Odoo credentials, API keys, database names from private environments, or full Odoo debug traces. Report vulnerabilities through SECURITY.md.
License
MIT. See LICENSE.
来源:README.md,提交 76ec136
工具
0版本历史
1- v1.2.2最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分