MCP Server for Odoo - Enable AI assistants to interact with Odoo ERP
Project description
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
- Go to Settings > MCP Server in Odoo
- Click Manage API Keys
- Create a new API key for your user
- Copy the key (shown only once!)
Troubleshooting
Connection Failed
- Check
ODOO_URLis 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yt_mcp_server_odoo-0.1.2.tar.gz.
File metadata
- Download URL: yt_mcp_server_odoo-0.1.2.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94781a3fa80f1b898185c9e8a3f3d7997c79fae15e02345a1f396cde85963a6a
|
|
| MD5 |
fa41531dbe7b5d798ec5a4a5d9080144
|
|
| BLAKE2b-256 |
bd90e15511b65c8893be835a37b3dc0d92a7f0a70f9e2e24a40f1bd102de36f3
|
Provenance
The following attestation bundles were made for yt_mcp_server_odoo-0.1.2.tar.gz:
Publisher:
publish.yml on yugmatech/yt-mcp-server-odoo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yt_mcp_server_odoo-0.1.2.tar.gz -
Subject digest:
94781a3fa80f1b898185c9e8a3f3d7997c79fae15e02345a1f396cde85963a6a - Sigstore transparency entry: 771828924
- Sigstore integration time:
-
Permalink:
yugmatech/yt-mcp-server-odoo@ce48b8bd7acfe1dab8b2ebbbb08ea6e001909a7b -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/yugmatech
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ce48b8bd7acfe1dab8b2ebbbb08ea6e001909a7b -
Trigger Event:
release
-
Statement type:
File details
Details for the file yt_mcp_server_odoo-0.1.2-py3-none-any.whl.
File metadata
- Download URL: yt_mcp_server_odoo-0.1.2-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee54dc5ee24e6f88104adfa1f315aed06c84d62b6ba5276909482cffabf676ae
|
|
| MD5 |
af14237c9232168026310b98507e153a
|
|
| BLAKE2b-256 |
598167de0a3b496ace8411e85fa17e717c7c6daaba7ebf98778037500dd1101f
|
Provenance
The following attestation bundles were made for yt_mcp_server_odoo-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on yugmatech/yt-mcp-server-odoo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yt_mcp_server_odoo-0.1.2-py3-none-any.whl -
Subject digest:
ee54dc5ee24e6f88104adfa1f315aed06c84d62b6ba5276909482cffabf676ae - Sigstore transparency entry: 771828925
- Sigstore integration time:
-
Permalink:
yugmatech/yt-mcp-server-odoo@ce48b8bd7acfe1dab8b2ebbbb08ea6e001909a7b -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/yugmatech
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ce48b8bd7acfe1dab8b2ebbbb08ea6e001909a7b -
Trigger Event:
release
-
Statement type: