v0.4.0 — Multi-instance support
Multi-instance support 🎉
One MCP server can now talk to multiple named Odoo instances. This was the top community ask on the v0.4 roadmap (#21).
Added
- Multi-instance config — add an
instancesmap plus adefaultkey to your config file; every Odoo-facing tool accepts an optionalinstanceparameter (omitted → default instance). Clients connect lazily per instance. See Multiple Odoo instances andodoo_config.multi.json.example. list_instancestool — reports configured instance names, URLs, databases, and transports without ever exposing credentials.ODOO_CONFIG_FILEenv var — explicit config file path checked before the standard locations.- Per-instance
timeoutandverify_sslconfig keys;health_checknow reportsinstance_count/default_instance. - Two entries may point at the same
url+dbwith different credentials to expose two accounts on one instance.
Security
- Instance-bound approval tokens — write and chatter approval tokens encode the target instance; a token validated against one instance can never verify or execute against another.
execute_approved_writeexecutes on the instance recorded in the approval only. - Schema caches are partitioned per instance — field metadata from one database is never served for another.
- Instance entries never inherit
ODOO_API_KEY(or any credential) from the environment. execute_approved_writeno longer echoesexpected_tokenon mismatch (token-minting oracle removed).
Compatibility
- No breaking changes. Legacy env vars and flat
odoo_config.jsonkeep working unchanged and still take precedence (a warning is printed ifODOO_CONFIG_FILEis set but ignored). - Tool count is now 25. MCP resources (
odoo://…) use the default instance in this release.
Verified
- 412 unit tests, mypy clean.
- New live smoke
scripts/odoo_multi_instance_smoke.py: real Odoo 18 on Docker Compose — three databases at once, two accounts on one instance, per-instance writes, concurrent reads with isolation, and cross-instance token-replay rejection. Passed 100%.
Full changelog: CHANGELOG.md