Odoo Development MCP Server
A Model Context Protocol (MCP) server for Odoo module development with AI assistance. Provides version-aware documentation access (17.0, 18.0, 19.0), intelligent code generation, and development workflow automation.
🚀 Quick Start | 📖 OpenCode Setup | 🔧 Troubleshooting | 📋 Changelog
Features
- 📚 Documentation Access: 302+ Odoo documentation files searchable across all versions
- 🔧 Version-Aware Code Generation: All generated code includes version info and relevant documentation links
- 📋 Integrated Development Guidelines: Built-in Odoo coding standards and best practices enforcement
- 💡 Smart Prompts: Guided workflows with rules-aware feature development, debugging, and upgrades
- 🎯 Automatic Context: Generated code includes references to official Odoo documentation and development rules
Installation
Prerequisites
# Ensure Python 3.12+ is installed
python --version
# Install MCP CLI (if not already installed)
pip install "mcp[cli]"
For Claude Desktop
-
Quick Install (Recommended):
mcp install odoo_mcp_server.py --name "Odoo Dev"
-
Manual Install:
Edit your Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add this configuration:
{ "mcpServers": { "odoo-dev": { "command": "python", "args": ["/absolute/path/to/odoo-dev-mcp/odoo_mcp_server.py"] } } }
- macOS:
-
Restart Claude Desktop
For OpenCode
📖 Complete OpenCode Setup Guide →
Quick setup - add to ~/.opencode/config.jsonc:
Option 1: Using uv (Recommended)
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"odoo-dev": {
"type": "local",
"command": ["uv", "run", "/absolute/path/to/odoo-dev-mcp/odoo_mcp_server.py"],
"enabled": true,
"environment": {
"PATH": "/home/user/.local/bin:/usr/local/bin:/usr/bin:/bin"
}
}
}
}
First, install dependencies:
cd /path/to/odoo-dev-mcp
curl -LsSf https://astral.sh/uv/install.sh | sh
uv sync
Option 2: Using Python directly
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"odoo-dev": {
"type": "local",
"command": ["python3", "/absolute/path/to/odoo-dev-mcp/odoo_mcp_server.py"],
"enabled": true,
"environment": {
"PYTHONPATH": "/absolute/path/to/odoo-dev-mcp"
}
}
}
}
Note: Requires pip install mcp first.
Then use in OpenCode:
Search Odoo documentation for "fields.Command"
Set Odoo version to 19.0
Create model library.book with fields: name, author
Get development guidelines
See OPENCODE_SETUP.md for complete guide with examples, troubleshooting, and workflows.
Quick Start
1. Test the Server
python test_server.py
You should see all tests pass with ✓ marks.
2. Basic Usage in Claude/OpenCode
# Set your Odoo version
Set Odoo version to 19.0
# Create a module
Create an Odoo module called "library_management" with display name "Library Management"
# Create a model
Create a model library.book with fields: name (char), author_id (many2one to res.partner), isbn (char)
# Generate views
Create a form view for library.book with fields: name, author_id, isbn
# Add security
Create security rules for library.book in module library_management
# Search documentation
Search Odoo documentation for "computed fields"
Available Tools
Version Management
set_odoo_version(version)- Switch between 17.0, 18.0, 19.0get_current_version()- Check current version
Documentation & Guidelines
search_documentation(query, version)- Full-text search across docsget_development_guidelines(context)- Get context-specific coding guidelines- Contexts:
general,models,views,security,all
- Contexts:
Code Generation (Version-Aware)
create_odoo_module(name, display_name, description, ...)- Generate module structure with version-specific manifestcreate_odoo_model(model_name, description, fields, inherit)- Create Python models with ORM documentation linkscreate_odoo_view(model_name, view_type, fields_to_display)- Generate XML views with architecture referencescreate_security_rules(model_name, module_name, groups)- Create security config with security documentation
Development Prompts
develop_odoo_feature(description)- Guided feature developmentdebug_odoo_error(error, context)- Error debugging assistanceupgrade_odoo_module(module, from_version, to_version)- Migration guidancereview_odoo_code(code)- Code review with best practices
Resources
Access Odoo documentation and development rules:
Documentation:
odoo://docs/19.0/index- Documentation indexodoo://docs/19.0/reference/backend/orm- ORM referenceodoo://docs/18.0/howtos/create_reports- How-to guides
Development Rules:
odoo://rules/all- All development guidelinesodoo://rules/clean-code- Clean code principlesodoo://rules/odoo-development- Odoo-specific conventions
Examples
Complete Module Creation
# In Claude/OpenCode:
1. Set Odoo version to 19.0
2. Create module "task_manager" with display name "Task Manager"
3. Create model task.task with fields:
- name (char, required)
- description (text)
- priority (selection: low, medium, high)
- assigned_to (many2one: res.users)
- deadline (date)
4. Create form view for task.task
5. Create tree view for task.task
6. Create security rules for task.task
Field Types Examples
All Odoo field types are supported:
fields = [
{"name": "name", "type": "Char", "required": True},
{"name": "description", "type": "Text"},
{"name": "amount", "type": "Float"},
{"name": "quantity", "type": "Integer"},
{"name": "active", "type": "Boolean"},
{"name": "date", "type": "Date"},
{"name": "partner_id", "type": "Many2one", "comodel_name": "res.partner"},
{"name": "line_ids", "type": "One2many", "comodel_name": "model.line", "inverse_name": "parent_id"},
{"name": "tag_ids", "type": "Many2many", "comodel_name": "model.tag"},
{"name": "state", "type": "Selection", "selection": "[('draft', 'Draft'), ('done', 'Done')]"}
]
Development
Run Tests
python test_server.py
Test with MCP Inspector
mcp dev odoo_mcp_server.py
Architecture
odoo_mcp_server.py
├── Resources (Documentation)
│ ├── 302 RST files indexed
│ ├── Version-specific content
│ └── Full-text search
├── Tools (Code Generation)
│ ├── Module scaffolding
│ ├── Model definitions
│ ├── View generation
│ └── Security rules
└── Prompts (Workflows)
├── Feature development
├── Error debugging
├── Module upgrades
└── Code review
Development Guidelines
The server includes comprehensive Odoo development guidelines that are automatically applied:
Built-in Rules
- Clean Code Principles - General software engineering best practices
- Odoo Conventions - Odoo-specific naming, structure, and coding standards
- Module structure and naming
- Model and field naming conventions
- View architecture standards
- Security rules patterns
- ORM best practices
- Performance optimization tips
Rules Integration
All code generation tools automatically include:
- ⚠️ Naming convention warnings
- 📋 Context-specific guidelines
- 🔗 Links to relevant rules sections
- ✅ Best practice recommendations
Access Guidelines
# Get general guidelines
get_development_guidelines("general")
# Get model-specific rules
get_development_guidelines("models")
# Access all rules
View resource: odoo://rules/all
Documentation Structure
The server provides access to Odoo documentation organized by version:
docs/
├── 17.0/ (102 files)
├── 18.0/ (100 files)
└── 19.0/ (100 files)
rules/
├── clean-code.mdc
└── odoo-development.mdc
docs/ ├── 17.0/ (102 files) ├── 18.0/ (100 files) └── 19.0/ (100 files)
## Supported Platforms
- ✅ Windows, macOS, Linux
- ✅ Claude Desktop
- ✅ OpenCode (VS Code extension)
- ✅ Any MCP-compatible client
## Requirements
- Python 3.12+
- MCP SDK 1.4.1+
- FastMCP
## Troubleshooting
### Server not showing in Claude?
1. Check config file is valid JSON
2. Verify absolute paths
3. Restart Claude Desktop completely
### Import errors?
```bash
pip install "mcp[cli]"
Documentation not found?
Ensure docs/ directory exists with version folders (17.0, 18.0, 19.0)
Tips
- Always set the Odoo version first - All code generation adapts to the selected version
- Review development guidelines - Use
get_development_guidelines()for context-specific rules - Follow naming conventions - Generated code includes rules warnings for common mistakes
- Use descriptive model names - e.g.,
library.book(with dots), notlib_b(with underscores) - Check rules in generated code - Each tool output includes relevant naming and coding rules
- Search before asking - Use
search_documentation()for specific questions - Test incrementally - module → models → views → security
- Review code against rules - Use the
review_odoo_codeprompt for rule compliance checks
License
MIT License
Contributing
Contributions welcome! This server follows clean code principles and Odoo best practices.
Metadata
Release files for iflow-mcp_mart337i-odoo-dev-mcp 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| iflow_mcp_mart337i_odoo_dev_mcp-1.0.1.tar.gz | 8.5 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| iflow_mcp_mart337i_odoo_dev_mcp-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.3 MB
Release files / iflow_mcp_mart337i_odoo_dev_mcp-1.0.1.tar.gz
| Download URL | iflow_mcp_mart337i_odoo_dev_mcp-1.0.1.tar.gz |
|---|---|
| Size | 8.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
91e9f257d8677c280e83e4043e48833668afd87ef5c684f081fc3c7f242754de
|
|
BLAKE2b-256 checksum How to use checksums |
b2eaa4806eb983f0941cdd42acc9b52226e7fe205d837e1cf65f2d3d5ebef640
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / iflow_mcp_mart337i_odoo_dev_mcp-1.0.1-py3-none-any.whl
| Download URL | iflow_mcp_mart337i_odoo_dev_mcp-1.0.1-py3-none-any.whl |
|---|---|
| Size | 8.8 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e7d0c38b74494240efc5c0c15f7755e60d1f3b00899e5f9659461e132a8319d9
|
|
BLAKE2b-256 checksum How to use checksums |
d1bbfe64a74c66423b18162a429532ab363d200cf7906c64fb3b017445068e25
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|