Skip to main content
Glama

MCP-Odoo

by iaisep
PULL_REQUEST_TEMPLATE.mdโ€ข5.77 kB
# Pull Request: Add Comprehensive CRM Resource with Universidad ISEP Customizations ## ๐ŸŽฏ Overview This PR adds a complete CRM (Customer Relationship Management) module to the MCP-Odoo connector, specifically designed to handle Universidad ISEP's requirements while maintaining compatibility with standard Odoo CRM functionality. ## ๐Ÿ“‹ Changes Summary ### New Files Added: - **`resources/crm.py`** - Complete CRM resource with 18 MCP tools - **`docs/crm_guide.md`** - Comprehensive documentation for CRM functionality - **`test_crm.py`** - Test suite for CRM functionality ### Modified Files: - **`README.md`** - Updated with CRM features and tool documentation - **`config.py`** - Port configuration fix (8080 โ†’ 8000) - **`resources/__init__.py`** - Added CRM imports and exports - **`server.py`** - Added CRM resource import ## ๐Ÿš€ New Features ### Lead/Opportunity Management - โœ… `list_leads` - List and filter leads/opportunities with advanced filtering - โœ… `get_lead_details` - Get comprehensive lead information - โœ… `create_lead` - Create new leads with ISEP custom fields - โœ… `update_lead` - Update existing lead information - โœ… `convert_lead_to_opportunity` - Convert leads to opportunities ### Partner/Contact Management - โœ… `list_partners` - List contacts and companies with filtering - โœ… `get_partner_details` - Get detailed partner information - โœ… `create_partner` - Create new partners/contacts - โœ… `update_partner` - Update existing partner information ### CRM Auxiliary Tools - โœ… `list_crm_stages` - Get CRM workflow stages - โœ… `list_crm_teams` - Get sales teams - โœ… `get_lead_activities` - Get lead-related activities - โœ… `get_academic_programs` - Get academic programs (ISEP specific) - โœ… `get_crm_dashboard_stats` - Get CRM performance metrics ## ๐ŸŽ“ Universidad ISEP Specific Features ### Custom Fields Support: - **Academic Programs**: `x_studio_programa_academico` - Link leads to specific programs - **Contact Channels**: `x_studio_canal_de_contacto` - Track lead source channels - **Program Interest**: `x_studio_programa_de_inters` - Track student interest - **Contract Tracking**: `x_studio_fecha_de_firma`, `x_studio_duracin_de_convenio` - **Progress Monitoring**: `progress` field for lead advancement tracking - **External Integration**: Mautic CRM and Google Analytics support ### Database Compatibility: - Fully compatible with Universidad ISEP's Odoo 16 database structure - Based on provided data dictionary with 89 tables, 25 views - Handles all CRM-related tables: `crm_lead`, `crm_stage`, `crm_team`, `res_partner`, etc. ## ๐Ÿ“Š Analytics & Reporting - **Dashboard Statistics**: Lead counts, opportunity metrics, win rates - **Revenue Tracking**: Expected and weighted revenue calculations - **Team Performance**: Multi-team sales tracking and reporting - **Academic Analytics**: Program-specific enrollment tracking ## ๐Ÿ”ง Technical Improvements - **Robust Error Handling**: Comprehensive exception handling with logging - **Type Safety**: Full Pydantic models for request/response validation - **Async Support**: All operations are fully asynchronous - **Modular Design**: Clean separation of concerns and extensible architecture ## ๐Ÿ“– Documentation - **Complete User Guide**: `docs/crm_guide.md` with examples and best practices - **API Documentation**: All tools documented with parameters and return types - **Usage Examples**: Practical examples for common CRM workflows - **Integration Guide**: How to integrate with existing accounting functionality ## ๐Ÿงช Testing - **Test Suite**: Basic functionality tests in `test_crm.py` - **Mock Context**: Test framework for validating tool functionality - **Error Scenarios**: Tests for error handling and edge cases ## ๐Ÿ”„ Integration with Existing Features - **Seamless Integration**: Works alongside existing accounting tools - **Shared Context**: Uses same Odoo client and context handling - **Consistent API**: Follows same patterns as existing resources - **Performance**: Optimized queries with proper field selection and limits ## ๐Ÿ“ˆ Use Cases Enabled ### Student Recruitment Workflow: 1. **Lead Creation**: Capture student interest through various channels 2. **Program Association**: Link to specific academic programs 3. **Progress Tracking**: Monitor engagement and follow-up activities 4. **Conversion**: Convert qualified leads to enrollment opportunities 5. **Analytics**: Track recruitment performance by program and team ### Partner Management: 1. **Contact Management**: Maintain comprehensive contact databases 2. **Categorization**: Organize partners by type, industry, location 3. **Relationship Tracking**: Link partners to opportunities and activities 4. **Address Management**: Handle multiple addresses and contact methods ## ๐Ÿ› ๏ธ Configuration Required No additional configuration required beyond existing Odoo connection settings. All ISEP-specific fields are handled automatically based on database schema. ## ๐ŸŽฏ Testing Instructions 1. Ensure Odoo connection is configured in `.env` 2. Run `python test_crm.py` for basic functionality tests 3. Test individual tools through MCP client or Postman 4. Verify ISEP custom fields are properly handled ## ๐Ÿ”ฎ Future Enhancements - Activity creation and management tools - Email integration for lead communication - Calendar integration for follow-up scheduling - Advanced reporting and analytics dashboards - Bulk operations for lead management ## ๐Ÿ“ Breaking Changes None. This is a pure addition that doesn't modify existing functionality. ## ๐ŸŽ‰ Ready for Review This PR is ready for review and testing. All functionality has been implemented according to Universidad ISEP's requirements and follows MCP best practices.

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/iaisep/mcpserver'

If you have feedback or need assistance with the MCP directory API, please join our Discord server