Skip to content

feat: opt-in Odoo Enterprise build with the MCP server - #11

Open
holmboe wants to merge 2 commits into
mainfrom
odoo-20-mcp
Open

holmboe wants to merge 2 commits into
mainfrom
odoo-20-mcp

Conversation

@holmboe

@holmboe holmboe commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Odoo 20's MCP server (ai_mcp, /mcp) is Enterprise only, and noodle builds Community. This adds an opt-in Enterprise build and documents how to connect Claude Code.

  • make up ENTERPRISE=<dir of Enterprise modules> passes the directory to docker build as the named build context enterprise (copied to /mnt/enterprise-addons, never into the repo) and installs ai_mcp on top of ODOO_MODULES. It's remembered in .k8s/enterprise like VERSION. Without it the image is Community as before.
  • New mcp seed step: a fixed admin MCP key odoo-supersecr3tmcpkeyfordevelop1 and dynamic client registration turned on. It skips when ai_mcp isn't installed.
  • When ai_mcp is installed, the banner prints the connect commands:
    claude mcp add --transport http odoo http://odoo.localhost/mcp
    claude mcp add --transport http odoo http://odoo.localhost/mcp \
      --header "Authorization: Bearer odoo-supersecr3tmcpkeyfordevelop1"
    Odoo has no pre-registered OAuth clients (unlike Authelia in dynatron), so there is no --client-id or --callback-port.
  • tests/k8s/test_mcp.py checks the OAuth metadata, MCP tools with the MCP key, and that the rpc key is rejected. It's skipped unless ai_mcp is installed.
  • Docs: an MCP section in docs/odoo-setup.md, plus README and AGENTS.md.

Not tested against Enterprise

We have no Enterprise access, so this follows Odoo's published description of ai_mcp. seed_mcp.py detects the MCP key scope (a scope containing mcp) and the dynamic client registration setting (a settings field named like dynamic_client_registration/dcr), and logs a warning when it finds none. Fix both on the first Enterprise run.

Test plan

  • pre-commit run --all-files, make validate
  • A test build with a stub Enterprise directory: modules land in /mnt/enterprise-addons and ai_mcp is added to ODOO_MODULES (only once, even though common.sh is sourced twice)
  • make reset && make up VERSION=20 (Community): starts, the mcp step skips, and make seed STEPS=apikeys,mcp twice changes nothing the second time
  • make test-k8s: 21 passed, 3 skipped (the MCP tests)
  • First Enterprise run: verify the assumptions in seed_mcp.py and run test_mcp.py

🤖 Generated with Claude Code

holmboe and others added 2 commits October 14, 2026 00:24
`make up ENTERPRISE=<dir>` adds a directory of Odoo Enterprise modules to the
image as a named build context and installs ai_mcp, Odoo 20's MCP server. The
new mcp seed step adds a fixed admin key with the MCP scope and enables dynamic
client registration, so Claude Code can connect without a pre-registered
client. Without ENTERPRISE the image stays Community and the step skips.

Not tested against Enterprise yet: the MCP scope and the registration setting
are detected by name, and tests/k8s/test_mcp.py only runs with ai_mcp.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

[Medium impact] Adds optional Enterprise build path with MCP server support.

Fix the Enterprise path handling before merging so valid checkout directories containing spaces can build.

Findings

  1. P1 Spaces break Enterprise builds ▶

Summary

Adds an opt-in Enterprise image with ai_mcp, a separate development MCP key, connection instructions, and Enterprise-only smoke tests.

  • Enterprise builds can install Odoo’s MCP module without changing Community builds.
  • Odoo seeds an MCP key and prints Claude Code connection commands.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[make up] --> B{ENTERPRISE provided?}
  B -->|No| C[Community image]
  B -->|Yes| D[Copy Enterprise modules into image]
  D --> E[Append ai_mcp to ODOO_MODULES]
  C --> F[Initialize database and run seeds]
  E --> F
  F --> G{ai_mcp installed?}
  G -->|No| H[Skip MCP seed]
  G -->|Yes| I[Find MCP scope and registration setting]
  I --> J[Seed MCP key and enable registration]
  J --> K[Print Claude Code connection commands]
Loading

Reviews (1) · Last reviewed commit: "docs: document connecting Claude Code to..." · Reviewed by Greptile

Comment thread Makefile
fi
@args=$$(scripts/build-args.sh $(VERSION)) && \
if [ -n "$(ENTERPRISE)" ]; then \
args="$$args --build-context enterprise=$(ENTERPRISE) --build-arg NOODLE_ENTERPRISE_MODULES=$(ENTERPRISE_MODULES)"; \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Spaces break Enterprise builds

A valid checkout such as ENTERPRISE="/home/user/Enterprise modules" passes the directory check, but docker build $$args splits the path into separate arguments. Docker receives enterprise=/home/user/Enterprise plus modules, so the build fails.

Pass the build context as a separately quoted argument. Also preserve the path when writing .k8s/enterprise; $(abspath $(ENTERPRISE)) treats spaces as separators too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant