yt-mcp-server-odoo

yt-mcp-server-odoo

An MCP server that enables AI assistants to interact with Odoo ERP, allowing natural language queries, record creation, updates, and deletions.

Category
Visit Server

README

YT MCP Server for Odoo

A Python MCP (Model Context Protocol) client that enables AI assistants like Claude, Cursor, and VS Code Copilot to interact with your Odoo ERP system.

Features

  • šŸ” Search & Read - Query any Odoo model with natural language
  • āœļø Create & Update - Create and modify records via AI
  • šŸ—‘ļø Delete - Remove records (with proper permissions)
  • šŸ“Š Bulk Operations - Create/update multiple records at once
  • šŸ”¢ Count & Browse - Count records or fetch by specific IDs
  • šŸ“ Prompt Templates - Pre-defined prompts for common tasks
  • šŸ” Secure - API key authentication with Odoo user permissions

Installation

Option 1: Local Development (Recommended)

# Navigate to the mcp_client directory
cd /path/to/yt_mcp_server/mcp_client

# Install in development mode
pip install -e .

# Or using uv
uv pip install -e .

Option 2: Direct from Path

# Install directly from local path
pip install /path/to/yt_mcp_server/mcp_client

Option 3: Run without Installing

# Run directly with Python
cd /path/to/yt_mcp_server/mcp_client
python -m yt_mcp_server_odoo

Configuration

Environment Variables

Variable Required Default Description
ODOO_URL Yes http://localhost:8069 Your Odoo instance URL
ODOO_API_KEY Yes - API key from MCP Server module
ODOO_DB No Auto-detect Database name
ODOO_USER No - Username (alternative to API key)
ODOO_PASSWORD No - Password (alternative to API key)
MCP_TRANSPORT No stdio Transport: stdio or streamable-http
MCP_HOST No localhost Host for HTTP transport
MCP_PORT No 8000 Port for HTTP transport
DEFAULT_LIMIT No 10 Default records per query
MAX_LIMIT No 100 Maximum records per query
MAX_SMART_FIELDS No 25 Max fields for smart selection
ODOO_YOLO No off YOLO mode: off, read, true

IDE Setup Guides

Claude Desktop

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

Option A: Using installed package

{
  "mcpServers": {
    "odoo": {
      "command": "python",
      "args": ["-m", "yt_mcp_server_odoo"],
      "env": {
        "ODOO_URL": "https://your-odoo.com",
        "ODOO_API_KEY": "your-api-key-here",
        "ODOO_DB": "your-database"
      }
    }
  }
}

Option B: Using local path directly

{
  "mcpServers": {
    "odoo": {
      "command": "python",
      "args": ["/path/to/yt_mcp_server/mcp_client/src/yt_mcp_server_odoo/__main__.py"],
      "env": {
        "ODOO_URL": "https://your-odoo.com",
        "ODOO_API_KEY": "your-api-key-here",
        "ODOO_DB": "your-database"
      }
    }
  }
}

Cursor

Location: ~/.cursor/mcp.json

{
  "mcpServers": {
    "odoo": {
      "command": "python",
      "args": ["-m", "yt_mcp_server_odoo"],
      "env": {
        "ODOO_URL": "https://your-odoo.com",
        "ODOO_API_KEY": "your-api-key-here",
        "ODOO_DB": "your-database"
      }
    }
  }
}

VS Code (with Copilot/Continue)

Location: .vscode/mcp.json in your workspace or ~/.vscode/mcp.json globally

{
  "servers": {
    "odoo": {
      "command": "python",
      "args": ["-m", "yt_mcp_server_odoo"],
      "env": {
        "ODOO_URL": "https://your-odoo.com",
        "ODOO_API_KEY": "your-api-key-here",
        "ODOO_DB": "your-database"
      }
    }
  }
}

Windsurf

Location: ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "odoo": {
      "command": "python",
      "args": ["-m", "yt_mcp_server_odoo"],
      "env": {
        "ODOO_URL": "https://your-odoo.com",
        "ODOO_API_KEY": "your-api-key-here",
        "ODOO_DB": "your-database"
      }
    }
  }
}

Zed

Location: ~/.config/zed/settings.json

{
  "context_servers": {
    "odoo": {
      "command": {
        "path": "python",
        "args": ["-m", "yt_mcp_server_odoo"],
        "env": {
          "ODOO_URL": "https://your-odoo.com",
          "ODOO_API_KEY": "your-api-key-here",
          "ODOO_DB": "your-database"
        }
      }
    }
  }
}

Custom/Programmatic

from yt_mcp_server_odoo import OdooMCPServer
from yt_mcp_server_odoo.config import OdooConfig

config = OdooConfig(
    odoo_url="https://your-odoo.com",
    odoo_api_key="your-api-key",
    odoo_db="your-database"
)

server = OdooMCPServer(config)
server.run()

Available MCP Tools

Tool Description
list_models List all MCP-enabled Odoo models
search_records Search records with domain filters
get_record Get a single record by ID
create_record Create a new record
update_record Update an existing record
delete_record Delete a record
count_records Count records matching a domain
browse_records Get multiple records by IDs
create_bulk Create multiple records at once
update_bulk Update multiple records with different values
list_prompts List available prompt templates

Usage Examples

Once configured, ask your AI assistant:

"Show me all customers from Spain"
"Create a new contact named John Doe at Acme Corp"
"Find unpaid invoices from last month over $1000"
"Update the phone number for partner ID 42"
"How many products do we have in stock?"
"Delete the draft quotation SO0123"

YOLO Mode (Development)

For development/testing, enable YOLO mode to bypass MCP model restrictions:

{
  "env": {
    "ODOO_YOLO": "read"
  }
}
Mode Effect
off Normal - only configured models accessible
read Can read ANY model without MCP config
true Full access to ALL models (dangerous!)

āš ļø Warning: YOLO mode bypasses MCP restrictions but still respects Odoo user permissions.


Getting Your API Key

  1. Go to Settings > MCP Server in Odoo
  2. Click Manage API Keys
  3. Create a new API key for your user
  4. Copy the key (shown only once!)

Troubleshooting

Connection Failed

  • Check ODOO_URL is accessible
  • Ensure MCP Server module is installed and enabled
  • Verify API key is valid

Model Not Found

  • Ensure model is enabled in MCP Server > Enabled Models
  • Check if YOLO mode should be enabled for development

Permission Denied

  • Verify API key user has access to the model
  • Check model permissions (read/write/create/delete)

License

LGPL-3.0

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured