コンテンツへスキップ
Odoo メニュー
  • サインイン
  • 無料で15日試す
  • アプリ
    財務
    • 会計
    • 請求
    • 経費
    • スプレッドシート(BI)
    • ドキュメント管理
    • 署名
    販売
    • CRM
    • 販売
    • POSショップ
    • POSレストラン
    • サブスクリプション
    • レンタル
    ウェブサイト
    • ウェブサイトビルダー
    • eコマース
    • ブログ
    • フォーラム
    • ライブチャット
    • eラーニング
    サプライチェーン
    • 在庫
    • 製造
    • 製品ライフサイクル管理 (PLM)
    • 購買
    • 整備
    • 品質
    人事業務
    • 従業員管理
    • 採用
    • 休暇管理
    • 人事評価
    • リファラル
    • フリート
    マーケティング
    • ソーシャルマーケティング
    • メールマーケティング
    • SMSマーケティング
    • イベント
    • マーケティングオートメーション
    • アンケート調査
    サービス
    • プロジェクト管理
    • タイムシート
    • フィールドサービス
    • ヘルプデスク
    • 計画
    • アポイントメント
    生産性向上ツール
    • ディスカッション
    • 人工知能
    • IoT
    • VoIP
    • ナレッジ
    • WhatsApp
    サードパーティアプリ Odooスタジオ Odooクラウドプラットホーム
  • インダストリー(業種別ソリューション)
    小売
    • 書店
    • アパレルショップ
    • 家具店
    • 食料品店
    • 金物店
    • 玩具店
    飲食・ホスピタリティ業界
    • バー・パブ
    • レストラン
    • ファストフード
    • ゲストハウス
    • 飲料販売代理店
    • ホテル
    不動産
    • 不動産会社
    • 建築事務所
    • 建設
    • 不動産管理
    • 造園
    • 住宅所有者組合
    コンサルティング
    • 会計事務所
    • Odooパートナー
    • マーケティングエージェンシー
    • 法律事務所
    • 人材派遣
    • 監査・認証
    製造
    • テキスタイル
    • 金属
    • 家具
    • 飲食
    • ブルワリー
    • コーポレートギフト
    ヘルス & フィットネス
    • スポーツクラブ
    • 眼鏡店
    • フィットネスセンター
    • ウェルネス専門家
    • 薬局
    • ヘアサロン
    業種
    • 便利屋
    • IT ハードウェア・サポート
    • 太陽エネルギーシステム
    • 靴メーカー
    • クリーニングサービス
    • 空調設備サービス
    その他
    • 非営利団体
    • 環境機関
    • ビルボードレンタル
    • 写真
    • 自転車リース
    • ソフトウェアリセラー
    すべての業種を見る
  • コミュニティ
    学ぶ
    • チュートリアル
    • ドキュメンテーション
    • 認定
    • トレーニング
    • ブログ
    • ポッドキャスト
    教育サポート
    • 教育プログラム
    • Scale Up! ビジネスゲーム
    • Odooオフィス訪問
    ソフトを入手
    • ダウンロード
    • エディションを比較
    • リリース
    コラボレーション
    • Github
    • フォーラム
    • イベント
    • 翻訳
    • パートナーになる
    • パートナー様向けサービス
    • 会計事務所を登録
    サービス利用
    • パートナー一覧
    • 会計事務所一覧
    • 今すぐ相談する
    • 導入支援サービス
    • お客様一覧
    • サポート
    • アップグレード
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    製品デモを利用する
  • 料金
  • ヘルプ
コミュニティで交流するには登録する必要があります。
全てのポスト 人々 バッジ
タグ (全て表示)
odoo accounting v14 pos v15
このフォーラムについて
コミュニティで交流するには登録する必要があります。
全てのポスト 人々 バッジ
タグ (全て表示)
odoo accounting v14 pos v15
このフォーラムについて
ヘルプ

How to connect Odoo to your AI using an MCP server

購読

この投稿に活動があった際に通知を受け取ります

この質問にフラグが付けられました
apijsonrpcAI19.019
2 返信
17010 ビュー
アバター
Rutger Hofste
💡

Update: the MCP connector is now available here: https://www.pantalytics.com/en/apps/odoo-mcp-server/


Screenshot:


Hi everyone,

Over the past few months I've been working on connecting Claude AI to Odoo 19 via the new JSON/2 API. Wanted to share what I learned, both about the JSON/2 API itself and about making AI assistants work well with Odoo. Hopefully useful for anyone exploring this direction. The result can be viewed here: https://www.pantalytics.com/en/apps/odoo-mcp-server/


Why the JSON/2 API matters

If you're still using XML-RPC or JSON-RPC to integrate with Odoo, it's worth knowing that Odoo 19 introduced a new JSON/2 API and that XML-RPC will be removed in Odoo 20. The new API is a big improvement:

POST /json/2/res.partner/search_read
Authorization: Bearer <api_key>
Content-Type: application/json

{
  "domain": [["is_company", "=", true]],
  "fields": ["name", "email", "phone"],
  "limit": 10
}

Key differences from XML-RPC:

  • Clean REST-style endpoints: POST /json/2/{model}/{method}
  • Bearer token auth: API key in the Authorization header instead of uid + password in every call
  • Flat JSON body: named arguments at the top level, no nested args/kwargs wrapping
  • Proper HTTP status codes: 401, 403, 404, 422 instead of everything-is-200-with-an-error-body
  • No RPC envelope: response is raw JSON
  • No custom module needed: Odoo handles ACLs server-side

A few gotchas I ran into:

  • Create and write use "vals" as the parameter name, not "values"
  • IDs are a top-level "ids" key, not part of the positional args
  • Database selection goes in the X-Odoo-Database header
  • On https://modelcontextprotocol.io) is an open standard that lets AI assistants call external tools. If you define a set of tools (search, create, update, etc.) and expose them via MCP, Claude can decide which ones to call based on a natural language question.

    For example, when you ask "Find all unpaid invoices over 5,000 EUR from Q4", the AI translates that into:

    search_records(
      model="account.move",
      domain=[["payment_state", "=", "not_paid"], ["amount_total", ">", 5000], ...],
      fields=["name", "partner_id", "amount_total", "invoice_date_due"]
    )
    

    No copy-pasting, no CSV exports -- you just ask.

    What works well (and what doesn't)

    Things that work surprisingly well:

    • Exploratory queries: "What fields does sale.order have?" -- the AI calls fields_get and summarizes the results
    • Cross-referencing: "Which sales orders from last month don't have a delivery yet?" -- multiple search calls, then comparison
    • Data entry: "Create a lead for Acme Corp, expected revenue 50k EUR" -- create_record with the right model and values

    Things to watch out for:

    • Field overload: Odoo models can have hundreds of fields. If you return all of them, the AI gets confused. I ended up building a smart field selector that ranks fields by business relevance (name, email, phone > internal IDs). That made a huge difference in response quality.
    • Domain filter syntax: The AI sometimes gets the Odoo domain syntax wrong (e.g., using "and" instead of "&"). Clear tool descriptions with examples help a lot.
    • Write operations: You probably want access control. In our setup, Odoo's own ACLs handle this -- the API key's user permissions determine what's allowed. But think about this before giving an AI write access to production.

    The open-source implementation

    We've open-sourced our implementation: odoo-mcp-pro (https://github.com/pantalytics/odoo-mcp-pro).

What it includes:

Quick start with Claude Code:

git clone https://github.com/pantalytics/odoo-mcp-pro.git
cd odoo-mcp-pro
uv venv && source .venv/bin/activate
uv pip install -e .

claude mcp add -s user \
  -e "ODOO_URL=https://your-odoo.com" \
  -e "ODOO_DB=your_database" \
  -e "ODOO_API_KEY=your_api_key" \
  -e "ODOO_API_VERSION=json2" \
  -e "ODOO_YOLO=true" \
  -- odoo python -m mcp_server_odoo

Also works with Claude Desktop, see the README for config.

For "state", "=", "sale"], ["partner_id.country_id.code", "=", "NL".

    • JSON/2 client for Odoo 19+ (also XML-RPC for Odoo 14-18)
    • 6 tools: search, get, create, update, delete, list models
    • 4 resources: URI-based access to records, search results, field definitions, counts
    • Smart field selection (the field ranking mentioned above)
    • OAuth 2.1 support for multi-user cloud deployments (via Zitadel)
    • 480+ unit tests
  • Use the API key of a user with realistic permissions. Don't use the admin key in production -- Odoo's ACLs are your safety net.
  • Test with fields_get first. It's the best way to understand what a model expects before writing to it.
  • Questions for the community

    • Has anyone else been experimenting with AI + Odoo integrations? Curious what approaches others are taking.
    • Any thoughts on which Odoo workflows benefit most from natural language access?
    • If you try odoo-mcp-pro, let me know what works and what doesn't, issues and PRs are welcome on GitHub.
  • Cheers,

    Rutger (Pantalytics.com)

3
アバター
破棄
Paul Dolphin

this is perfect timing. thank you. cant wait to see what you've put together here.


Samuel

Hey Rutger

This really looks amazing.

But for some reason it is not working for me. Not sure if im doing something wrong, but i get a 

{"error": "invalid_token", "error_description": "Authentication required"}

Error when i try to use it.

Im i right to just add the Name and MCP server in Claude?
And i just asked Claude what exactly the problem seams to be and this was his answer:
Issue: No models are enabled for MCP access — all read operations return "Access denied"

Evidence:

  • list_resource_templates returns "enabled_models": [] and "total_models": 0
  • Every search_records call returns: Access denied: Operation 'read' not allowed on model '...'
  • Tested models: project.project, project.task, crm.lead, sale.order, res.partner, account.move, hr.employee, calendar.event, res.users, x_todo

Request: Please enable at minimum read access on the following models so Claude can assist with day-to-day work:

  • project.project — Projects
  • project.task — Tasks
  • crm.lead — CRM / Leads
  • sale.order — Sales Orders
  • res.partner — Contacts
  • account.move — Invoices
  • hr.employee — Employees
  • calendar.event — Calendar


    Thanks a lot for the Help!
Rutger Hofste
著作者

Hi Samuel, thanks for trying it out! Could you check the following:

1) Is your API key still valid? (You can regenerate it in Odoo under Settings > Users > API Keys.)
2) Are you on Odoo.sh or self-hosted?
3) Does your Odoo user have admin rights?
4) can you share your odoo verison number and whether it's enterprise, community or cloud?

I'll look into the 404 response based on your setup. One tricky thing about Odoo's JSON-RPC API is that it doesn't always return a clear "access denied" error when permissions are missing. Instead, it can return a 404 or a generic error, which makes debugging harder.
The permissions tied to your API key determine what the MCP server can access, so that's likely where the issue is.
For now, I'm trying to keep the MCP server working with Odoo out of the box, without requiring extra modules. But if these permission issues keep coming up, it might be worth building a small companion module that adds dedicated API methods with better permission handling.

Onno Schuit

Great write-up, Rutger. The JSON/2 coverage alone is useful for anyone still on XML-RPC.

We went down a similar path but landed somewhere different: no MCP layer at all. The agent gets raw JSON/2 access with a broad non-superuser account, and we let it call fields_get, search_read, create, write etc. directly without any tool abstraction in between. The rationale: modern LLMs are already good at reading API conventions. Odoo's JSON/2 is clean enough that the agent figures out the domain syntax and field names on its own, especially once it's seen fields_get output for the relevant models a few times. The MCP wrapper solves a real problem, but it's also a layer you maintain yourself, and our expectation is that agents will keep getting better at working with raw APIs, so we didn't want to bet on a curated tool catalog.

The tricky part with broad access is not the reads or the internal writes. It's outbound communications. An agent that can call message_post or trigger an invoice send will eventually do so at the wrong moment, regardless of how carefully the prompt is written. Odoo's ACLs don't block those paths for a normal user account.

We ended up putting a small guardrail module in Odoo itself (strictbase_agent_guard) that blocks mail.thread.message_post, mail.compose.message, and the invoice send wizards when the context includes agent_mode=True, unless a scoped confirmation token issued by a human approver is present. The token is short-lived and tied to user, model, method, and record ids, so the agent can't reuse it. The error the agent gets back is AGENT_CONFIRMATION_REQUIRED, which it can surface to the human in the loop.

Wrote this up in more detail in a guide ("Giving Your AI Agent a Seat in Odoo" on strictbase.com). The module is open source under StrictBase/odoo-addons on GitHub.

Curious whether you ran into the outbound-communication problem with your setup, and how you're handling it.

Samuel

Hi Rutger

  1. Yes it should be, i tried it with a new one, with one that is unlimited and one that is limited.
  2. We are on Odoo.sh
  3. Yes I have full admin rights
  4. Odoo saas~19.2+e (Enterprise-Edition)

Maybe this helps:

Error executing tool search_records: Access denied: Operation 'read' not allowed on model 'project.project' request_id: req_011CZcqYRCvJA45AkJUW4XVT

You can also contact me on samuel.reutimann@webroids.com

Thanks a lot!

Rutger Hofste
著作者

Hi Samuel,

Thanks for the detailed info, really helpful for debugging!

I found what I think is the issue: your Odoo.sh instance returns a 404 on the check_access_rights endpoint via the JSON/2 API, which was causing our server to block all operations as "Access denied". We've deployed a fix for this.

Could you try:

Disconnect the Odoo MCP connector in Claude (Settings > Connectors)
Reconnect it
Try a simple query like "search res.partner"
If it still doesn't work, we can also continue this conversation offline.

Does "Server info" work for you, which version are you on?

Best regards,
Rutger

Sebastian Thalhammer

I just want to vouch for Pantalytics - I came across through Andrew from https://www.youtube.com/@odoo-it-yourself and I have been doing things with it - it is amazing. Definitely worth it. 

アバター
Rosen Vladimirov
最善の回答

Great write-up Rutger — the field overload insight is real. Odoo models exposing 200+ fields without curation is a fast path to confused AI responses.

I've been building in adjacent territory with a slightly wider scope. For anyone exploring MCP+Odoo, here's a complementary approach:

odoo-claude-mcp

  • Repo: github.com/rosenvladimirov/odoo-claude-mcp
  • Landing: rosenvladimirov.github.io/odoo-claude-mcp

Architecture differences worth knowing:

  • 8 MCP servers working together, not a single monolithic server. Core odoo-rpc-mcp has 83 native + 105 proxied tools (188 total), alongside OCA tooling, EE license checking, browser terminal with tmux, GitHub, Portainer, Teams, filesystem with per-user scoping.
  • Odoo 15 through 19 supported — including pre-JSON/2 versions via XML-RPC/JSON-RPC. Many production deployments are not on 19 yet.
  • Dual-mode deployment — runs locally (residential IP, browser-matched fingerprint) for consultant workflows, OR hosted as server-to-server endpoint at mcp.odoo-shell.space. Different profiles for different use cases.
  • Multi-tenant by design — partners rent capacity on the hosted endpoint instead of self-hosting; each customer gets isolated connections with their own API keys.
  • Qdrant + Ollama native — built-in semantic search via composite record tokenization. Useful for "find the partner I spoke to last week about X".
  • Claude.ai Connector ready — registered as native MCP URL, no intermediary.

Shared findings with you:

  • ✓ Smart field selection (you rank by business relevance; I use view-level composite tokenization — same goal, different approach)
  • ✓ Odoo ACLs as safety net
  • ✓ fields_get as first exploration step

Where we differ in philosophy:

  • I identify each tool call openly in audit logs; configurable fingerprint profile per target domain
  • I run multi-client Bulgarian l10n deployments, so tooling includes OCA/EE awareness plus NRA (Bulgarian tax authority) specifics

License: AGPL-3.

Use Rutger's odoo-mcp-pro for single-tenant Odoo 19 integration (simpler, focused). Use odoo-claude-mcp when you need multi-tenant hosting, older Odoo versions, or broader ecosystem tooling. Adjacent problems.

Happy to compare notes on field-selection heuristics — that's where this still gets tricky.

— Rosen Vladimirov, OCA l10n-bulgaria maintainer


P.S. — Full circle disclosure: this reply itself was composed and posted through odoo-claude-mcp. I authenticated against odoo.com, the quiz completion that earned my posting karma, the answer drafting, the submit — all flowed through the tooling I'm describing above. Meta but transparent.

0
アバター
破棄
アバター
Rutger Hofste
著作者 最善の回答

update: We've improved this quite a lot and there's now also a plug and play version available. https://www.pantalytics.com/en/apps/odoo-mcp-server/


0
アバター
破棄
ディスカッションを楽しんでいますか?読むだけでなく、参加しましょう!

今すぐアカウントを作成して、限定機能を利用したり、素晴らしいコミュニティと交流しましょう!

登録
関連投稿 返信 ビュー 活動
MCP
integration api jsonrpc AI 19.0 mcp claude
アバター
0
4月 26
21
How would you architect a standalone Claude/MCP connector with Odoo as one client surface? — sharing our approach
api AI 19.0 mcp claude
アバター
0
4月 26
895
How would you architect a standalone Claude/MCP connector with Odoo as one client surface? — sharing our approach
api AI 19.0 mcp claude
アバター
0
4月 26
1589
Odoo JSON-RPC API
api jsonrpc
アバター
アバター
1
2月 26
4936
What is the API endpoint for JSON-RPC?
api jsonrpc
アバター
0
10月 20
7441
コミュニティ
  • チュートリアル
  • ドキュメンテーション
  • フォーラム
オープンソース
  • ダウンロード
  • Github
  • Runbot
  • 翻訳
サービス
  • Odoo.shホスティング
  • サポート
  • アップグレード
  • カスタム開発
  • 教育
  • 会計事務所一覧
  • パートナー一覧
  • パートナーになる
企業情報
  • 会社概要
  • ブランドアセット
  • お問い合わせ
  • 採用情報
  • イベント
  • ポッドキャスト
  • ブログ
  • お客様一覧
  • リーガル情報 • プライバシーポリシー
  • セキュリティ
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk Slovenščina Español (América Latina) Español Svenska ภาษาไทย Türkçe українська Tiếng Việt

Odoo(オドゥー)は、CRM、eコマース、会計、在庫管理、POS、プロジェクト管理など、企業のさまざまな業務を一つのシステムで管理できる、ベルギー発のオープンソースのERPソフトウェアです。

高機能で使いやすく、完全に統合されたERPとして、ユニークな価値を提供しています。

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now