Burak-Akca/AI-Powered-Task-Management-System-With-MCP-Server
If you are the rightful owner of AI-Powered-Task-Management-System-With-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.
The Model Context Protocol (MCP) server is designed to facilitate seamless integration and interaction between AI tools and applications, providing a robust framework for task management and automation.
send_email
Sends an email using Gmail's SMTP service.
add_note
Adds a new note with a title and optional content.
list_notes
Retrieves the most recent notes from the database.
start_notes_app
Starts the Django notes app via Docker and opens it in the browser.
š¤ Personal Assistant - AI-Powered Task Management System With MCP Server
A comprehensive personal assistant built with Django, FastMCP, and Docker that provides intelligent task management, note-taking, email automation, weather updates, news aggregation, and reminder functionality.
⨠Features
šÆ Core Functionality
- Smart Note Management ā : Create, list, and manage notes with automatic database handling
- Email Automation ā : Send emails via SMTP with Gmail integration
Service API
- News Aggregation š: Fetch latest news headlines by category and country (Coming Soon)
- Reminder System š: Set time-based reminders with background processing (Coming Soon)
- Weather Intelligence š: Get detailed weather forecasts and alerts using National Weather (Coming Soon)
š ļø Technical Features
- FastMCP Integration: Model Context Protocol for seamless AI tool interaction
- PostgreSQL Database: Robust data persistence with automatic connection retry
- Docker Compose: Multi-service orchestration with health checks
- Async Operations: Non-blocking operations for better performance
- Error Handling: Comprehensive error handling with graceful fallbacks
šļø Architecture
System Components
āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā
ā FastMCP ā ā Django Web ā ā PostgreSQL ā
ā Assistant āāāāāŗā Application āāāāāŗā Database ā
ā (Tools) ā ā (Notes UI) ā ā (Docker) ā
āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā
ā ā ā
ā ā ā
ā¼ ā¼ ā¼
āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā
ā External ā ā Docker ā ā Docker ā
ā APIs ā ā Compose ā ā Compose ā
ā (Gmail SMTP) ā ā (Orchestration)ā ā (Orchestration) ā
āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā
Tool Ecosystem
Tool | Function | Status | Description |
---|---|---|---|
notes_tool.py | Note Management | ā Active | Create, list, and manage notes with web UI |
email_tool.py | Email Sending | ā Active | Send emails via SMTP with async support |
weather_tool.py | Weather Data | š Coming Soon | Get forecasts and alerts from NWS API |
news_tool.py | News Headlines | š Coming Soon | Fetch news by category and country |
reminder_tool.py | Reminders | š Coming Soon | Set time-based reminders |
š Quick Start
Prerequisites
- Docker and Docker Compose
- Python 3.11+ (for local development)
- PostgreSQL (handled by Docker)
1. Clone and Setup
git clone https://github.com/Burak-Akca/AI-Powered-Task-Management-System-With-MCP-Server
cd AI-Powered-Task-Management-System-With-MCP-Server
2. Environment Configuration
Create a .env
file in the project root:
# Database Configuration
POSTGRES_DB=notedb
POSTGRES_USER=noter
POSTGRES_PASSWORD=noterpass
DB_NAME=notedb
DB_USER=noter
DB_PASSWORD=noterpass
DB_HOST=db
DB_PORT=5432
# Application Settings
DEBUG=True
3. Development Setup
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Install MCP server (required for Claude integration)
uv run mcp install assistant.py
# Run Django migrations
docker compose exec web python manage.py migrate
# Access database (optinal)
docker compose exec db psql -U noter -d notedb
# Start all services
docker compose up --build -d
4. MCP Server Installation & Configuration
After installing dependencies in your virtual environment, run the MCP server installation command:
uv run mcp install assistant.py
This command performs the following operations to run assistant.py
in an MCP-compatible manner:
- Isolated Python Environment: Uses
uv
to run the MCP command in an isolated Python environment - MCP Server Registration: Applies the
mcp install assistant.py
command to load or register the MCP server withinassistant.py
- Automatic Configuration: Automatically registers the MCP server to your Claude configuration file
Manual Configuration (if needed)
If you encounter errors with the default configuration, manually update your Claude Desktop config file with the following:
{
"mcpServers": {
"personal_assistant": {
"command": "uv",
"args": [
"--directory",
"give project root directory path here",
"run",
"assistant.py"
]
}
}
}
Note: Replace "give project root directory path here"
with your actual project root directory path.
5. Access the Application
- Web Interface: http://localhost:8001
- Assistant API: Running on default FastMCP port
š ļø Tool Usage
š Notes Management ā Available Now
š ļø Tool: add_note
š Description: Adds a new note with a title and optional content.
š¬ Example prompt:
Create a new note with the title "Meeting Summary" and the content "Discussed project deadlines and assigned tasks to the team."
# Add a new note
add_note(title="Meeting Notes", content="Important discussion points...")
š ļø Tool: list_notes
š Description: Retrieves the most recent notes from the database.
š¬ Example prompt:
Show me the notes.
# List recent notes
list_notes(limit=10)
š ļø Tool: start_notes_app
š Description: Starts the Django notes app via Docker and opens it in the browser.
š¬ Example prompt:
Start the notes application and open it in the browser.
# Start the notes web application
start_notes_app()
š§ Email Automation ā Available Now
š ļø Tool: send_email
š Description: Sends an email using Gmail's SMTP service.
š Required fields:
to_email
: Recipient's email addresssubject
: Subject of the emailbody
: The body content of the messagefrom_email
: Sender's Gmail addresspassword
: Gmail App Password (not your regular account password)
š”ļø Important: If you are using Gmail, you must generate an App Password and use that instead of your normal account password. This is required when two-factor authentication is enabled.
š¬ Example prompt:
Send an email to example@gmail.com with the subject "Weekly Sync" and the message "Meeting starts at 10 AM sharp." Use my Gmail address example@customdomain.com and the app password I provided.
# Send an email
send_email(
to_email="recipient@example.com",
subject="Important Update",
body="This is the email content...",
from_email="your-email@gmail.com",
password="your-app-password"
)
š¤ļø Weather Information š Coming Soon
# Get weather forecast
get_forecast(latitude=40.7128, longitude=-74.0060)
# Get weather alerts
get_alerts(state="NY")
š° News Headlines š Coming Soon
# Get general news
get_news_headlines(category="general", country="us")
# Get technology news
get_news_headlines(category="technology", country="us")
ā° Reminder System š Coming Soon
# Set a reminder
set_reminder(
date="2024-01-15 14:30",
message="Team meeting at 2:30 PM"
)
Service Management
# View logs
docker compose logs -f
# Restart services
docker compose restart
# Stop all services
docker compose down
# Rebuild and start
docker compose up --build -d
š Project Structure
personal_assistant/
āāā š assistant.py # Main FastMCP assistant
āāā š notes_tool.py # Note management tools
āāā š email_tool.py # Email automation
āāā š compose.yaml # Docker Compose configuration
āāā š requirements.txt # Python dependencies
āāā š Dockerfile # Container configuration
āāā š src/ # Django application
ā āāā š NoteApp/ # Django project settings
ā āāā š notes/ # Notes app
ā āāā š manage.py # Django management
āāā š utils/ # Utility modules
ā āāā š get_connection.py # Database connection with retry
āāā š README.md # This file
š API Integration
FastMCP Protocol
The assistant uses the Model Context Protocol (MCP) for seamless AI integration with Claude and other MCP-compatible clients:
from mcp.server.fastmcp import FastMCP
mcp = FastMCP("personal_assistant")
# Register active tools
mcp.tool()(send_email)
mcp.tool()(add_note)
mcp.tool()(list_notes)
mcp.tool()(start_notes_app)
# Future tools (commented out for now)
# mcp.tool()(set_reminder)
# mcp.tool()(get_forecast)
# mcp.tool()(get_alerts)
# mcp.tool()(get_news_headlines)
External APIs
- Gmail SMTP ā : Email sending capabilities (Currently Active)
- National Weather Service š: Free weather data and alerts (Coming Soon)
- NewsAPI š: News headlines and articles (Coming Soon)
š³ Docker Configuration
Services
- web: Django application (port 8001)
- db: PostgreSQL database (port 5432)
Health Checks
healthcheck:
test: ["CMD-SHELL", "pg_isready -U noter -d notedb"]
interval: 5s
timeout: 5s
retries: 10
Networks
- notenet: Internal network for service communication
š Security & Configuration
Environment Variables
- Database credentials
- API keys for external services
- Debug settings
šØ Troubleshooting
Common Issues
-
Database Connection Failed
# Check if database is running docker compose ps # View database logs docker compose logs db
-
Port Already in Use
# Check what's using the port (Windows) netstat -ano | findstr :8001 # Check what's using the port (Linux/macOS) sudo netstat -tuln | grep 8001 # Stop conflicting services docker compose down
š License
This project is licensed under the MIT License. See the file for details.
š Acknowledgments
- FastMCP: For the Model Context Protocol implementation
- Django: For the web framework
- PostgreSQL: For the database system
- Docker: For containerization
š Support
- Issues: GitHub Issues
- Documentation: This README and inline code comments
- Community: Check our
Made with ā¤ļø for intelligent task management and productivity enhancement.