Settings
Odoo AI MCP Server

Settings

Complete reference for all MCP Server configuration options in Odoo Settings

Settings Reference

All MCP Server settings live in Settings → General Settings → MCP Server and are stored as ir.config_parameter key-value pairs. Changes take effect immediately (except the gateway flag, which is cached for 5 minutes).

[!NOTE] Screenshot — Settings → MCP Server section

Place a screenshot of the General Settings page with the MCP Server configuration block expanded here. Suggested filename: settings-mcp-server-block.png


Gateway Settings

Settingir.config_parameter KeyDefaultDescription
Active AI Assistant Gatewayai_integration.enabledFalseMaster switch. When off, all /mcp requests return HTTP 503.
Enable MCP Audit Loggingai_integration.enable_loggingTrueLog every tool call to ai_connector.audit_log.
MCP Log Retention (Days)ai_integration.log_retention_days30Daily cron purges logs older than N days. Set to 0 to disable purge.
Enable MCP Rate Limitingai_integration.enable_rate_limitingFalseEnforce per-user request rate limits.
Requests per Minuteai_integration.request_limit60Max requests per user per calendar minute when rate limiting is on. 0 = unlimited.
Enable OAuth 2.1ai_integration.oauth_enabledTrueAllow OAuth-based web client connections.
Advertise OAuth Discoveryai_integration.oauth_advertise_discoveryTruePublish /.well-known/oauth-* metadata endpoints.
Access Token Lifetime (s)ai_integration.oauth_token_ttl3600OAuth access token TTL in seconds.

Resource Limits

These settings cap resource-heavy operations to protect server performance:

SettingDefaultDescription
Max Attachment Bytes5 MBMaximum size for odoo_files upload/download.
Max Report Bytes10 MBMaximum size for rendered QWeb PDF/HTML reports.
Max Export Rows5,000Maximum rows returned by odoo_transfer export.
Max Email Recipients20Maximum recipients per odoo_email send_email call.

Reading Config Parameters Programmatically

# In Odoo shell or code
env['ir.config_parameter'].sudo().get_param('ai_integration.enabled')
# → 'True' or 'False' (string)

env['ir.config_parameter'].sudo().get_param('ai_integration.request_limit', '60')
# → '60'

Gateway Cache Caveat

[!WARNING] is_gateway_active() in controllers/utils.py caches the ai_integration.enabled flag for 5 minutes. Toggling the gateway off in Settings may not immediately stop /mcp traffic — existing connections may succeed for up to 5 minutes after disable.

OAuth Settings Flow

Rendering diagram…