Odoo

io.github.Helios-One-Oy由 GitHub 账号 Helios-One-Oy 发布v0.1.0更新于 Oct 29, 2026

Odoo orders, late lines, supplier promise dates, manufacturing and stock. Read-only by default.

已验证STDIO仅桌面数据与分析商业与电商

概览

AI 生成的概览

本地 MCP 服务器,让助手读取 Odoo 的销售、采购、制造与库存数据,并可选地修改采购订单行的承诺日期。

可以做什么
  • 列出未完成的销售订单与采购订单,可包含报价单和询价单
  • 查看单个订单的行、数量与调拨,并找出逾期未交付的销售行或采购行及逾期天数
  • 查看供应商承诺到货日期、制造订单、工序单与收发货
  • 按名称、邮箱、编号或税号查找客户与供应商
  • 查询产品的在手、预测、入库与出库数量
  • 在启用写入后,可更新某条采购订单行的预计到货日期
适用场景
适合让助手回答 Odoo 中的运营问题,例如哪些采购行逾期、某张销售订单进展如何、某产品还有多少库存,同时不必授予其完整的 ERP 权限。
运行要求
通过 npx 以 stdio 在本地运行,需要 Node.js 20 或更高版本。需要 Odoo 基础地址(ODOO_URL)、数据库名(ODOO_DB)和登录名(ODOO_USERNAME),以及 Odoo API 密钥(ODOO_API_KEY)或用户密码(ODOO_PASSWORD)之一。该 Odoo 用户须被允许使用外部 API,服务器还需能通过网络访问该 Odoo 实例。
安装前请注意
Odoo 凭据会保存在客户端配置中,建议使用 ODOO_API_KEY 而非 ODOO_PASSWORD。服务器以所配置用户的 Odoo 权限行事,应使用权限最小的专用用户。除非 ODOO_MCP_ENABLE_WRITES 为 true,否则写入关闭;写入工具每次调用还需精确的确认文本,会修改采购订单行的计划日期。仅在自建 Odoo Community 17 至 19 上测试过,未测试 Odoo Online、Odoo.sh 或企业版。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Odoo,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Odoo MCP server

An MCP server that lets an AI assistant (Claude Desktop, Claude Code, or any MCP client) read your Odoo sales, purchasing, manufacturing and stock data, and, only if you turn it on, update a purchase order line's promise date.

  • 12 read tools and 1 write tool (listed below).
  • Read-only by default. The write tool needs ODOO_MCP_ENABLE_WRITES=true on the server and an exact confirmation text on every call.
  • Talks to Odoo's external JSON-RPC API (/jsonrpc) as the user you configure. Odoo's access rights apply.
  • Runs locally over stdio. No telemetry; it connects only to your Odoo.

Built by Helios One. MIT license.

Quickstart (2 minutes)

You need Node.js 20 or newer and an Odoo user that can log in to the external API.

1. Get an API key in Odoo (recommended over a password): click your avatar, then My Profile / Preferences, open Account Security, click New API Key. Copy the key.

2. Add the server to your MCP client.

Claude Code:

sh
claude mcp add odoo \  -e ODOO_URL=https://odoo.example.com \  -e ODOO_DB=mydb \  -e [email protected] \  -e ODOO_API_KEY=your-api-key \  -- npx -y @heliosone/odoo-mcp

Claude Desktop: open Settings > Developer > Edit Config and add this to claude_desktop_config.json, then restart Claude Desktop:

json
{  "mcpServers": {    "odoo": {      "command": "npx",      "args": ["-y", "@heliosone/odoo-mcp"],      "env": {        "ODOO_URL": "https://odoo.example.com",        "ODOO_DB": "mydb",        "ODOO_USERNAME": "[email protected]",        "ODOO_API_KEY": "your-api-key"      }    }  }}

3. Ask, for example: "Which purchase order lines are late, and by how many days?" or "What is the status of S00042?"

Settings

VariableRequiredMeaning
ODOO_URLyesBase URL of your Odoo, e.g. https://odoo.example.com
ODOO_DByesDatabase name
ODOO_USERNAMEyesThe user's login
ODOO_API_KEYone of these twoAPI key of that user (used in place of the password)
ODOO_PASSWORDThe user's password
ODOO_MCP_ENABLE_WRITESnotrue allows the write tool. Anything else keeps the server read-only.
ODOO_TIMEOUT_MSnoRequest timeout, default 30000

The server starts even when settings are missing, so your client can list the tools. Each call then returns CONFIGURATION_ERROR with the names of the missing settings.

Tools

ToolWhat it returns
list_open_sales_ordersConfirmed sales orders not fully delivered (includeQuotations adds quotations)
list_open_purchase_ordersConfirmed purchase orders not fully received (includeRfqs adds RFQs)
get_order_statusOne sales or purchase order with lines (ordered / delivered or received / invoiced) and its transfers. By id, number or customer/vendor reference.
list_supplier_promise_datesOpen lines on confirmed POs with the vendor's expected arrival date, soonest first
list_late_purchase_linesPO lines past their expected arrival and not fully received, with days_late
list_late_sales_linesSales lines past their promised date and not fully delivered, with days_late. Promised date = the order's commitment date, else order date + the line's lead time.
list_manufacturing_ordersManufacturing orders with state, quantity, planned dates, component availability
list_work_ordersWork orders: operation, work center, state, expected and actual duration
list_shipmentsReceipts, deliveries or internal transfers; lateOnly for those past their scheduled date
lookup_customerContacts by name, email, reference or VAT, customers first
lookup_supplierContacts by name, email, reference or VAT, suppliers first
get_inventory_on_handProduct quantities: on hand, forecast, incoming, outgoing
update_po_line_promise_dateWrite. Sets one PO line's expected arrival date. See below.

List tools take limit (default 50, max 500) and offset. Results are Odoo's own field values, plus a few computed fields (qty_open, days_late, promised_date). Fields that do not exist in your Odoo version are left out.

The write tool

update_po_line_promise_date changes date_planned on one purchase order line (for example after a vendor confirms a new date). It runs only when both are true:

  1. the server was started with ODOO_MCP_ENABLE_WRITES=true, and
  2. the call includes "confirmation": "CONFIRM update_po_line_promise_date".

Otherwise it returns WRITES_DISABLED or CONFIRMATION_REQUIRED and does not call Odoo. A date without a time is stored as 12:00 UTC so it shows as the same day in most time zones. The result shows the value before and after.

What has been tested

Tested on 24 October 2026, with the packed npm tarball installed into an empty project and its odoo-mcp command driven over stdio by the official MCP TypeScript SDK client, against fresh self-hosted Odoo Community 17.0, 18.0 and 19.0 (built from the official odoo/odoo branches; Sales, Purchase, Inventory and Manufacturing installed; fictional records). In each version:

  • all 13 tools were listed and all 12 read tools returned the seeded records (21 tool calls and 25 checks per version, all passed);
  • the write tool was refused with writes off (WRITES_DISABLED), refused without the confirmation text (CONFIRMATION_REQUIRED), then succeeded, and a direct Odoo read confirmed the new date;
  • the server logged in with an Odoo API key; one session used the plain password instead, and a wrong password returned AUTH_FAILED;
  • one call also went through the MCP Inspector CLI.

Logs: proof/. Unit tests (npm test, against an in-memory fake Odoo) pass on Node.js 20 and 25.

Not tested: Odoo Online (odoo.com hosting) and Odoo.sh, Odoo Enterprise, Odoo versions before 17, multi-company setups, and large databases. Odoo Online offers the external API only on some plans. Odoo 19 deprecated /jsonrpc (removal planned for Odoo 22, fall 2028, and Odoo Online 21.1, winter 2027) in favour of its JSON-2 API; this server does not use JSON-2 yet. Odoo 19 logs a deprecation warning for each /jsonrpc call.

Development

sh
npm cinpm test

proof/run-live.sh 18.0 repeats the live test in a disposable Linux machine (it installs PostgreSQL and Odoo; do not run it on your workstation).

Security

See SECURITY.md. Use a dedicated Odoo user with only the rights the assistant needs.

License

MIT, see LICENSE.

来源:README.md,提交 f12961c

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.0最新Oct 29, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分