Odoo MCP Server

Odoo MCP Server

Bridges AI agents to Odoo ERP via MCP, enabling CRUD operations, model introspection, and report generation with secure API key and connection management through a web admin UI.

Category
访问服务器

README

Odoo MCP Server (Enhanced for AI Agents)

Odoo MCP Server Banner <!-- Replace with a real banner image -->

License: MIT Python Version Docker Odoo Version


Introduction

This project provides an enhanced, production-ready Odoo MCP (Model Context Protocol) Server, designed to act as a secure and intelligent bridge between your Odoo instance and modern AI agents like Claude and ChatGPT, especially within automation platforms like n8n.

The server exposes a JSON-RPC 2.0 compliant MCP endpoint that translates standardized AI agent requests into Odoo XML-RPC commands. All configuration — Odoo connections, API keys, and admin accounts — is managed through a built-in web admin UI, with nothing sensitive stored in environment files.

Key Features

  • Web Admin UI: A full React-based dashboard to manage Odoo connections, API keys, and admin accounts — no manual config files needed.
  • Multi-Connection Support: Store and switch between multiple named Odoo connections; test them live before activating.
  • API Key Management: Generate, revoke, and monitor API keys for each AI client or integration.
  • Admin Management: Multi-admin support with password management, all configurable from the UI.
  • Secure by Design: Odoo credentials are Fernet-encrypted at rest; the MCP endpoint requires a valid API key on every request.
  • Audit Dashboard: Track total requests, error rates, per-tool usage, and recent logs in real time.
  • High-Performance: Built on FastAPI for asynchronous, high-throughput performance.
  • Easy to Deploy: Single Docker container, two ports, one docker compose up.
  • Broad Odoo Compatibility: Tested against Odoo 10.0 through 18.0.

Architecture

The server runs as a single Docker container exposing two ports:

Port Service Purpose
9100 MCP Service JSON-RPC 2.0 endpoint for AI agents — validates API keys, calls Odoo, logs results
9101 Controller / Admin UI React SPA + REST API for managing connections, keys, and admins

Both services share a single SQLite database (data/mcp.db).

Architecture Diagram <!-- Replace with a real architecture diagram -->


Available MCP Tools

Tool Description
search_records Search any Odoo model with domain filters
get_record Fetch a single record by ID with selected fields
create_record Create a new record in any model
update_record Update fields on an existing record
delete_record Delete a record by ID
get_fields Introspect available fields on any model
execute_method Call arbitrary model methods
get_report Generate and retrieve Odoo reports
get_user_info Retrieve the authenticated Odoo user's profile
search_count Count records matching a domain without fetching them

Deployment

Prerequisites

  • Docker and Docker Compose installed
  • A running Odoo instance (version 10.0 to 18.0)

Step 1: Clone the Repository

git clone https://github.com/mah007/odooMCP.git
cd odooMCP

Step 2: Configure the Environment

Create a .env file — this contains only infrastructure settings, not Odoo credentials (those are entered through the web UI):

# Generate a secure key: openssl rand -hex 32
SECRET_KEY=your_secret_key_here

# Port configuration (defaults shown)
MCP_PORT=9100
CONTROLLER_PORT=9101

Step 3: Build and Start

docker compose up --build -d

Step 4: First-Run Setup

  1. Open http://<your_server_ip>:9101 in your browser.
  2. You will be redirected to the Setup page to create your first admin account.
  3. After setup, log in and go to ConnectionsNew Connection to add your Odoo instance.
  4. Fill in the URL, database, username, and API key/password, then click Test to verify the connection.
  5. Click Activate to make it the active connection for the MCP endpoint.
  6. Go to API KeysGenerate to create a key for your AI client.

n8n Integration

  1. In your n8n workflow, add the MCP Client node.
  2. Set the Endpoint URL to: http://<your_server_ip>:9100/mcp
  3. Configure authentication:
    • Authentication: Header Auth
    • Name: X-API-Key
    • Value: The API key generated in the Admin UI

Claude / AI Agent Integration

To use with Claude or any MCP-compatible client, point the client at:

http://<your_server_ip>:9100/mcp

Include the header X-API-Key: <your_generated_key> on every request.


Admin UI Overview

Page What you can do
Dashboard View total requests, error count, per-tool stats, and recent request logs
Connections Add, edit, test, and activate Odoo connections (supports multiple)
API Keys Generate and revoke API keys; see last-used time and request count
Settings Change your admin password; add or remove additional admin accounts

Acknowledgements

This project is an enhanced version of the original odoo-mcp-server created by Václav Zeman. We extend our sincere thanks to him for providing the excellent foundation for this project.

This enhanced version was fixed and improved by Mahmoud Abdel Latif to be a more general-purpose, secure, and AI-ready solution for the Odoo, n8n, and AI communities.


Feedback and Contributions

This project is made with ❤️ by Mahmoud Abdel Latif for the Odoo, n8n, and AI communities.

If you encounter any errors or bugs, or have suggestions for improvements, please open an issue on the GitHub repository. We welcome all feedback and contributions!


License

This project is licensed under the MIT License. See the LICENSE file for details.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选