JelteVrijhoef/deliverect-conversational-data
If you are the rightful owner of deliverect-conversational-data 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 providing natural language access to Deliverect restaurant analytics with business insights and controlled data access.
Deliverect Analytics MCP Server POC
A Model Context Protocol (MCP) server that provides natural language access to Deliverect restaurant analytics with business insights and controlled data access.
๐ Status: Core Implementation Complete
โ
Working MCP Server with all 5 tools implemented
โ
Business Intelligence with actionable insights
โ
Rate Limiting & Validation following security best practices
โ
Comprehensive Testing framework included
โณ Real Data Integration pending database setup
๐ฏ Quick Start
1. Environment Setup
# Clone and navigate to project
cd deliverect-mcp-poc
# Copy environment template
cp .env.example .env
# Edit .env with your credentials (see section below)
2. Install Dependencies
pip install -r requirements.txt
3. Run the MCP Server
python -m src.deliverect_mcp_server
4. Test the Server
python test_client.py "python -m src.deliverect_mcp_server"
๐ง Required Credentials
Update .env
file with these required variables:
# Deliverect API (get from your Deliverect Developer Account)
DELIVERECT_CLIENT_ID=your_client_id_here
DELIVERECT_CLIENT_SECRET=your_client_secret_here
DELIVERECT_ENV=sandbox # or 'production'
DELIVERECT_BASE_URL=https://staging-api.deliverect.com
# Database (PostgreSQL for analytics storage)
ANALYTICS_DB_URL=postgresql://user:password@localhost:5432/deliverect_analytics
# Cache (Redis for fast data access)
REDIS_URL=redis://localhost:6379/0
# Google Cloud (for BigQuery ETL - optional for testing)
GOOGLE_CLOUD_PROJECT=your_gcp_project_id
GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account-key.json
๐ ๏ธ Available MCP Tools
1. get_popular_items
Analyze most popular menu items with sales trends and business insights.
{
"timeframe": "week", # day, week, month, quarter
"location_id": null, # specific location or null for all
"limit": 10 # max 50 items
}
2. get_store_performance
Compare restaurant location performance with operational metrics.
{
"location_ids": ["loc_downtown", "loc_mall"], # max 10 locations
"timeframe": "month", # analysis period
"comparison": true # include comparisons
}
3. get_revenue_analytics
Analyze revenue trends and financial performance with forecasting.
{
"timeframe": "quarter", # week, month, quarter, year
"breakdown_by": "month", # day, week, month, category
"include_forecast": false # experimental forecasting
}
4. get_order_summary
Analyze order volume patterns and operational efficiency metrics.
{
"timeframe": "week", # analysis period
"include_patterns": true, # detailed pattern analysis
"breakdown_by_hour": false # hourly breakdown data
}
5. search_locations
Discover and list available restaurant locations for analysis.
{
"search_term": "downtown", # filter by name/address
"location_type": "restaurant", # restaurant, food_truck, etc.
"active_only": true, # only active locations
"include_metrics": false # basic performance metrics
}
๐ Security & Rate Limiting
- Rate Limited: 5 calls per minute per tool
- Query Limits: Max 90 days, 50 items, 10 locations per query
- Input Validation: All parameters sanitized and validated
- Controlled Access: NO direct database or API access from tools
- Pre-Aggregated Data: Fast responses from cached analytics
๐ Response Format
All tools return standardized responses with:
{
"success": true,
"data": {
# Tool-specific data (items, locations, etc.)
},
"business_context": {
"insights": [], # Actionable business insights
"benchmarks": {}, # Performance comparisons
"trends": [], # Notable trends identified
"recommendations": [] # Specific action items
},
"metadata": {
"data_freshness": "15min old",
"confidence": 0.95,
"source": "analytics_service",
"query_time_ms": 87
}
}
๐งช Testing
The included test client validates all functionality:
# Run comprehensive tests
python test_client.py "python -m src.deliverect_mcp_server"
# Tests include:
# โ
All 5 MCP tools
# โ
Error handling scenarios
# โ
Rate limiting behavior
# โ
Response format validation
๐๏ธ Architecture
LLM/Claude โ MCP Protocol โ Deliverect MCP Server โ Analytics Service โ Pre-Aggregated Data
Key Design Principles:
- Business-First: Every response includes actionable insights
- Controlled Access: Tools never query BigQuery/APIs directly
- Rate Limited: Prevents expensive operations and abuse
- Real Data Only: NO mock data (pending database setup)
๐ Current Limitations
- Mock Data: Tools return structured mock data pending database setup
- ETL Pipeline: BigQuery โ Analytics DB pipeline not yet implemented
- Docker: Containerization pending
- Real-Time Data: Currently simulated data freshness
๐ง Next Steps
- Database Setup - PostgreSQL + Redis infrastructure
- ETL Implementation - BigQuery extraction and aggregation
- Real API Integration - Connect to actual Deliverect endpoints
- Docker Deployment - Complete containerization
- Production Testing - Integration tests with live data
๐ Documentation
plan.md
- Comprehensive implementation planprogress.md
- Current status and completed milestonesCLAUDE.md
- Development guidelines and architecture requirementstest_client.py
- Testing and validation framework
๐ Troubleshooting
Server Won't Start
- Check all environment variables are set in
.env
- Verify Python dependencies installed:
pip install -r requirements.txt
- Check for port conflicts if using WebSocket mode
Tools Return Errors
- Verify
.env
configuration matches.env.example
- Check rate limiting - wait 1 minute between test runs
- Review server logs for detailed error information
Database Connection Issues
- Ensure PostgreSQL is running and accessible
- Verify
ANALYTICS_DB_URL
connection string - Check database permissions and network access
๐ค Contributing
This is a POC implementation following the requirements in CLAUDE.md
. Key development principles:
- NO Direct API Access - All tools use controlled analytics service
- Business Context Required - Every response must include insights
- Rate Limiting Enforced - Security and cost controls mandatory
- Real Data Only - NO mock data in production
๐ License
Internal POC - See organization licensing requirements.
๐ Ready to chat with your restaurant data through natural language queries!