eventpulse-mcp
Version:
EventPulse MCP Server - Hyper-local event-driven marketing campaigns for small businesses
256 lines (202 loc) โข 6.6 kB
Markdown
# EventPulse MCP Server
๐ **Hyper-local event-driven marketing campaigns for small businesses using AI**
EventPulse is a Model Context Protocol (MCP) server that generates culturally-aware marketing campaigns for festivals and events. Perfect for small businesses looking to engage their local communities with authentic, multilingual content.
## ๐ Features
- **๐ Multi-language Support**: Generate campaigns in Hindi, Gujarati, English, Tamil, Bengali, and Marathi
- **๐ญ Cultural Intelligence**: Leverages regional insights and cultural nuances
- **๐ Festival-Specific Content**: Optimized for Indian festivals and celebrations
- **๐ช Business-Specific Offers**: Tailored promotional content for different business types
- **๐ฑ Social Media Ready**: Content optimized for WhatsApp, Instagram, Facebook, and Twitter
- **โก Real-time Generation**: Fast AI-powered campaign creation
- **๐ง MCP Compatible**: Works with any MCP-compatible client (Claude, etc.)
## ๐ Supported Festivals
- ๐ช Diwali
- ๐ Holi
- ๐ Eid
- ๐ Navratri
- ๐๏ธ Raksha Bandhan
- ๐ Ganesh Chaturthi
- ๐ซ Karva Chauth
- ๐ Christmas
## ๐ช Supported Business Types
- ๐ฌ Sweet Shops
- ๐ Clothing Stores
- ๐ฝ๏ธ Restaurants
- ๐ Jewelry Shops
- ๐ฑ Electronics Stores
- ๐ Beauty Salons
- ๐ธ Flower Shops
- ๐ Gift Shops
## ๐ฆ Installation
### Prerequisites
- Node.js 18+
- npm or yarn
- OpenAI API key (optional - works with mock data for testing)
### Setup
1. **Clone the repository**
```bash
git clone <repository-url>
cd eventpulse-mcp
```
2. **Install dependencies**
```bash
npm install
```
3. **Configure environment**
```bash
cp .env.example .env
# Edit .env with your OpenAI API key (optional)
```
4. **Test the installation**
```bash
npm run test:manual
```
## ๐ง Usage
### As MCP Server
1. **Start the MCP server**
```bash
npm run mcp
```
2. **Configure in your MCP client** (e.g., Claude Desktop)
```json
{
"mcpServers": {
"eventpulse": {
"command": "node",
"args": ["path/to/eventpulse-mcp/src/mcp-server.js"],
"env": {
"OPENAI_API_KEY": "your-key-here"
}
}
}
}
```
### As REST API Server
1. **Start the API server**
```bash
npm start
```
2. **Make requests to the API**
```bash
curl -X POST http://localhost:3000/v1/generate-campaign \
-H "Content-Type: application/json" \
-d '{
"business_type": "sweet_shop",
"event": "diwali",
"language": "hindi",
"location": "Mumbai",
"goal": "increase_sales"
}'
```
## ๐ ๏ธ MCP Tools
### `generate_festival_campaign`
Generate a complete marketing campaign for a festival.
**Parameters:**
- `business_type` (required): Type of business
- `event` (required): Festival or event name
- `language` (required): Content language
- `location` (optional): Business location
- `goal` (optional): Marketing objective
- `budget` (optional): Budget level
**Example:**
```json
{
"business_type": "sweet_shop",
"event": "diwali",
"language": "hindi",
"location": "Mumbai",
"goal": "increase_sales"
}
```
### `get_festival_insights`
Get cultural insights and best practices for festival marketing.
**Parameters:**
- `event` (required): Festival name
- `region` (optional): Regional context
## ๐ API Endpoints
### `GET /`
Health check and server information
### `POST /v1/generate-campaign`
Generate marketing campaign
### `GET /docs`
API documentation
### Example Response
```json
{
"campaign_id": "ep_1704123456_abc123def",
"timestamp": "2024-01-01T10:00:00.000Z",
"campaign_content": {
"whatsapp_message": "๐ช เคฆเฅเคชเคพเคตเคฒเฅ เคเฅ เคถเฅเคญเคเคพเคฎเคจเคพเคเค! Special Diwali offers at our sweet shop! ๐ฌโจ",
"social_media_posts": [
"๐ชโจ Celebrating the Festival of Lights with traditional sweets and joy! Visit us for authentic Diwali treats. #Diwali #TraditionalSweets",
"๐ Special Diwali collection now available! Don't miss our exclusive festive offers. #DiwaliOffers #SweetTreats"
],
"hashtags": ["#Diwali", "#FestivalOfLights", "#TraditionalSweets", "#Mumbai"],
"promotional_offers": [
"Special Diwali collection: traditional sweets",
"Buy 2 get 1 free on selected items",
"Free gift wrapping with festive packaging"
]
},
"scheduling_suggestions": {
"optimal_time": "10:00 AM",
"campaign_duration": "5-7 days before festival",
"peak_engagement": "morning and evening hours"
}
}
```
## ๐งช Testing
```bash
# Run all tests
npm run test:all
# Test core functionality
npm run test:manual
# Test API server
npm test
# Test MCP functionality
npm run test:mcp
```
## ๐ง Development
### Project Structure
```
eventpulse-mcp/
โโโ src/
โ โโโ server.js # REST API server
โ โโโ mcp-server.js # MCP protocol server
โ โโโ campaign-generator.js # Core campaign logic
โ โโโ content-enhancer.js # Content enhancement
โ โโโ utils.js # Utility functions
โโโ data/
โ โโโ festivals.json # Festival data
โ โโโ templates.json # Content templates
โ โโโ regional-hashtags.json # Hashtag data
โโโ test/
โ โโโ test-manual.js # Manual functionality tests
โ โโโ test-server.js # API server tests
โ โโโ test-mcp-simple.js # MCP functionality tests
โโโ package.json
```
### Adding New Festivals
1. Add festival data to `data/festivals.json`
2. Add templates to `data/templates.json`
3. Update validation in `src/utils.js`
4. Add test cases
### Adding New Languages
1. Add language templates to `data/templates.json`
2. Add cultural context to festival data
3. Update validation in `src/utils.js`
4. Test with sample campaigns
## ๐ค Contributing
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Add tests
5. Submit a pull request
## ๐ License
MIT License - see LICENSE file for details
## ๐ Support
- ๐ Check the `/docs` endpoint for API documentation
- ๐งช Run tests to verify functionality
- ๐ Check logs for debugging information
---
**Made with โค๏ธ for small businesses and festival celebrations**