Odoo MCP Server

Odoo MCP Server

A Model Context Protocol server that enables AI assistants to interact with Odoo ERP systems, providing comprehensive tools for searching, creating, updating, and managing Odoo records through a standardized interface.

Category
访问服务器

README

MCP Server for Odoo

A Model Context Protocol (MCP) server that enables AI assistants to interact with Odoo ERP systems. This server provides tools for searching, creating, updating, and managing Odoo records through a standardized interface.

Custom MCP Server Development

We develop MCP Servers for customers, if you need MCP server for your own system similar to Odoo MCP server, please contact us (https://www.flowhunt.io/contact/). Here is the description how we develop MCP Servers for our customers: https://www.flowhunt.io/services/mcp-server-development/

Demo

Odoo MCP Server Demo

📺 Watch the demo on YouTube

Features

  • 🔍 Search Records: Query any Odoo model with complex domain filters
  • Create Records: Add new records to any Odoo model
  • ✏️ Update Records: Modify existing records
  • 🗑️ Delete Records: Remove records from the system
  • 📊 Read Records: Fetch detailed information about specific records
  • 🔗 Execute Methods: Call custom methods on Odoo models
  • 📋 List Models: Discover available models in your Odoo instance
  • 🔧 Model Introspection: Get field definitions for any model

Installation

Via pip (recommended)

pip install odoo-mcp-server

From source

git clone https://github.com/vzeman/odoo-mcp-server.git
cd odoo-mcp-server
pip install -e .

Configuration

Environment Variables

Create a .env file in your project directory or set these environment variables:

ODOO_URL=https://your-instance.odoo.com
ODOO_DB=your-database-name
ODOO_USERNAME=your-username@example.com
ODOO_API_KEY=your-api-key-here

Getting Odoo Credentials

  1. API Key:

    • Log into your Odoo instance
    • Go to Settings → Users & Companies → Users
    • Select your user
    • Under "API Keys" or "Security" tab, create a new API key
    • Copy the key immediately (it won't be shown again)
  2. Database Name:

    • Usually visible in the URL when logged in
    • Or check Settings → Activate Developer Mode → Database Info
  3. Username:

    • Your login email address

Usage with Claude Desktop

Add this configuration to your Claude Desktop config file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "odoo": {
      "command": "python",
      "args": ["-m", "mcp_server_odoo"],
      "env": {
        "ODOO_URL": "https://your-instance.odoo.com",
        "ODOO_DB": "your-database",
        "ODOO_USERNAME": "your-email@example.com",
        "ODOO_API_KEY": "your-api-key"
      }
    }
  }
}

Available Tools

search_records

Search for records in any Odoo model.

Parameters:

  • model (required): The Odoo model name (e.g., 'res.partner', 'sale.order')
  • domain: Odoo domain filter (default: [])
  • fields: List of fields to return
  • limit: Maximum number of records
  • offset: Number of records to skip
  • order: Sort order (e.g., 'name asc, id desc')

Example prompts:

  • "Find all customers in California"
  • "Show me sales orders from last month"
  • "List products with stock quantity below 10"

get_record

Get detailed information about specific records.

Parameters:

  • model (required): The Odoo model name
  • ids (required): List of record IDs
  • fields: List of fields to return (optional)

Example prompts:

  • "Show me details of customer with ID 42"
  • "Get information about sales order SO0123"

create_record

Create new records in Odoo.

Parameters:

  • model (required): The Odoo model name
  • values (required): Dictionary of field values

Example prompts:

  • "Create a new customer named 'Acme Corp' with email contact@acme.com"
  • "Add a new product called 'Widget Pro' with price $99.99"

update_record

Update existing records.

Parameters:

  • model (required): The Odoo model name
  • ids (required): List of record IDs to update
  • values (required): Dictionary of field values to update

Example prompts:

  • "Update customer 42's phone number to +1-555-0123"
  • "Change the status of sales order SO0123 to confirmed"

delete_record

Delete records from Odoo (use with caution).

Parameters:

  • model (required): The Odoo model name
  • ids (required): List of record IDs to delete

Example prompts:

  • "Delete the test customer record with ID 999"
  • "Remove cancelled sales orders older than 2 years"

execute_method

Execute custom methods on Odoo models.

Parameters:

  • model (required): The Odoo model name
  • method (required): Method name to execute
  • ids: List of record IDs (if method requires)
  • args: Additional positional arguments
  • kwargs: Additional keyword arguments

Example prompts:

  • "Confirm sales order SO0123"
  • "Send invoice INV/2024/0001 by email"

list_models

Discover available models in your Odoo instance.

Parameters:

  • transient: Include transient (wizard) models (default: false)

Example prompts:

  • "What models are available in Odoo?"
  • "Show me all installed models"

get_model_fields

Get field definitions for a model.

Parameters:

  • model (required): The Odoo model name
  • fields: Specific fields to get info for (optional)

Example prompts:

  • "What fields are available on the customer model?"
  • "Show me the structure of sales orders"

Common Use Cases

Customer Management

"Find all customers who haven't made a purchase in 6 months"
"Create a new contact for Acme Corp named John Doe"
"Update the credit limit for customer 'BigCo Industries'"

Sales Operations

"Show me all draft quotations"
"Create a sales order for customer Acme Corp with 10 units of Product A"
"Convert quotation SO0123 to a confirmed order"

Inventory Management

"List all products with stock below reorder point"
"Update the quantity on hand for SKU-12345"
"Find all pending stock moves"

Financial Operations

"Show me all unpaid invoices"
"Create a vendor bill for Office Supplies Inc"
"List payments received today"

Model Reference

Common Odoo models you can interact with:

  • res.partner - Customers, suppliers, and contacts
  • sale.order - Sales orders and quotations
  • account.move - Invoices and bills
  • product.product - Product variants
  • product.template - Product templates
  • stock.move - Stock movements
  • purchase.order - Purchase orders
  • project.project - Projects
  • project.task - Project tasks
  • hr.employee - Employees
  • res.users - System users
  • res.company - Companies

Security Considerations

  • Store credentials securely using environment variables
  • Use API keys instead of passwords when possible
  • Grant minimum necessary permissions to the API user
  • Regularly rotate API keys
  • Monitor API usage through Odoo's logs

Troubleshooting

Authentication Failed

  • Verify your API key is active in Odoo
  • Check if the username is correct (usually your email)
  • Ensure the database name matches exactly

Connection Refused

  • Verify the Odoo URL (should not include /web)
  • Check if your IP is whitelisted (if applicable)
  • Ensure XML-RPC is enabled on your Odoo instance

Model Not Found

  • The model might require additional modules to be installed
  • Use list_models to see available models
  • Check if you have permissions for that model

Development

Running Tests

pip install -e ".[dev]"
pytest

Type Checking

mypy mcp_server_odoo

Linting

ruff check .
ruff format .

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

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

Support

For issues and feature requests, please use the GitHub issue tracker.

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选