# altinkaya-opensource/odoo-mcp architecture

> Architecture diagram of the GitHub repository altinkaya-opensource/odoo-mcp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/altinkaya-opensource/odoo-mcp
- Repository: https://github.com/altinkaya-opensource/odoo-mcp

## Overview

mcp-server-odoo exposes Odoo ERP operations to AI assistants as MCP tools over stdio, with Odoo access over XML-RPC. The principal flow is assistant request → registered tool → input parsing/field selection where needed → XML-RPC connection → Odoo result. The graph separates read, write, discovery, aggregation, and binary-file capabilities while sharing their implementation path where appropriate. Source excerpts show server setup, connection behavior, and representative tool calls; other tool capabilities are retained from the README, so their internal call details are not inferred.

Main entry points: [`mcp_server_odoo/connection.py`](https://github.com/altinkaya-opensource/odoo-mcp/blob/16.0/mcp_server_odoo/connection.py) (XML-RPC Gateway), [`mcp_server_odoo/server.py`](https://github.com/altinkaya-opensource/odoo-mcp/blob/16.0/mcp_server_odoo/server.py) (MCP Server), [`mcp_server_odoo/tools.py`](https://github.com/altinkaya-opensource/odoo-mcp/blob/16.0/mcp_server_odoo/tools.py) (Record Reads), [`mcp_server_odoo/utils.py`](https://github.com/altinkaya-opensource/odoo-mcp/blob/16.0/mcp_server_odoo/utils.py) (Parsing and Formatting)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["MCP Runtime"]
  node_server["MCP Server<br/>[server.py]"]
  node_config["Environment Config<br/>[config.py]"]
end

subgraph group_read["Read and Discover"]
  node_read_records["Record Reads<br/>[tools.py]"]
  node_search_count["Search and Count<br/>[tools.py]"]
  node_discovery["Model Discovery<br/>[tools.py]"]
  node_aggregation["Grouped Aggregation<br/>[tools.py]"]
end

subgraph group_write["Write and Files"]
  node_writes["Record Writes<br/>[tools.py]"]
  node_business_methods["Business Methods<br/>[tools.py]"]
  node_binary_files["Binary File Export<br/>[tools.py]"]
end

subgraph group_internal["Shared Internals"]
  node_utils["Parsing and Formatting<br/>[utils.py]"]
  node_connection["XML-RPC Gateway<br/>[connection.py]"]
end

node_assistant(("AI Assistant"))
node_odoo[("Odoo Instance")]

node_assistant -->|"sends MCP requests"| node_server
node_server -->|"loads settings"| node_config
node_server -->|"connects"| node_connection
node_server -->|"registers tools"| node_read_records
node_server -->|"registers tools"| node_writes
node_read_records -->|"parses and formats"| node_utils
node_search_count -->|"parses domains"| node_utils
node_aggregation -->|"parses parameters"| node_utils
node_read_records -->|"reads records"| node_connection
node_search_count -->|"searches and counts"| node_connection
node_discovery -->|"inspects models"| node_connection
node_aggregation -->|"groups records"| node_connection
node_writes -->|"changes records"| node_connection
node_business_methods -->|"calls methods"| node_connection
node_binary_files -->|"reads field data"| node_connection
node_connection -->|"calls XML-RPC"| node_odoo

click node_server "https://github.com/altinkaya-opensource/odoo-mcp/blob/16.0/mcp_server_odoo/server.py"
click node_config "https://github.com/altinkaya-opensource/odoo-mcp/blob/16.0/mcp_server_odoo/config.py"
click node_read_records "https://github.com/altinkaya-opensource/odoo-mcp/blob/16.0/mcp_server_odoo/tools.py"
click node_search_count "https://github.com/altinkaya-opensource/odoo-mcp/blob/16.0/mcp_server_odoo/tools.py"
click node_discovery "https://github.com/altinkaya-opensource/odoo-mcp/blob/16.0/mcp_server_odoo/tools.py"
click node_aggregation "https://github.com/altinkaya-opensource/odoo-mcp/blob/16.0/mcp_server_odoo/tools.py"
click node_writes "https://github.com/altinkaya-opensource/odoo-mcp/blob/16.0/mcp_server_odoo/tools.py"
click node_business_methods "https://github.com/altinkaya-opensource/odoo-mcp/blob/16.0/mcp_server_odoo/tools.py"
click node_binary_files "https://github.com/altinkaya-opensource/odoo-mcp/blob/16.0/mcp_server_odoo/tools.py"
click node_utils "https://github.com/altinkaya-opensource/odoo-mcp/blob/16.0/mcp_server_odoo/utils.py"
click node_connection "https://github.com/altinkaya-opensource/odoo-mcp/blob/16.0/mcp_server_odoo/connection.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_server,node_config toneBlue
class node_read_records,node_search_count,node_discovery,node_aggregation,node_odoo toneAmber
class node_writes,node_business_methods,node_binary_files toneMint
class node_utils,node_connection toneRose
class node_assistant toneIndigo
```

## Components

### MCP Runtime

- [MCP Server](https://github.com/altinkaya-opensource/odoo-mcp/blob/16.0/mcp_server_odoo/server.py): `mcp_server_odoo/server.py`
- [Environment Config](https://github.com/altinkaya-opensource/odoo-mcp/blob/16.0/mcp_server_odoo/config.py): `mcp_server_odoo/config.py`

### Read and Discover

- [Record Reads](https://github.com/altinkaya-opensource/odoo-mcp/blob/16.0/mcp_server_odoo/tools.py): `mcp_server_odoo/tools.py`
- [Search and Count](https://github.com/altinkaya-opensource/odoo-mcp/blob/16.0/mcp_server_odoo/tools.py): `mcp_server_odoo/tools.py`
- [Model Discovery](https://github.com/altinkaya-opensource/odoo-mcp/blob/16.0/mcp_server_odoo/tools.py): `mcp_server_odoo/tools.py`
- [Grouped Aggregation](https://github.com/altinkaya-opensource/odoo-mcp/blob/16.0/mcp_server_odoo/tools.py): `mcp_server_odoo/tools.py`

### Write and Files

- [Record Writes](https://github.com/altinkaya-opensource/odoo-mcp/blob/16.0/mcp_server_odoo/tools.py): `mcp_server_odoo/tools.py`
- [Business Methods](https://github.com/altinkaya-opensource/odoo-mcp/blob/16.0/mcp_server_odoo/tools.py): `mcp_server_odoo/tools.py`
- [Binary File Export](https://github.com/altinkaya-opensource/odoo-mcp/blob/16.0/mcp_server_odoo/tools.py): `mcp_server_odoo/tools.py`

### Shared Internals

- [Parsing and Formatting](https://github.com/altinkaya-opensource/odoo-mcp/blob/16.0/mcp_server_odoo/utils.py): `mcp_server_odoo/utils.py`
- [XML-RPC Gateway](https://github.com/altinkaya-opensource/odoo-mcp/blob/16.0/mcp_server_odoo/connection.py): `mcp_server_odoo/connection.py`

### Other components

- **AI Assistant**
- **Odoo Instance**

## Connections

- AI Assistant → MCP Server: sends MCP requests (evidence: `README.md`)
- MCP Server → Environment Config: loads settings (evidence: `mcp_server_odoo/server.py`)
- MCP Server → XML-RPC Gateway: connects (evidence: `mcp_server_odoo/server.py`)
- MCP Server → Record Reads: registers tools (evidence: `mcp_server_odoo/server.py`)
- MCP Server → Record Writes: registers tools (evidence: `mcp_server_odoo/server.py`)
- Record Reads → Parsing and Formatting: parses and formats (evidence: `mcp_server_odoo/tools.py`)
- Search and Count → Parsing and Formatting: parses domains (evidence: `mcp_server_odoo/tools.py`)
- Grouped Aggregation → Parsing and Formatting: parses parameters (evidence: `mcp_server_odoo/tools.py`)
- Record Reads → XML-RPC Gateway: reads records (evidence: `mcp_server_odoo/tools.py`)
- Search and Count → XML-RPC Gateway: searches and counts (evidence: `mcp_server_odoo/tools.py`)
- Model Discovery → XML-RPC Gateway: inspects models (evidence: `mcp_server_odoo/tools.py`)
- Grouped Aggregation → XML-RPC Gateway: groups records (evidence: `mcp_server_odoo/tools.py`)
- Record Writes → XML-RPC Gateway: changes records (evidence: `mcp_server_odoo/tools.py`)
- Business Methods → XML-RPC Gateway: calls methods (evidence: `mcp_server_odoo/tools.py`)
- Binary File Export → XML-RPC Gateway: reads field data (evidence: `mcp_server_odoo/tools.py`)
- XML-RPC Gateway → Odoo Instance: calls XML-RPC (evidence: `README.md`)
