Sponsored by Deepsite.site

Panda Odoo Mcp Server

Created By
pandeussilvae6 months ago
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
Content

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 modify
  • config.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/stdout
  • streamable_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_http for real-time streaming over HTTP (endpoint: POST /mcp)
  • Use http for classic REST requests (endpoint: POST /mcp)
  • Use stdio for 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 environment) always take precedence over values in config.json.

Main variables:

  • ODOO_URL, ODOO_DB, ODOO_USER, ODOO_PASSWORD (Odoo connection)
  • PROTOCOL, CONNECTION_TYPE, LOGGING_LEVEL (MCP server)
  • REQUESTS_PER_MINUTE, SSE_QUEUE_MAXSIZE, ALLOWED_ORIGINS (advanced)

Example .env:

ODOO_URL=http://host.docker.internal:8069
ODOO_DB=odoo
ODOO_USER=admin
ODOO_PASSWORD=admin
PROTOCOL=xmlrpc
CONNECTION_TYPE=streamable_http
LOGGING_LEVEL=INFO

Starting the Server

The server can be started in two modes: stdio (default) and streamable_http. The configuration file is optional and, if not specified, the server will automatically look for the file in odoo_mcp/config/config.json.

stdio Mode (default)

# Start the server in stdio mode without specifying the configuration file
python -m odoo_mcp.server

# Start the server in stdio mode with a specific configuration file
python -m odoo_mcp.server /path/to/config.json

streamable_http Mode

# Start the server in streamable_http mode without specifying the configuration file
python -m odoo_mcp.server streamable_http

# Start the server in streamable_http mode with a specific configuration file
python -m odoo_mcp.server streamable_http /path/to/config.json

HTTP Modes

The Odoo MCP server supports two HTTP modes:

  1. HTTP Streaming Chunked (streamable_http):

    • Endpoint: POST /mcp
    • Keeps the connection open and streams data
    • Ideal for real-time data flows
    • Required headers:
      Content-Type: application/json
      Connection: keep-alive
      
  2. Classic HTTP POST (http):

    • Endpoint: POST /mcp
    • Handles a single request/response (stateless)
    • Standard REST behavior
    • Required headers:
      Content-Type: application/json
      
  3. Server-Sent Events (SSE):

    • Endpoint: GET /sse
    • Server-push event support
    • Required headers:
      Accept: text/event-stream
      

To configure the HTTP mode, set connection_type in config.json:

{
  "connection_type": "streamable_http",  // or "http"
  "http": {
    "host": "0.0.0.0",
    "port": 8080
  }
}

Server Config

{
  "mcpServers": {
    "streamable-remote": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "http://your.ip.address.or.domain:8080/mcp",
        "--transport",
        "http-only",
        "--allow-http",
        "--debug"
      ],
      "env": {}
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Amap Maps高德地图官方 MCP Server
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Serper MCP ServerA Serper MCP Server
WindsurfThe new purpose-built IDE to harness magic
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
ChatWiseThe second fastest AI chatbot™
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Tavily Mcp
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Playwright McpPlaywright MCP server
CursorThe AI Code Editor
DeepChatYour AI Partner on Desktop