ajaysingh-codes/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.
Odoo MCP Server is an AI-powered CRM automation tool that integrates Claude AI with Odoo ERP systems using the Model Context Protocol (MCP).
Odoo MCP Server
šÆ Odoo MCP Server
An AI-powered CRM automation tool that integrates Claude AI with Odoo ERP systems using the Model Context Protocol (MCP).
š Features
- š¤ AI Lead Classification: Automatically classify leads using Claude AI and BANT methodology (Budget, Authority, Need, Timeline)
- š Smart Lead Creation: Create CRM leads with intelligent salesperson auto-assignment
- š Project Management: Retrieve and manage Odoo project tasks
- š Real-time Integration: Seamless connection between Claude conversations and Odoo CRM
- šØ User-Friendly Interface: Clean Gradio web interface for easy interaction
š Prerequisites
- Python 3.8+
- Access to an Odoo instance (URL, database, credentials)
- Claude API key from Anthropic
- Required Python packages (see requirements.txt)
ā” Quick Start
-
Clone the repository
git clone <your-repo-url> cd odoo-mcp-server
-
Install dependencies
pip install -r requirements.txt
-
Configure environment variables Create a
.env
file in the project root:# Odoo Configuration ODOO_URL=https://your-odoo-instance.com ODOO_DB=your_database_name ODOO_USERNAME=your_username ODOO_PASSWORD_OR_API_KEY=your_password_or_api_key # Claude AI Configuration CLAUDE_API_KEY=your_claude_api_key
-
Test your Odoo connection
python test_connection.py
-
Launch the application
python app.py
-
Open your browser to
http://localhost:7860
š ļø Core Components
Lead Classification with BANT
The AI analyzes email content and classifies leads based on:
- Budget: Financial capacity assessment
- Authority: Decision-making power
- Need: Urgency and importance
- Timeline: When they need a solution
Smart Auto-Assignment
- Automatically assigns salespeople based on email domain matching
- Prioritizes leads from known companies
- Updates lead status based on qualification
Project Task Management
- Retrieve tasks from specific Odoo projects
- Filter and limit results for focused management
- Real-time project status updates
š Usage Examples
Creating a Lead
# Through the web interface or programmatically
result = mcp_create_odoo_lead(
lead_title="Enterprise Software Inquiry",
company="Tech Corp",
contact="Jane Smith",
email_address="jane@techcorp.com",
phone_number="+1-555-0199",
notes="Interested in our enterprise solution"
)
AI Lead Classification
# Classify an email and update the lead
email_content = """
Hi, I'm the CTO at StartupXYZ. We're looking for a CRM solution
for our 50-person team. Our budget is around $10k annually, and
we need something implemented within the next 2 months.
Can you help?
"""
result = mcp_classify_and_update_lead(
email_text=email_content,
email_address="cto@startupxyz.com"
)
š§ Configuration
Environment Variables
ODOO_URL
: Your Odoo instance URLODOO_DB
: Database nameODOO_USERNAME
: Odoo usernameODOO_PASSWORD_OR_API_KEY
: Password or API keyCLAUDE_API_KEY
: Anthropic Claude API key
Customization
- Modify BANT classification criteria in
app.py
- Adjust salesperson assignment logic in
odoo_actions.py
- Customize UI themes and layouts in the Gradio interface
š Troubleshooting
Common Issues
-
Odoo Connection Failed
- Verify your Odoo URL and credentials
- Check if your Odoo instance allows XML-RPC connections
- Ensure your user has appropriate permissions
-
Claude API Errors
- Verify your API key is valid and has sufficient credits
- Check the model name matches available Claude models
- Review rate limits and usage
-
JSON Parsing Errors
- The app handles markdown code blocks from Claude responses
- Check Claude's response format in console logs
Testing Connection
python3 test_connection.py
šļø Architecture
āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā
ā Gradio UI ā ā Claude AI ā ā Odoo ERP ā
ā (Frontend) āāāāāŗā (MCP Client) āāāāāŗā (Backend) ā
āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā
ā ā ā
ā āāāāāāāāāāāāāāāāāāā ā
āāāāāāāāāāāāāāāŗā Python App āāāāāāāāāāāāāāāā
ā (MCP Server) ā
āāāāāāāāāāāāāāāāāāā
šÆ Hackathon Highlights
This project demonstrates:
- AI Integration: Seamless Claude AI integration for intelligent lead processing
- Real-world Application: Practical CRM automation solving actual business problems
- Modern Architecture: MCP protocol implementation for scalable AI-human collaboration
- User Experience: Intuitive interface making AI accessible to non-technical users
š¤ Contributing
- 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
This project is licensed under the MIT License - see the LICENSE file for details.
š Acknowledgments
- Anthropic for Claude AI and MCP protocol
- Odoo for the excellent ERP platform
- Gradio team for the fantastic UI framework