An AI Agent that helps you organize your study schedule, LeetCode practice, and daily habits — built with Python, MCP, and Starlette.
- Fetch school schedule from API.
- Plan smart LeetCode practice sessions.
- Maintain habits using RAG (Retrieval-Augmented Generation).
- Real-time streaming responses with SSE.
git clone https://github.com/nax-handle/mcp.git
cd mcp
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activatepip install -r requirements.txtCreate a .env file in the root folder:
OPENAI_API_KEY=your-openai-api-key
DATABASE_URL=your-database-url
DEBUG=truemcp run server.pyBy default, the app will run on: http://localhost:8000
.
├── app/
│ ├── agents/ # MCP Agents
│ ├── services/ # External API calls (School, LeetCode, Habit...)
│ ├── schemas/ # Pydantic models
│ ├── main.py # FastAPI/Starlette app
├── .env
├── requirements.txt
└── README.mdcurl http://localhost:8000/schedule?user_id=123The response will be in application/json or streamed via SSE if requested.
flowchart TD
A[User Request] --> B{Agent}
B --> C[Get School Schedule]
B --> D[Get LeetCode Tasks]
B --> E[RAG: Get Habit Data]
C & D & E --> F[Planner]
F --> G[Return Optimized Plan]
- The project uses MCP (Multi-agent Control Plane) to manage complex logic in a modular fashion.
- It's easy to extend and integrate with other APIs (Notion, Google Calendar, Zalo Reminder, etc.).