Skip to content

v0.4.0 — Multi-instance support

Choose a tag to compare

@tuanle96 tuanle96 released this 10 Jun 05:02
· 39 commits to main since this release

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 instances map plus a default key to your config file; every Odoo-facing tool accepts an optional instance parameter (omitted → default instance). Clients connect lazily per instance. See Multiple Odoo instances and odoo_config.multi.json.example.
  • list_instances tool — reports configured instance names, URLs, databases, and transports without ever exposing credentials.
  • ODOO_CONFIG_FILE env var — explicit config file path checked before the standard locations.
  • Per-instance timeout and verify_ssl config keys; health_check now reports instance_count / default_instance.
  • Two entries may point at the same url+db with 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_write executes 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_write no longer echoes expected_token on mismatch (token-minting oracle removed).

Compatibility

  • No breaking changes. Legacy env vars and flat odoo_config.json keep working unchanged and still take precedence (a warning is printed if ODOO_CONFIG_FILE is 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