DEV Community

Cover image for a bot which emails me daily
Archit Jagadeb
Archit Jagadeb

Posted on

a bot which emails me daily

Real learning comes from building, not just watching tutorials.

I recently completed Anthropic's two courses:

  • Introduction to ModelContextProtocol [link]

  • ModelContextProtocol: Advanced Topics [link]

After completing this course, I wanted to build something of my own, which would help me in my daily life chores.

Image

Why this project ?

Honestly? I am a lazy fellow and terrible at time management.But lately I have been realizing how indispensable discipline is in life. So I thought why not to make something which autonomously manages my day without me lifting a finger.

Every morning it dispatches a single comprehensive email covering:

  • πŸ“° Top news from my favourite sources
  • πŸ“… Calendar summary with personalized meal and gym suggestions
  • πŸ’ͺ Health analysis based on sleep, water intake and steps
  • πŸ’° Finance insights based on daily expenses

All powered by Groq API. Completely free. Running locally on my Mac.

Image

My Background

I am 19, currently in my first year of BTech CSE and have been coding since last 9 months.

Nine Months. That's it.

Before this project, I had worked extensively with Python's data science ecosystem and built a personal finance tracking application called ArthaX. But I wanted more. I wanted to learn deep about the AI systems, and I think learning about MCPs is one the very first step in my AI career.

Tech Stacks

  • Python
  • Groq API
  • Gmail via SMTP
  • MCP Python SDK
  • FastMCP

The Obstacles

  1. Model Confusion ->
    gemini-1.5-flash was deprecated, gemini-2.0-flash had zero quota in India, gemini-2.5-flash had a 20 request/day limitation. Eventually switched to Groq API which is completely free with no such restrictions.

  2. API Rate Limits ->
    I was testing so aggressively that I kept exhausting my quota mid-build. Had to exercise patience and return after the limits reset.

  3. Combining Everything ->
    The most formidable challenge was email_handler.py β€” orchestrating all modules simultaneously, resolving indentation errors, handling Unicode encoding failures in email, and ensuring prompts were correctly passed to the model.

  4. MCP Server Working Directory β€”>
    Claude Desktop launches the MCP server from a different directory, so all file paths had to be converted to absolute paths. A small but frustrating bug to track down!

Image

What I Learned

- Python vs C++
The syntax is different but the logic is the same. Coming from C++, I was surprised how simple Python functions and loops are β€” no brackets, no semicolons, just clean readable code.

- AI APIs
Gemini helped me understand how to interact with AI models during the build process, while Groq became my execution engine for the final product. Both taught me how to craft prompts that actually work.

- MCP in practice
The course taught me the theory, but building my own MCP server taught me how servers actually work β€” how tools are exposed, how clients connect, and how Claude Desktop integrates with your own code in real time.

- Automation
I had never set up a cron job before. Learning to schedule Python scripts at 7am and 9pm felt like giving my project a heartbeat.

- Never share your API key
I accidentally pasted my live Gemini API key in a chat. Revoked it within seconds but learned the hard way β€” always use .env files and never share secrets publicly.

[Github]
[LinkedIn]

Top comments (0)