Daily Activity Scheduler with MCP Server
A modern, full-stack web application for managing daily activities with a beautiful timeline interface, enhanced with MCP (Model Context Protocol) server integration for AI assistant capabilities.
🎥 Demo Video
Watch the application in action:
📹 View Demo Video on Google Drive
> Note: The demo video is also available locally in the Video Demo/ folder. Due to GitHub's file size limits, the video file is not included in the repository.
🚀 Features
Core Application
- Timeline View: Visual representation of daily activities with duration-based blocks
- Real-time Updates: WebSocket integration for live updates across sessions
- Activity Management: Create, edit, delete, and mark activities as complete
- Date Navigation: Easy date selection with previous/next day navigation
- Responsive Design: Mobile-first design that works on all devices
- Dark Theme: Beautiful dark interface with glass morphism effects
MCP Server Integration
- AI Assistant Tools: Full integration with AI assistants through MCP protocol
- Activity Management: AI can create, update, and manage your activities
- Smart Scheduling: AI can help plan and organize your day
- Natural Language: Interact with your schedule using natural language commands
🛠️ Tech Stack
Frontend
- Next.js 15 with App Router
- TypeScript for type safety
- Tailwind CSS for styling
- Lucide React for icons
- Axios for API calls
Backend
- FastAPI for high-performance API
- SQLAlchemy for database ORM
- SQLite for local database
- WebSockets for real-time updates
- Pydantic for data validation
MCP Server
- Model Context Protocol for AI integration
- Python MCP server implementation
- RESTful API integration with FastAPI backend
📦 Installation
Prerequisites
- Node.js 18+
- Python 3.8+
- pip (Python package manager)
Backend Setup
- Navigate to the backend directory:```bash
cd daily-scheduler/backend
2. Install Python dependencies:```bash
pip install -r requirements.txt
- Start the FastAPI server:```bash
python main.py
The API will be available at `http://localhost:8000`
### Frontend Setup
1. Install Node.js dependencies:```bash
npm install
- Start the development server:```bash
npm run dev
The application will be available at `http://localhost:3000`
### MCP Server Setup
1. Install MCP server dependencies:```bash
pip install -r mcp_requirements.txt
- Start the MCP server:```bash
python mcp_server_gemini.py
## 🚀 Quick Start
### Option 1: Use Batch Files (Windows)
1. Run `start-backend.bat` to start the FastAPI server
2. Run `start-frontend.bat` to start the Next.js development server
3. Run `start_mcp_server.bat` to start the MCP server
### Option 2: Manual Start
1. Start backend: `cd daily-scheduler/backend && python main.py`
2. Start frontend: `npm run dev`
3. Start MCP server: `python mcp_server_gemini.py`
## 🤖 AI Assistant Integration
The MCP server provides AI assistants with powerful tools to manage your schedule:
### Available Tools
- **get_activities(date_str)**: Get all activities for a specific date
- **create_activity(title, start_time, end_time, activity_date)**: Create a new activity
- **update_activity(activity_id, ...)**: Update an existing activity
- **delete_activity(activity_id)**: Delete an activity
- **toggle_activity_completion(activity_id)**: Toggle activity completion status
- **get_today_activities()**: Get all activities for today
- **get_activities_summary(date_str)**: Get a summary with statistics
- **search_activities(query, date_str)**: Search activities by title
### Example AI Interactions```
AI: "Create a team meeting from 2:00 PM to 3:00 PM today"
AI: "What activities do I have scheduled for tomorrow?"
AI: "Mark my 10 AM appointment as completed"
AI: "Find all meetings scheduled this week"
📡 API Endpoints
Activities
GET /activities/{date}- Get activities for a specific datePOST /activities- Create a new activityPUT /activities/{id}- Update an activityDELETE /activities/{id}- Delete an activity
WebSocket
WS /ws- Real-time updates connection
🗄️ Database Schema```sql
CREATE TABLE activities (
id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT NOT NULL,
start_time TEXT NOT NULL,
end_time TEXT NOT NULL,
activity_date TEXT NOT NULL,
completed INTEGER DEFAULT 0,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);
## 🎨 Features Overview
### Timeline Interface
- Visual timeline with activity blocks
- Duration-based height calculation
- Color-coded completion status
- Hover effects and animations
### Activity Management
- Add new activities with title, start time, and end time
- Edit existing activities
- Mark activities as complete/incomplete
- Delete activities with confirmation
### Date Navigation
- Date picker for easy date selection
- Previous/Next day buttons
- "Today" quick access button
- Responsive date display
### Real-time Updates
- WebSocket integration for live updates
- Automatic refresh when activities change
- Multi-session synchronization
### AI Integration
- Natural language activity creation
- Smart scheduling suggestions
- Automated activity management
- Voice command support (through AI assistants)
## 🔧 Configuration
### Environment Variables
- `NEXT_PUBLIC_API_URL`: Backend API URL (default: http://localhost:8000)
### Database
- SQLite database file: `daily_scheduler.db`
- Automatic table creation on first run
- Data persistence across restarts
### MCP Server Configuration
- Backend API URL: `http://localhost:8000`
- Configurable through `mcp_server_gemini.py`
## 📱 Mobile Support
The application is fully responsive and optimized for mobile devices:
- Touch-friendly interface
- Responsive grid layouts
- Mobile-optimized modals
- Swipe gestures support
## 🎯 Usage
### Web Application
1. **Select a Date**: Use the date picker or navigation buttons
2. **Add Activities**: Click "Add Activity" to create new scheduled items
3. **Manage Activities**: Edit, complete, or delete activities as needed
4. **View Timeline**: See your day's schedule in a visual timeline format
### AI Assistant Integration
1. **Connect AI Assistant**: Configure your AI assistant to use the MCP server
2. **Natural Language Commands**: Use natural language to manage your schedule
3. **Smart Planning**: Let AI help plan and organize your activities
4. **Automated Management**: AI can handle routine scheduling tasks
## 🚀 Deployment
### Backend Deployment
- Use uvicorn with gunicorn for production
- Configure environment variables
- Set up database migrations
### Frontend Deployment
- Build for production: `npm run build`
- Deploy to Vercel, Netlify, or any static hosting
- Configure API URL for production backend
### MCP Server Deployment
- Deploy as a standalone service
- Configure for production backend URL
- Set up monitoring and logging
## 🧪 Testing
The project includes comprehensive testing:
### Backend Tests```bash
python -m pytest tests/
Frontend Tests```bash
npm test
### Integration Tests```bash
python test_mcp_final.py
📁 Project Structure```
├── daily-scheduler/ # Main Next.js application
│ ├── backend/ # FastAPI backend
│ ├── src/ # Frontend source code
│ └── public/ # Static assets
├── Video Demo/ # Demo video
├── mcp_server_gemini.py # MCP server implementation
├── tests/ # Test files
├── *.bat # Windows batch files for easy startup
└── requirements.txt # Python dependencies
```
🤝 Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
📄 License
This project is open source and available under the MIT License.
🔗 Links
- GitHub Repository: https://github.com/Bahadurahmedkhan/MCPSERVER
- Demo Video: View on Google Drive or locally in
Video Demo/folder - Documentation: See individual README files in project directories
🆘 Support
For support and questions:
- Create an issue in the GitHub repository
- Check the documentation in the project files
- Review the test files for usage examples
Built with ❤️ using Next.js, FastAPI, and MCP Protocol
