经 AI Skill Hub 精选评估,Odoo MCP服务器 获评「强烈推荐」。这款MCP工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 8.2 分,适合有一定技术背景的用户使用。
Odoo MCP服务器 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
Odoo MCP服务器 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/tuanle96/mcp-odoo
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"odoo-mcp---": {
"command": "npx",
"args": ["-y", "mcp-odoo"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 Odoo MCP服务器 执行以下任务... Claude: [自动调用 Odoo MCP服务器 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"odoo_mcp___": {
"command": "npx",
"args": ["-y", "mcp-odoo"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
<p align="center"> <strong>The Odoo MCP that is fluent in every Odoo version.</strong><br> Five-minute install. Zero Odoo-side setup. Safe writes, real diagnostics, JSON-2 ready years before the Odoo 22 XML-RPC removal. </p>
<p align="center"> <a href="https://pypi.org/project/odoo-mcp/"><img alt="PyPI" src="https://img.shields.io/pypi/v/odoo-mcp.svg"></a> <a href="https://pypi.org/project/odoo-mcp/"><img alt="Python" src="https://img.shields.io/pypi/pyversions/odoo-mcp.svg"></a> <a href="https://pypi.org/project/odoo-mcp/"><img alt="Downloads" src="https://img.shields.io/pypi/dm/odoo-mcp.svg"></a> <a href="./LICENSE"><img alt="License" src="https://img.shields.io/badge/license-MIT-black.svg"></a> <a href="https://github.com/tuanle96/mcp-odoo/actions/workflows/publish.yml"><img alt="CI" src="https://github.com/tuanle96/mcp-odoo/actions/workflows/publish.yml/badge.svg"></a> <a href="https://github.com/tuanle96/mcp-odoo/stargazers"><img alt="Stars" src="https://img.shields.io/github/stars/tuanle96/mcp-odoo?style=flat"></a> <a href="https://github.com/tuanle96/mcp-odoo/network/members"><img alt="Forks" src="https://img.shields.io/github/forks/tuanle96/mcp-odoo?style=flat"></a> </p>
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.
| Capability | What it gives you |
|---|---|
| 39 MCP tools | Read records and attachments, aggregate server-side, post chatter, inspect schema, build domains, scan addons, diagnose calls, access rules, resolve model renames, validate writes, and fan out across instances. |
| Field-level ACL | Opt-in per-instance, per-model field allow/deny enforced on every read path (records, aggregates, knowledge index, resources). First open-source Odoo MCP with it. See [docs/field-acl.md](docs/field-acl.md). |
| Cross-instance queries | Read-only fan-out across many client DBs with merged, attributed, partial-failure-tolerant results — no warehouse, no sync. See [docs/partner-playbook.md](docs/partner-playbook.md). |
| Workflow prompts | 10 prompts including 5 end-to-end business workflows (invoice approval, PO match, onboarding, expense review, month-end close) that route writes through the gate. |
| Background tasks | submit_async_task runs long read operations (addon scans, knowledge indexing, AR/AP aging) on a bounded worker pool; poll with get_async_task while the agent keeps reasoning. |
| Local-first knowledge search | index_knowledge + search_knowledge give BM25 relevance ranking over a bounded record slice — accent-insensitive, in-process, no embeddings service, no data leaving the machine. |
| Accounting pack | receivable_payable_aging and accounting_health_summary answer the most common finance questions in one call instead of hand-built domains. |
| Rate limiting | Opt-in sliding-window budget per instance and tool (ODOO_MCP_RATE_LIMIT_MODE=warn\|block), surfaced in health_check. |
| Multi-instance | One server, several named Odoo instances — optional instance parameter on every tool, list_instances discovery, instance-bound approval tokens, per-instance schema caches. |
| 5 agent prompts | Reusable workflows for failed calls, fit/gap workshops, JSON-2 migration, safe writes, and module audits. |
| Odoo 16-19 coverage | XML-RPC by default, JSON-2 opt-in for Odoo 19. |
| Streamable HTTP | Local HTTP/SSE support for clients that do not use stdio. |
| Smart field selection | search_records and read_record curate business-relevant fields when no fields argument is supplied — drops audit, message, binary, and unstored compute noise. Pass fields=["*"] to opt out. |
| Server-side aggregation | aggregate_records pushes groupby/sum/count/avg into Postgres via formatted_read_group (Odoo 19+) or read_group (16-18). |
| Chatter integration | chatter_post adds messages to any mail.thread record under the same approval-token gate as writes — or directly via MCP_CHATTER_DIRECT=1. |
| Locale plumbing | ODOO_LOCALE injects context.lang automatically on every Odoo call (caller can override). |
| Structured logging | JSON formatter and rotating file handler via ODOO_MCP_LOG_LEVEL, ODOO_MCP_LOG_JSON, ODOO_MCP_LOG_FILE. |
| Safe writes | Direct create, write, and unlink are blocked; approved writes require live metadata, a same-session token, explicit confirmation, and an env gate. |
| Human-in-the-loop approval | ODOO_MCP_ELICIT_WRITES=1 shows a native MCP confirmation form (with a diff summary) before any approved write executes — token flow stays as fallback. |
| Audit trail | ODOO_MCP_AUDIT_LOG appends one JSONL line per write-path event (preview, validate, execute, chatter) with instance and token digest. |
| Resilience | Read-only calls retry connection errors with exponential backoff; schema caches are TTL- and LRU-bounded; health_check flags N+1 read loops. |
| Real smoke tests | Docker Compose validation boots disposable Odoo 16.0, 17.0, 18.0, and 19.0 stacks, including restricted users, custom record rules, and packaged addon XML install/update. |
Two paths to a working server: set it up yourself, or paste one prompt and let your coding agent do it for you.
Prefer a container? See [Docker](#docker). For local development:
bash git clone https://github.com/tuanle96/mcp-odoo.git cd mcp-odoo uv sync --extra dev ```
Use the prebuilt GHCR image:
docker pull ghcr.io/tuanle96/mcp-odoo:latest
Or build it locally:
docker build -t mcp/odoo:latest -f Dockerfile .
Run over stdio from an MCP client (replace mcp/odoo:latest with ghcr.io/tuanle96/mcp-odoo:latest to use the prebuilt image):
{
"mcpServers": {
"odoo": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e", "ODOO_URL",
"-e", "ODOO_DB",
"-e", "ODOO_USERNAME",
"-e", "ODOO_PASSWORD",
"-e", "ODOO_TRANSPORT",
"-e", "ODOO_API_KEY",
"mcp/odoo:latest"
]
}
}
}
Run Streamable HTTP locally:
docker run --rm \
-p 127.0.0.1:8000:8000 \
-e ODOO_URL \
-e ODOO_DB \
-e ODOO_USERNAME \
-e ODOO_PASSWORD \
-e ODOO_TRANSPORT \
-e ODOO_API_KEY \
mcp/odoo:latest \
--transport streamable-http \
--host 0.0.0.0 \
--port 8000 \
--allow-remote-http
Set connection values in the environment:
export ODOO_URL="https://your-odoo-instance.com"
export ODOO_DB="your-database"
export ODOO_USERNAME="your-user"
export ODOO_PASSWORD="your-password-or-api-key"
export ODOO_TRANSPORT="xmlrpc"
For Odoo 19 JSON-2:
export ODOO_TRANSPORT="json2"
export ODOO_API_KEY="your-odoo-api-key"
export ODOO_JSON2_DATABASE_HEADER="1"
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:
| Variable | Default | Effect |
|---|---|---|
ODOO_CONFIG_FILE | unset | Explicit path to a config file, checked before the standard locations. |
ODOO_LOCALE | unset | Inject context.lang on every Odoo call. Caller-supplied context.lang always wins. |
ODOO_MCP_MAX_SMART_FIELDS | 15 | Cap for smart-field selection when caller omits fields. |
ODOO_MCP_LOG_LEVEL | INFO | Process logger level (DEBUG/INFO/WARNING/ERROR/CRITICAL). |
ODOO_MCP_LOG_JSON | 0 | Truthy → emit JSON-formatted log lines. |
ODOO_MCP_LOG_FILE | unset | Path → enable rotating file handler (10MB × 3 backups). |
ODOO_MCP_ENABLE_WRITES | 0 | Required for execute_approved_write. |
ODOO_MCP_ALLOWED_SIDE_EFFECT_METHODS | empty | Exact model.method allowlist (e.g. sale.order.action_confirm). |
ODOO_MCP_POLICY_FILE | ./odoo_mcp_policy.json if present | Version-controllable side-effect allowlist with review metadata (see odoo_mcp_policy.json.example); merged with the env allowlist. |
ODOO_MCP_ALLOW_UNKNOWN_METHODS | 0 | Broad mode for execute_method. Prefer the exact allowlist above. |
ODOO_MCP_AUDIT_LOG | unset | Path → append one JSONL line per write-path event (preview/validate/execute/chatter), tokens stored as digests. |
ODOO_MCP_ELICIT_WRITES | 0 | Truthy → execute_approved_write asks the human via MCP elicitation (native confirm form with a diff summary) before executing; falls back to the token flow when the client cannot elicit. |
ODOO_MCP_RETRY_ATTEMPTS | 2 | Extra attempts for read-only calls on connection errors (0–5). Writes never retry. |
ODOO_MCP_RETRY_BACKOFF | 0.5 | Base retry backoff seconds; doubles per retry. |
ODOO_MCP_SCHEMA_CACHE_TTL | 600 | Schema cache entry lifetime in seconds. |
ODOO_MCP_SCHEMA_CACHE_MAX | 256 | Max schema cache entries (LRU eviction). |
ODOO_MCP_RATE_LIMIT_MODE | off | warn tracks per-instance:tool call rates in health_check; block refuses over-budget calls on the hot read tools and execute_method. |
ODOO_MCP_RATE_LIMIT_WINDOW | 60 | Sliding window length in seconds for rate tracking. |
ODOO_MCP_RATE_LIMIT_MAX_CALLS | 120 | Calls allowed per window per instance:tool. |
ODOO_MCP_ASYNC_MAX_WORKERS | 2 | Worker threads for submit_async_task. |
ODOO_MCP_ASYNC_MAX_TASKS | 50 | Max retained background tasks (finished tasks evicted oldest-first). |
ODOO_MCP_ASYNC_RESULT_TTL | 3600 | Seconds a finished background task result stays pollable. |
ODOO_MCP_KNOWLEDGE_MAX_DOCS | 5000 | Total documents allowed across all local BM25 knowledge indexes. |
ODOO_MCP_FIELD_POLICY_FILE | shared policy file | Field ACL policy (a field_acl key in the policy file, or a dedicated file here). Denied fields are removed from every read path. See [docs/field-acl.md](docs/field-acl.md). |
ODOO_MCP_CROSS_INSTANCE_WORKERS | 4 | Bounded concurrency for cross-instance fan-out tools. |
MCP_CHATTER_DIRECT | 0 | Truthy → chatter_post skips the approval token gate and posts immediately. |
MCP_ALLOW_REMOTE_HTTP | 0 | Truthy → permit non-local HTTP binds (still requires external auth/TLS). |
MCP_ALLOWED_HOSTS / MCP_ALLOWED_ORIGINS | local | CSV allowlists for HTTP transports. |
ODOO_MCP_MAX_ATTACHMENT_BYTES | 1048576 | Download cap for read_attachment content (hard cap 16 MiB). |
ODOO_MCP_AUTH_ISSUER_URL | unset | OAuth 2.1: authorization server issuer. With the two vars below, the HTTP transport becomes a protected resource server (RFC 9728 metadata + bearer validation). |
ODOO_MCP_AUTH_INTROSPECTION_URL | unset | RFC 7662 token introspection endpoint of the authorization server. |
ODOO_MCP_AUTH_RESOURCE_URL | unset | Canonical URL of this MCP server (RFC 8707 audience check when the AS binds tokens). |
ODOO_MCP_AUTH_REQUIRED_SCOPES | empty | CSV scopes required on every request. |
ODOO_MCP_AUTH_CLIENT_ID / _CLIENT_SECRET | unset | Credentials for the introspection call when the AS requires client auth. |
You can also use odoo_config.json:
{
"url": "https://your-odoo-instance.com",
"db": "your-database",
"username": "your-user",
"password": "your-password-or-api-key"
}
高质量MCP集成工具,填补AI与Odoo连接空白。架构清晰,维护活跃,是企业系统AI化的重要基础设施。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
AI Skill Hub 点评:Odoo MCP服务器 的核心功能完整,质量优秀。对于Claude Desktop / Claude Code 用户来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | mcp-odoo |
| 原始描述 | 开源MCP工具:MCP Server for Odoo。⭐320 · Python |
| Topics | OdooERPMCP服务器业务自动化系统集成 |
| GitHub | https://github.com/tuanle96/mcp-odoo |
| License | MIT |
| 语言 | Python |
收录时间:2026-05-21 · 更新时间:2026-05-30 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端