odoo-mcp
Gives an LLM agent read and write access to partners, sales orders, stock levels, and invoices in an Odoo instance.
README
odoo-mcp
An MCP server for Odoo. It gives an LLM agent read and write access to partners, sales orders, stock levels and invoices in an Odoo instance.
All six tools work against the Odoo in docker compose: answers are capped, every call
has a deadline, ODOO_READONLY=true leaves the write tools unpublished, and the server
talks either over stdio or over http. What is missing is listed at the bottom.
Why
Odoo is a full ERP with a wide API, which makes it hard for an agent to use. Its
external API is XML-RPC with generic search_read and execute_kw calls, so the agent
would need to know model names, field names and domain syntax. This server exposes a
small number of named tools instead, each one covering a task a person would actually
ask for.
Odoo Community runs in Docker with demo data, so the whole thing can be tried without any real system.
Tools
| Tool | What it does |
|---|---|
search_partners |
find customers and suppliers |
get_sales_order |
read an order with its lines and status |
create_sales_order |
create a quotation for a customer |
confirm_sales_order |
turn a quotation into a confirmed order |
get_stock |
current quantity on hand for a product |
list_invoices |
invoices for a partner, filtered by state |
Quick start
make up # Odoo Community with demo data, waits until it answers
make seed # one customer, one product, a known quantity of it
make demo # the whole path, printed as it happens
The first make up takes a couple of minutes: Odoo builds its database and loads the
demo data. Everything after that is seconds.
To run the server itself rather than the demo:
make run # over stdio, the way a desktop client starts it
docker compose up -d mcp # over http, then curl localhost:8080/health
Port 8080 is a busy one. If something else on the machine already holds it, set
MCP_HOST_PORT to anything free and compose will use that on the host side.
Demo
make demo starts the server as its own process, talks to it over stdio exactly as an
MCP client does, and walks the path a salesperson walks. Every line below came back over
the protocol:
Connected. Tools on offer: confirm_sales_order, create_sales_order, get_sales_order, get_stock, list_invoices, search_partners
1. Who is MCP Demo Customer?
MCP Demo Customer, Vienna, id 44
2. What is on the shelf for MCP-DESK?
[MCP-DESK] MCP Demo Desk: 42 on hand, 42 free, in YourCompany
3. Order 2 of them.
S00095 for MCP Demo Customer: quotation, 1147.7 USD
4. Confirm it.
S00095 is now confirmed
5. Read it back, lines and all.
2 x [MCP-DESK] MCP Demo Desk = 998
6. And what a refusal sounds like.
Error executing tool confirm_sales_order: Order S00095 is confirmed. Only a quotation can be confirmed.
The order number climbs with every run, the rest stays put: that is what make seed is
for, and running it twice changes nothing.
How it works
The server connects to Odoo over XML-RPC. Each tool builds the domain and the field list itself, so the agent never sees Odoo internals. Results are trimmed to the fields that matter and returned as flat records.
Design decisions
Named tools, not a generic query tool. A single run_query tool would be easier to
write and much worse to use. Named tools carry their own validation and make it obvious
what the agent is allowed to do.
Read and write are separated. The two write tools are marked destructive in their MCP annotations and the four read tools are marked read-only, so a client can ask its user before an order is created or confirmed.
Arguments are checked before Odoo is called. Odoo takes an order line of zero quantity without a word, and answers an unknown id with its own record ids in the text. Both are caught here, so a refusal says what to do instead of what broke inside the ERP.
A cut answer says it was cut. No call hands back more than 200 records. When more
matched, the answer carries truncated: true and a hint on how to narrow the request,
because twenty results out of thirty-eight look exactly like all of them otherwise.
Read-only mode removes the write tools rather than blocking them. With
ODOO_READONLY=true they are never published, so a client sees four tools and a call by
name comes back as an unknown tool.
Errors are translated. Odoo raises faults with long tracebacks. The server extracts the message and returns it in a form the agent can act on.
Health says nothing about Odoo. /health answers for the process alone. The compose
healthcheck watches it, and an Odoo that is briefly away must not get a working server
restarted underneath it. Whether Odoo answers is visible on the first tool call.
What is not here yet
- paging through a cut answer: a tool says there is more, but there is no way to ask for the next page yet, only a narrower question
- multi-company support: a company is pinned with
ODOO_COMPANY_IDSand every answer names its own, which is not the same as running across several of them - cancelling an order, and editing one that already exists:
action_cancelover XML-RPC returns a dialog to open and leaves the order as it was - creating a partner, so an agent can sell to someone who is not in the database yet
- authentication on the http transport: it is meant for a private network, not the open one
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。