odoo-mcp
odoo-mcp
面向 Docker 的 FastMCP 服务器,用于 Odoo 19 JSON-2 集成。
该运行时公开了一个共享服务器工厂,可同时用于 stdio 和 HTTP 传输。Odoo 特定的工具可以通过 odoo_mcp.tools.register_tools(server, config) 或兼容的注册模块在该工厂中进行注册。
快速开始
复制环境变量模板:
cp .env.example .env使用您的 Odoo 端点和凭据编辑
.env文件。启动 HTTP 服务器:
docker compose up --build检查本地就绪状态:
docker compose exec odoo-mcp uv run --no-sync odoo-mcp healthcheck
默认的 MCP 端点为 http://localhost:8000/mcp。
Related MCP server: odoo-mcp
运行时命令
对于直接启动服务器进程的 MCP 客户端,通过 stdio 运行:
odoo-mcp stdio通过 HTTP 运行:
odoo-mcp http --host 0.0.0.0 --port 8000 --path /mcp检查已脱敏的配置,而不暴露密钥:
odoo-mcp inspect-config检查本地进程就绪状态,而不联系 Odoo:
odoo-mcp healthcheck配置
变量 | 用途 |
| Odoo JSON-2 调用的基础 URL。Odoo API 工具必需。 |
| 可选的 Odoo 数据库名称。 |
| 可选的 Odoo 用户名。 |
| 可选的 Odoo 密码。由 |
| 可选的 Odoo API 密钥。由 |
| 用于未来 HTTP 身份验证中间件的可选密钥。由 |
| HTTP 绑定主机。默认为 |
| HTTP 绑定端口。默认为 |
| HTTP 端点路径。默认为 |
| Uvicorn 日志级别。默认为 |
开发
使用 uv 安装并运行测试:
uv sync
uv run pytestCI 使用的静态检查:
uv run ruff check .
uv run mypyDocker 是目标部署路径,但单元测试不需要本地 Docker。Docker 健康检查使用 odoo-mcp healthcheck,它在不进行外部网络调用的情况下验证服务器进程的连接情况。
集成点
共享工厂为 odoo_mcp.server.build_server()。它始终注册一个本地 healthcheck 工具,然后尝试从以下位置导入工具注册:
odoo_mcp.tools.register_toolsodoo_mcp.tools.registry.register_toolsodoo_mcp.tools.odoo.register_tools
兼容的函数可以接受 (server) 或 (server, config)。这旨在让 Odoo 客户端、模式和工具工作者能够独立部署,而无需更改运行时入口点。
Available Tools
1 toolhealthcheckA
Return local server readiness metadata.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description indicates a read-only operation returning metadata, which is typical for a healthcheck. However, without annotations, the description does not explicitly confirm non-destructive behavior or other traits like rate limits or authentication needs.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence with no redundant words, efficiently conveying the tool's purpose. It earns its place without any filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (no parameters, no siblings), the description is nearly complete. The presence of an output schema reduces the need to detail return values, though 'metadata' is somewhat vague. It covers the essential purpose.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With zero parameters and 100% schema coverage, the baseline is 4. The description adds value by specifying the returned content ('readiness metadata'), which is beyond what the empty schema provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description explicitly states the tool returns 'local server readiness metadata,' using a specific verb ('return') and a clear resource. No sibling tools exist, so differentiation is not needed.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage as a health check for monitoring server readiness, but provides no explicit when-to-use or when-not-to-use guidance. The lack of siblings reduces the need for alternatives, but the description misses contextual cues like frequency or prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v0.1.0- First observed
healthcheck
TDQS
Scored across 1 tool
With only one tool, there is no possibility of confusion between tools. The purpose of 'healthcheck' is clear and distinct.
A single tool cannot be inconsistent with itself. The name 'healthcheck' is a reasonable single-word descriptor.
The server is named for Odoo, a full-featured ERP system, but provides only a single health check endpoint. This is an extreme mismatch between scope and tool count.
For an Odoo integration, a single healthcheck tool is severely incomplete, lacking any CRUD operations or domain-specific functionality.
Maintenance
Related MCP Connectors
Let AI agents query data and act across all your business apps via MCP.
Connect any AI agent to 1,000+ apps and 27,000+ actions through one remote MCP server (OAuth).
Connect AI to Odoo ERP 14-20: search, create, update and manage records in natural language.
185
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Odoo 18 (JSON-RPC API) via MCP, supporting model exploration, CRUD operations, and secure API key authentication.Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables Claude to interact with Odoo through 12 MCP tools covering discovery, CRUD operations, and bulk import/export via XML-RPC.MIT
- FlicenseNot gradedqualityCmaintenanceExposes Odoo 19 ERP as MCP tools, enabling AI agents to query and act on CRM data (leads, semantic search) via natural language without custom integration.-
- AlicenseAqualityBmaintenanceEnables interaction with Odoo 19 databases through the External JSON-2 API, allowing model operations such as search, read, create, write, and unlink via MCP tools.2MIT