godtbilh/odoo-mcp-server
If you are the rightful owner of odoo-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A Model Context Protocol (MCP) server that facilitates interaction with Odoo instances via XML-RPC.
odoo_test_connection
Test connection to Odoo
odoo_search
Search for records in any Odoo model
odoo_read
Read specific records by ID
odoo_create
Create new records
odoo_write
Update existing records
Odoo MCP Server
A Model Context Protocol (MCP) server that provides tools for interacting with Odoo instances via XML-RPC.
๐จ Current Status: Authentication Issue
The MCP server is properly configured, but there's an authentication issue with your Odoo instance.
What's Working โ
- โ Connection to Odoo server (https://euromenager.odoo.com/)
- โ MCP server implementation with proper tools
- โ Environment configuration
- โ Dependencies installed
What's Not Working โ
- โ Authentication with API key fails
- โ All tested usernames ('admin', 'Administrator', 'user', 'demo') fail
๐ง How to Fix the Authentication Issue
Option 1: Check Your API Key (Recommended)
- Log into your Odoo instance: https://euromenager.odoo.com/
- Go to Settings โ Users & Companies โ Users
- Find your user account and click on it
- Check the Login field - this should be your username
- Generate a new API key:
- Scroll down to the "API Keys" section
- Delete the old API key
- Create a new one
- Copy the new API key
Option 2: Update Your Credentials
Update your .env
file with the correct information:
ODOO_URL=https://euromenager.odoo.com/
ODOO_API_KEY=your_new_api_key_here
ODOO_DB=euromenager
ODOO_USERNAME=your_actual_username_here
Option 3: Check User Permissions
Make sure your user has:
- XML-RPC access enabled
- API access permissions
- Proper user rights (not just portal user)
๐ Project Structure
odoo_agent_mcp/
โโโ .env # Environment variables (your Odoo credentials)
โโโ .venv/ # Python virtual environment
โโโ odoo_mcp_server/
โ โโโ main.py # MCP server implementation
โ โโโ requirements.txt # Python dependencies
โโโ test_connection.py # Simple connection test
โโโ debug_auth.py # Detailed authentication debugging
โโโ mcp_config.json # MCP client configuration
โโโ README.md # This file
๐งช Testing Your Connection
1. Activate Virtual Environment
.venv\Scripts\Activate.ps1
2. Test Connection
python test_connection.py
3. Debug Authentication (if needed)
python debug_auth.py
๐ Using the MCP Server
Once authentication is working, you can use the MCP server with MCP clients.
Available Tools
- odoo_test_connection - Test connection to Odoo
- odoo_search - Search for records in any Odoo model
- odoo_read - Read specific records by ID
- odoo_create - Create new records
- odoo_write - Update existing records
Available Resources
- odoo://connection - Connection status
- odoo://models - List of available Odoo models
Example Usage (once working)
# Search for customers
odoo_search(model="res.partner", domain=[["is_company", "=", True]], fields=["name", "email"], limit=5)
# Read specific customer
odoo_read(model="res.partner", ids=[1], fields=["name", "email", "phone"])
# Create new customer
odoo_create(model="res.partner", values={"name": "Test Company", "email": "test@example.com"})
๐ง MCP Client Configuration
To use this server with MCP clients like Cline, add this to your MCP configuration:
{
"mcpServers": {
"odoo": {
"command": "python",
"args": ["odoo_mcp_server/main.py"],
"env": {
"PYTHONPATH": "."
}
}
}
}
๐ Troubleshooting
Common Issues
-
"Authentication failed"
- Check your API key is correct and not expired
- Verify your username matches the API key owner
- Ensure your user has XML-RPC permissions
-
"python odoo_mcp_server/main.py blocks the system"
- This is normal! MCP servers run as long-running processes
- They wait for input from MCP clients
- Use the test scripts instead for testing
-
"Module not found" errors
- Make sure virtual environment is activated
- Run:
pip install -r odoo_mcp_server/requirements.txt
Getting Help
- Check Odoo logs in your instance
- Verify API key permissions in Odoo user settings
- Test with a fresh API key
- Contact your Odoo administrator if you don't have proper access
๐ Next Steps
- Fix authentication using the steps above
- Test connection with
python test_connection.py
- Configure MCP client to use this server
- Start using Odoo tools via MCP!
Note: This is an Odoo SaaS/trial instance, which may have additional restrictions on API access. Make sure your subscription includes API access rights.