Production Security and Operations
Harden the public MCP endpoint, manage network and rate controls, use Redis where needed, and follow a safe rollout and upgrade process.
The module provides layered controls, but production safety depends on disciplined Odoo users, correct proxy configuration, narrow bundles, credential lifecycle management, and audit review.
Warning: Do not make an Odoo administrator the default AI identity An administrator can access far more Odoo data than most AI workflows require. Use dedicated internal users with normal company and app restrictions.
Production checklist
- Use a valid HTTPS certificate and one canonical public origin.
- Use OAuth or OAuth + Scoped API Keys.
- Use bundle enforcement and explicit exact-model allowlists.
- Start every new workflow read-only.
- Block sensitive fields and unnecessary export, chatter, write, and delete tools.
- Apply forced domains for company, business unit, warehouse, state, owner, or date boundaries where appropriate.
- Set conservative global and per-model record ceilings.
- Restrict browser origins to the clients actually used.
- Use per-key IP allowlists for stable automations.
- Keep audit logging enabled and review denials and mutations.
- Back up and test module upgrades on staging.
Network controls
Allowed Browser Origins protects browser-based Streamable HTTP access. API keys also support exact IP addresses and CIDR allow or deny rules. Deny rules take precedence. Forwarded client IP headers are trusted only through loopback or private reverse proxies.
Rate limits and cache
Global rate limiting is disabled by default because clients can make discovery bursts. Enable it after measuring real setup and usage. A key-specific limit overrides the global behavior for that key. Response caching is optional and applies only to governed read behavior.
Shared Redis
Enable Redis for multi-worker or multi-server deployments that need shared cache entries, sliding request limits, and failed-authentication protection. Install the redis Python package, use redis:// or rediss://, test the connection from Settings, and keep credentials out of logs and documentation.
Deliberate safety boundaries
- No arbitrary SQL supplied by clients.
- No arbitrary Python execution.
- No arbitrary JavaScript or HTML in dashboard specifications.
- No generic unrestricted Odoo method calls in the normal production tool surface.
- No exposure of Odoo security metadata, configuration internals, module management internals, or MCP credential records through generic model tools.
Upgrade routine
- Back up the database and module directory.
- Replace the module code and restart Odoo.
- Upgrade niyu_mcp_server on staging.
- Review the canonical public URL, auth mode, data-access mode, bundles, model governance, and keys.
- Reconnect clients or refresh tool definitions.
- Test identity, read, analytics, export, and each permitted mutation.
- Review Connections, Audit Logs, and Async Jobs before production rollout.
Dashboards, Prompt Templates, and Safe Module Builder
Use the advanced governed features without allowing arbitrary SQL, Python, JavaScript, or source-code execution.
Troubleshooting and FAQ
Resolve endpoint, OAuth, tool-discovery, permission, CORS, key, export, and multi-database problems and answer common customer questions.
