Odoo MCP Server
Provides tools for interacting with Odoo ERP, including authentication, CRUD operations on any model, advanced search with domain filters, method calls, and field definitions, enabling AI agents to manage Odoo records programmatically.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Odoo MCP ServerShow me all partners that are companies"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Odoo MCP Server
A professional Model Context Protocol (MCP) server for seamless Odoo ERP integration. Supports both HTTP and STDIO transports for maximum flexibility.
๐ Features
๐ Dual Transport Support
HTTP Mode: REST API with Express.js for web applications and remote access
STDIO Mode: Direct stdin/stdout communication for Claude Desktop and local AI assistants
๐ง Complete Odoo Integration
Authentication: Automatic login with environment variables or manual connect
CRUD Operations: Full Create, Read, Update, Delete on any Odoo model
Advanced Search: Complex domain filtering with Odoo's powerful search syntax
Method Calls: Execute any custom method on Odoo models
Multi-Protocol: XML-RPC and JSON-RPC support
๐๏ธ Professional Architecture
TypeScript: Full type safety and modern ES modules
MCP Protocol: Compliant with Model Context Protocol 2024-11-05
Error Handling: Comprehensive error handling and logging
Modular Design: Clean separation of concerns
Production Ready: Battle-tested with real Odoo deployments
Related MCP server: Odoo MCP Server
๐ฆ Installation
NPM (Recommended)
npm install -g @mweinheimer/odoo-mcp-serverFrom Source
git clone https://github.com/heimerle/odoo-mcp-server.git
cd odoo-mcp-server
npm install
npm run buildโ๏ธ Configuration
Environment Variables
Create a .env.local file or set these environment variables:
# Odoo Connection (Required)
ODOO_URL=http://your-odoo-instance:8069
ODOO_DB=your_database # or ODOO_DATABASE
ODOO_USERNAME=your_username
ODOO_PASSWORD=your_password
# Transport Mode
MCP_TRANSPORT=stdio # 'http' or 'stdio' (default: http)
# Odoo Protocol
ODOO_TRANSPORT=jsonrpc # 'jsonrpc' or 'xmlrpc' (default: jsonrpc)
# HTTP Mode Settings (only for MCP_TRANSPORT=http)
MCP_HTTP_PORT=3001 # HTTP server port (default: 3001)Claude Desktop Configuration
Add to your claude_desktop_config.json:
{
"mcpServers": {
"odoo": {
"command": "node",
"args": [
"/path/to/odoo-mcp-server/dist/stdio-server.js"
],
"env": {
"ODOO_URL": "http://your-odoo:8069",
"ODOO_DB": "your_database",
"ODOO_USERNAME": "your_username",
"ODOO_PASSWORD": "your_password"
}
}
}
}Or use the global installation:
{
"mcpServers": {
"odoo": {
"command": "odoo-mcp-server",
"args": ["--stdio"],
"env": {
"ODOO_URL": "http://your-odoo:8069",
"ODOO_DB": "your_database",
"ODOO_USERNAME": "your_username",
"ODOO_PASSWORD": "your_password",
"MCP_TRANSPORT": "stdio"
}
}
}
}๐ Quick Start
HTTP Mode
# Using environment variables
ODOO_URL=http://localhost:8069 \
ODOO_DB=mydb \
ODOO_USERNAME=admin \
ODOO_PASSWORD=admin \
MCP_TRANSPORT=http \
node dist/http-mcp-server.js
# Server starts on http://localhost:3001STDIO Mode (Claude Desktop)
# Using the dedicated STDIO entry point
ODOO_URL=http://localhost:8069 \
ODOO_DB=mydb \
ODOO_USERNAME=admin \
ODOO_PASSWORD=admin \
node dist/stdio-server.js๐ง Available Tools
The server provides 13 MCP tools for Odoo interaction:
odoo_ping - Test Odoo connection and get server info
odoo_connect - Manual login to Odoo (when auto-login is not configured)
odoo_search_read - Search and read records with domain filters
odoo_create - Create new records in any model
odoo_write - Update existing records
odoo_unlink - Delete records
odoo_call_method - Execute custom methods on models
odoo_get_fields - Get field definitions for a model
odoo_read - Read specific records by ID
odoo_search - Search for record IDs
odoo_search_count - Count records matching criteria
odoo_name_get - Get display names for records
odoo_name_search - Search records by name
๐ Usage Examples
Example 1: Search Customers (HTTP)
curl -X POST http://localhost:3001/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "odoo_search_read",
"arguments": {
"model": "res.partner",
"domain": [["is_company", "=", true]],
"fields": ["name", "email", "phone"],
"limit": 10
}
},
"id": 1
}'Example 2: Create Contact (Claude Desktop - STDIO)
Simply ask Claude:
"Create a new contact in Odoo with name 'John Doe', email 'john@example.com'"
Claude will use the odoo_create tool automatically.
Example 3: Update Record
curl -X POST http://localhost:3001/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "odoo_write",
"arguments": {
"model": "res.partner",
"ids": [42],
"values": {
"phone": "+1234567890"
}
}
},
"id": 1
}'๐งช Development
Build from Source
git clone https://github.com/heimerle/odoo-mcp-server.git
cd odoo-mcp-server
npm install
npm run buildDevelopment Mode
npm run dev # Watch mode with auto-recompile
npm run lint # Run ESLint
npm run test # Run testsProject Structure
src/
โโโ http-mcp-server.ts # Main HTTP/STDIO server
โโโ stdio-server.ts # Dedicated STDIO entry point
โโโ models/
โ โโโ odoo-client.ts # Odoo API client
โ โโโ odoo-tools.ts # MCP tool definitions
โโโ utils/
โ โโโ odoo-sanitizer.ts # Response sanitization
โโโ types/
โโโ index.ts # TypeScript type definitions๐ Documentation
Quick Start Guide - Get started in 5 minutes
Examples - Detailed usage examples
Transport Modes - HTTP vs STDIO explained
MCP Setup - Claude Desktop integration
Testing Guide - How to test the server
Changelog - Version history
๐ Troubleshooting
STDIO Mode: "Not connected to Odoo"
Make sure you're using the correct environment variable names:
Use
ODOO_DBorODOO_DATABASE(both work)All credentials must be provided for auto-login
HTTP Mode: Port Already in Use
# Check what's using port 3001
lsof -i :3001
# Kill the process
pkill -f "node.*http-mcp-server"
# Or use a different port
MCP_HTTP_PORT=3002 node dist/http-mcp-server.jsConnection Refused
Check that your Odoo instance is accessible:
curl http://your-odoo-instance:8069/web/database/selector๐ค Contributing
Contributions are welcome! Please:
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
๐ License
MIT License - see LICENSE file for details.
๐ Links
๐ Acknowledgments
Built with Model Context Protocol
Powered by Odoo ERP
TypeScript and Node.js
Made with โค๏ธ for the Odoo and AI community
This server cannot be deployed
Maintenance
Related MCP Connectors
Odoo MCP Pack โ ERP/CRM via Odoo's external JSON-RPC API.
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Unified MCP server for 70+ eCommerce platforms: products, orders, customers, and more.
- ZapierOAuthcom.zapier
Hosted MCP server connecting AI assistants to 9,000+ apps and 40,000+ actions via Zapier.
Related MCP Servers
- AlicenseBqualityAmaintenanceAn MCP server implementation that integrates with Odoo ERP systems, enabling AI assistants to interact with Odoo data and functionality through the Model Context Protocol.41656 PyPI408MIT
- AlicenseBqualityDmaintenanceAn MCP server that enables AI assistants to interact with Odoo ERP apps like Inventory, CRM, Sales, and Manufacturing. It allows users to read, create, and manage Odoo records and workflows using natural language commands.2511 npm1ISC
- AlicenseNot gradedqualityDmaintenanceAn extensible MCP server that integrates Odoo with LLMs to enable querying and managing business data like partners, quotations, and sales orders. It supports custom tool registration and multiple transport protocols for both local and remote communication.2MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that connects AI assistants to Odoo ERP instances via the built-in XML-RPC API without requiring any additional addons. It enables users to search, create, update, and manage Odoo records and models through natural language.25 npmMIT