Enables seamless interaction with Odoo instances through the MCP protocol
Panda Odoo MCP Server
Developed by
This module was developed by Paolo Nugnes and TechLab.
TechLab is a company specialized in custom software development and enterprise system integration. Visit our website www.techlab.it for more information about our services.
Overview
The Odoo MCP Server is a standardized interface for interacting with Odoo instances through the MCP (Model Context Protocol). It provides support for:
Communication Protocols:
- stdio: Direct communication via stdin/stdout
- streamable_http: HTTP communication with streaming response support
Resource Management:
- Odoo records (single and list)
- Binary fields
- Real-time updates
Tools:
- Search and read records
- Create and update records
- Delete records
- Call custom methods
Security:
- Authentication and session management
- Rate limiting
- CORS for streamable_http connections
System Requirements
Hardware Requirements
- CPU: 2+ cores
- RAM: 4GB minimum (8GB recommended)
- Disk Space: 1GB minimum
Software Requirements
- Python 3.9+
- Odoo 15.0+
- Required modules: base, web, bus
- Database configured with admin user
- Docker (optional)
Network Requirements
- Port 8069 (Odoo)
- Port 8080 (streamable_http, optional)
- Port 5432 (PostgreSQL, if local)
Security Requirements
- SSL certificate for HTTPS (production)
- Configured firewall
- VPN access (optional)
Installation
Direct Installation
# Clone the repository
git clone https://github.com/pandeussilvae/mcp-odoo-panda.git
cd mcp-odoo-panda
# Install dependencies
pip install .
# To install with caching support
pip install .[caching]
# To install with development tools
pip install .[dev]
# Copy the example configuration file
cp odoo_mcp/config/config.example.json odoo_mcp/config/config.json
# Edit config.json with your settings
# nano odoo_mcp/config/config.json
Docker Installation
# Clone the repository
git clone https://github.com/pandeussilvae/mcp-odoo-panda.git
cd mcp-odoo-panda
# Start with Docker Compose
docker-compose up -d
Configuration
The server can be configured through a JSON file. Several configuration templates are available:
config.example.json: Main template to copy and modifyconfig.dev.json: Development environment template (optional)config.prod.json: Production environment template (optional)
To get started:
# Copy the example configuration file
cp odoo_mcp/config/config.example.json odoo_mcp/config/config.json
# Edit config.json with your settings
# nano odoo_mcp/config/config.json
Selecting the Connection Type
The Odoo MCP server supports several connection types, configurable via the connection_type field in config.json. Supported values:
stdio: Default, direct communication via stdin/stdoutstreamable_http: HTTP with streaming/chunked responses (real-time data flows)http: Classic HTTP POST (stateless, single request/response)
Example configuration:
{
"connection_type": "streamable_http", // or "http" or "stdio"
"http": {
"host": "0.0.0.0",
"port": 8080
}
}
- Use
streamable_httpfor real-time streaming over HTTP (endpoint:POST /mcp) - Use
httpfor classic REST requests (endpoint:POST /mcp) - Use
stdiofor direct communication (default)
Example of complete configuration:
{
"mcpServers": {
"mcp-odoo-panda": {
"command": "/usr/bin/python3",
"args": [
"--directory",
"/path/to/mcp-odoo-panda",
"mcp/server.py",
"--config",
"/path/to/mcp-odoo-panda/odoo_mcp/config/config.json"
]
}
},
"odoo_url": "http://localhost:8069",
"database": "my_database",
"username": "admin",
"api_key": "admin",
"protocol": "xmlrpc",
"connection_type": "streamable_http",
"requests_per_minute": 120,
"rate_limit_max_wait_seconds": 5,
"pool_size": 5,
"timeout": 30,
"session_timeout_minutes": 60,
"http": {
"host": "0.0.0.0",
"port": 8080,
"streamable": true
},
"logging": {
"level": "INFO",
"format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s",
"handlers": [
{
"type": "StreamHandler",
"level": "INFO"
},
{
"type": "FileHandler",
"filename": "server.log",
"level": "DEBUG"
}
]
}
}
Configuration
You can configure the server via environment variables in your .env file or directly in docker-compose.yml.
Note: Environment variables (from .env or the container enviro
Tools (5)
search_and_read_recordsSearch for Odoo records and read their field values.create_recordsCreate new records in the Odoo database.update_recordsModify existing records in the Odoo database.delete_recordsRemove records from the Odoo database.call_custom_methodsExecute custom methods defined on Odoo models.Environment Variables
odoo_urlrequiredURL of the Odoo instance (e.g., http://localhost:8069)databaserequiredOdoo database nameusernamerequiredOdoo login usernameapi_keyrequiredOdoo API key or passwordConfiguration
{"mcpServers":{"mcp-odoo-panda":{"command":"/usr/bin/python3","args":["--directory","/path/to/mcp-odoo-panda","mcp/server.py","--config","/path/to/mcp-odoo-panda/odoo_mcp/config/config.json"]}}}