Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration Guide

This guide covers the runtime configuration surface for odoo-rust-mcp.

Instance Configuration

Create instances.json:

{
  "production": {
    "url": "https://prod.example.com",
    "db": "production",
    "apiKey": "prod_api_key_here",
    "tags": ["prod", "finance"]
  },
  "staging": {
    "url": "https://staging.example.com",
    "db": "staging",
    "apiKey": "staging_api_key_here"
  },
  "local": {
    "url": "http://localhost:8069",
    "db": "localdb",
    "version": "18",
    "username": "admin",
    "password": "admin"
  }
}

Instance Fields

FieldRequiredDefaultDescription
urlYes-Odoo server URL
dbOdoo 18 and earlier-Database name
apiKeyOdoo 19+-API key for JSON-2 authentication
versionNo-Odoo version
usernameOdoo 18 and earlier-Username for JSON-RPC auth
passwordOdoo 18 and earlier-Password for JSON-RPC auth
protocolNoautoauto, jsonrpc, or json2
tagsNo[]Manual labels used by the Config UI
readOnlyNofalseWhen true, deny mutating/cleanup/execute tools for this instance even if write env is set. Edit via JSON; Config UI preserves the field on save.
toolConfig.disabledToolsNo[]Per-instance tool denylist
toolConfig.executeAllowlistNo[]Required for odoo_execute: [{ "model": "...", "methods": ["..."] }]. Empty denies all execute calls.
timeout_msNo30000Request timeout in milliseconds
max_retriesNo2Maximum retry attempts

Protocol Selection

By default, the server auto-detects the protocol based on available credentials:

ConditionProtocol Used
apiKey presentJSON-2 API (Odoo 19+)
username + password + version presentJSON-RPC (Odoo 18 and earlier)

You can override this with the protocol field when needed.

Single Instance (Legacy)

For simple setups, use environment variables instead of instances.json:

ODOO_URL=https://your-odoo.com
ODOO_DB=mydb
ODOO_API_KEY=your-key

Environment Variables

Core Configuration

VariableDefaultDescription
ODOO_INSTANCES_JSON-Path to instances.json
ODOO_INSTANCES-Inline JSON snapshot
ODOO_URL-Single-instance URL fallback
ODOO_DB-Database name
ODOO_API_KEY-API key for Odoo 19+
ODOO_VERSION-Odoo version
ODOO_USERNAME-Username for Odoo 18 and earlier
ODOO_PASSWORD-Password for Odoo 18 and earlier

Feature Toggles

VariableDefaultDescription
ODOO_ENABLE_WRITE_TOOLSfalseEnable create, update, delete, workflow, copy tools
ODOO_ENABLE_EXECUTE_TOOLfalseEnable odoo_execute (still requires a non-empty per-instance executeAllowlist)
ODOO_ENABLE_CLEANUP_TOOLSfalseEnable cleanup tools only when ODOO_ENABLE_WRITE_TOOLS is also true; cleanup defaults to dry-run
ODOO_CAPABILITY_CONTROLLED_MODEfalseHide/reject generic mutations and expose only odoo_execute_capability
ODOO_CAPABILITY_REGISTRYRequired in controlled mode: normalized odoo-agent registry JSON
ODOO_CAPABILITY_APPROVAL_HMAC_KEYRequired in controlled mode: approval-envelope HMAC key of at least 32 bytes
ODOO_CAPABILITY_STATE_DIRRequired in controlled mode: persistent 0700 idempotency-state directory
ODOO_TIMEOUT_MS30000Request timeout in milliseconds
ODOO_MAX_RETRIES2Retry attempts
ODOO_MODULE_SNAPSHOT_TTL_SECS300Installed-module snapshot TTL; 0 refreshes every instance-scoped list

MCP Configuration

VariableDefaultDescription
MCP_TOOLS_JSONAutoPath to tools.json
MCP_PROMPTS_JSONAutoPath to prompts.json
MCP_SERVER_JSONAutoPath to server.json

Authentication (HTTP Transport)

VariableDefaultDescription
MCP_AUTH_ENABLEDfalseEnable bearer-token auth for MCP HTTP
MCP_AUTH_TOKEN-Auth token
MCP_ALLOWED_ORIGINS-Allowed CORS origins

Config UI

VariableDefaultDescription
ODOO_CONFIG_SERVER_PORT3008Config UI port
ODOO_CONFIG_DIR~/.config/odoo-rust-mcpConfig directory path
CONFIG_UI_USERNAMEadminLogin username
CONFIG_UI_PASSWORDchangemeLogin password

Logging

VariableDefaultDescription
RUST_LOGinfoLog level

Transport Modes

stdio

odoo-rust-mcp --transport stdio
  • used by local AI clients
  • Config UI still runs on port 3008

HTTP

odoo-rust-mcp --transport http --listen 127.0.0.1:8787
  • MCP endpoint: POST /mcp
  • health endpoint: GET /health
  • optional bearer-token auth

WebSocket

odoo-rust-mcp --transport ws --listen 127.0.0.1:8787

Config UI

Access the visual configuration interface at http://localhost:3008.

Main Areas

AreaPurpose
OverviewRuntime summary and posture checks
InstancesAdd, edit, test, import, and export Odoo connections
ToolsEnable or disable tool groups and individual tools
PromptsEdit prompt content and descriptions
ServerEdit server name, instructions, protocol version
SecurityChange Config UI password and manage MCP HTTP auth
DocumentationOpen the built-in docs in a separate tab

First-time Setup

  1. Open http://localhost:3008
  2. Sign in with admin / changeme
  3. Go to Security and change the default password
  4. Configure instances in Instances
  5. Optionally enable MCP HTTP auth in Security
  6. Use the Documentation sidebar entry when you want the built-in docs in a new tab

Hot Reload

Changes made through the Config UI or by directly editing JSON config files take effect immediately.


Configuration File Locations

User Config (Runtime)

PlatformDirectory
Linux/macOS~/.config/odoo-rust-mcp/
Windows%APPDATA%\\odoo-rust-mcp\\ or user-specified

Files: instances.json, tools.json, prompts.json, server.json, env

System Config (Service Installs)

PlatformDirectory
Linux (systemd)/etc/odoo-rust-mcp/
Linux (deb)/usr/share/odoo-rust-mcp/
Windows%ProgramData%\\odoo-rust-mcp\\

Config Resolution Order

  1. Explicit environment variable path
  2. User config directory
  3. Embedded defaults

Deployment Notes

MethodBest For
Binary + stdioLocal development and single AI client use
Binary + HTTPRemote access and multiple users
DockerQuick isolated deployment
Docker ComposeMulti-service setups
Kubernetes / HelmProduction deployments
systemd / Windows ServiceBackground service installs

See Deployment Guide for full setup detail.