AI Assistant
MCP server that provides AI-powered tools including YouTube search, trip planning, notes management, web search, product price comparison, and clock/alarm/reminder features with email notifications.
README
AI Assistant — Merged Project (Chrono + AI-MCP-ASSISTANT)
Merge notes (read this first)
This project is the result of merging two separate projects into one app:
fastmcp_ai_assistant_updated("Chrono") — the base of this merge. Clock, stopwatch, alarms, reminders, sign-in/sign-up, email notifications, product-price comparison, and web search (via SerpAPI).AI-MCP-ASSISTANT("mcp-assistant") — contributed three tools that didn't exist in Chrono, now merged into this codebase:- YouTube search (
tools/youtube_tool.py) — YouTube Data API v3. - AI trip planner (
tools/trip_planner_tool.py+tools/serp_service.py) — real flights/hotels/places via SerpAPI, formatted into a day-wise itinerary by Groq. - Notes (
tools/notes_tool.py) — add / delete / list / summarize (summarization via Groq), rewritten from SQLAlchemy to this project's existingsqlite3+server/utils.connect_dbpattern so no new DB dependency was introduced.
- YouTube search (
Search: as requested, the merged app keeps Chrono's SerpAPI-based
google_search (tools/search_tool.py) as the one and only search tool.
AI-MCP-ASSISTANT's DuckDuckGo-based search (ddgs library) was not
carried over, to avoid having two different, inconsistent search
implementations side by side.
What was intentionally left behind / not merged, to keep a single, consistent architecture instead of running two backends side by side:
- AI-MCP-ASSISTANT's separate Node/Express backend and Flask API
(
backend/server.js,server/api.py) — this project already has a single FastAPI backend (server/api_server.py) that both the React frontend and the FastMCP tool server call into; the new tools were added there instead of standing up a second backend stack. - AI-MCP-ASSISTANT's Gemini-based MCP Host/Client CLI
(
host/main.py,client/mcp_client.py) — this project's ownserver/server.py(FastMCP) already serves the same purpose (exposing tools to any MCP-speaking LLM client), just with a different LLM/client pattern (Groq for trip-planner/notes formatting instead of Gemini for tool-selection). The new tools were added as@mcp.tool()s there. - The "History" activity-feed page/table from AI-MCP-ASSISTANT was
replaced by this project's existing per-feature history tables in
database/history.db(search_history, plus newyoutube_historyandtrip_historytables added during the merge).
New REST endpoints added to server/api_server.py:
| Method | Path | Purpose |
|---|---|---|
| GET | /api/youtube?query=...&max_results=5 |
YouTube search |
| POST | /api/trip-planner |
{origin, destination, days, departure_date?} → itinerary |
| GET | /api/notes |
List notes |
| POST | /api/notes |
{title?, content} → add a note |
| DELETE | /api/notes/{id} |
Delete a note |
| POST | /api/notes/summary |
{note_ids?} → AI summary of notes |
New MCP tools added to server/server.py: youtube_search, trip_planner,
notes_add, notes_delete, notes_list, notes_summarize.
New frontend pages/tabs added: YouTube, Trip planner, Notes
(frontend/src/components/YouTubePage.jsx, TripPlannerPage.jsx,
NotesPage.jsx), wired into Header.jsx and App.jsx, styled to match
the existing dark "Studio Grayscale" theme.
New environment variables (see .env.example): YOUTUBE_API_KEY (YouTube
Data API v3, free tier) and GROQ_API_KEY (Groq, free tier — used for the
trip-planner itinerary and notes summarization).
1. Backend setup
# from the project root
python -m venv venv
venv\Scripts\activate # Windows
# source venv/bin/activate # macOS/Linux
pip install -r requirements.txt
# create/upgrade the sqlite databases (safe to re-run any time)
python server/init_db.py
No new pip packages were needed for sign-in or email — both use only
Python's standard library (hashlib, secrets, smtplib).
.env file (project root)
A ready-to-copy template is included: .env.example — copy it to .env
and fill in your real values:
cp .env.example .env # macOS/Linux
copy .env.example .env # Windows
SERPAPI_KEY=your_serpapi_key
# Option A (recommended): Resend - HTTP email API, works over HTTPS (443)
RESEND_API_KEY=re_your_key_here
# Option B: SMTP - only used if RESEND_API_KEY above is blank
SMTP_HOST=smtp.gmail.com
SMTP_PORT=465
SMTP_USER=your_email@gmail.com
SMTP_PASSWORD=your_16_character_app_password
SMTP_FROM_NAME=Chrono Assistant
Why Resend is recommended: SMTP (ports 465/587) is frequently blocked
or intercepted by home/college/office networks and some antivirus "mail
scanning" features — this shows up as connection timeouts or
WRONG_VERSION_NUMBER SSL errors that have nothing to do with your
password being wrong. Resend sends over plain HTTPS (port 443), the exact
same protocol your browser already uses to load this app, so it works
even when SMTP doesn't.
Setting up Resend (2 minutes, no credit card):
- Sign up free at https://resend.com
- Dashboard → API Keys → create one → copy it
- Paste it as
RESEND_API_KEYin.env - On the free tier (no custom domain verified), Resend only delivers to the email address you signed up with — perfect for personal/testing use.
If you'd rather use Gmail SMTP: Gmail will reject your normal password
over SMTP — you need an App Password: Google Account → Security →
2-Step Verification (turn on) → App passwords → generate one → paste that
16-character value into SMTP_PASSWORD. If port 465 gives a connection
timeout, try SMTP_PORT=587 instead (the app automatically switches to
STARTTLS for any non-465 port).
If neither option is filled in, the app still works exactly as before (in-app alert + sound) — it just skips the email step and prints a warning in the terminal instead of crashing.
How to verify email is actually working (don't wait for a real alarm!)
- Start the backend:
python -m server.api_server. Watch the terminal — it now prints, right at startup:✅ Email is configured via Resend (HTTPS) - ..., or✅ Email is configured via SMTP - ..., or⚠️ Email is NOT configured - ...(meaning.envis missing/blank).
- In the frontend, sign in and open the Settings tab.
- Click "Send test email". This calls a dedicated endpoint
(
POST /api/test-email) that emails your signed-in address immediately and shows you the exact success or error message on screen — no need to wait for an alarm/reminder to fire. - Once the test email arrives, alarms and reminders will email you the same way automatically when they trigger.
Windows Notepad users: if you get "not configured" even after filling
in .env correctly, Notepad may have saved the file as UTF-16, which
python-dotenv can't read. Fix it in PowerShell:
(Get-Content .env -Raw) | Out-File -FilePath .env -Encoding ascii -NoNewline
Run the REST API that the React app uses:
python -m server.api_server
This starts on http://127.0.0.1:8000. Leave this terminal running.
2. What changed in this update
Sign up / Sign in (new: server/auth.py, database/auth.db)
- Passwords are hashed with PBKDF2-HMAC-SHA256 (never stored in plain text).
POST /api/auth/signup{name, email, password}→ creates the account and immediately signs you in (returns a token).POST /api/auth/login{email, password}→ returns{token, user}.POST /api/auth/logout→ invalidates the token.GET /api/auth/me→ resolves the current token back to a user (used to keep you signed in across page reloads).- The frontend stores the token in
localStorageand sends it asAuthorization: Bearer <token>on every alarm/reminder request.
Alarms & reminders are now per-user
alarmsandreminderstables gained auser_emailcolumn.- Creating an alarm/reminder now requires being signed in — it's stamped with your email automatically.
GET /api/alarms/GET /api/remindersonly return your own items.- Deleting/stopping/snoozing someone else's alarm or reminder is blocked
(403) — this is checked in
server/api_server.py. - Note:
/api/time,/api/stopwatch/*,/api/search, and/api/ecommerce*were intentionally left open (no sign-in required) — the stopwatch is a single shared instance with no per-user data, and search/price-compare don't store anything user-specific. Only alarms/reminders needed a real owner, since that's who gets emailed.
Email notifications (new: server/email_service.py)
- When an alarm rings (
check_alarms()intools/clock_tool.py) or a reminder becomes due (check_reminders()intools/reminder_tool.py), it now also emails the alarm/reminder's owner via SMTP, in addition to the existing in-app full-screen alert + sound. - Snoozed alarms and "Remind me later" reminders send a fresh email when they re-fire too.
Compare two products (fixed the single-product limitation)
tools/ecommerce_tool.pygainedcompare_two_products(product1, product2)alongside the originalcompare_product(product)(kept unchanged for backward compatibility with the FastMCP tool).- New endpoint:
POST /api/ecommerce/compare {product1, product2}→{product1: {name, results}, product2: {name, results}}. - The "Compare" page now has two input boxes and shows both products' prices side by side.
Visual redesign ("Studio Grayscale" template)
frontend/src/styles.cssandindex.htmlwere rebuilt around the template you sent (sample3_dark_studio_grayscale.html): Space Grotesk- Inter fonts, a near-black palette (
#0c0d0f/#17181bcards), pill tab navigation, and the rotating conic-gradient ring on the clock card.
- Inter fonts, a near-black palette (
- Only presentation changed — every existing component still calls the same backend endpoints as before (as requested, the backend logic for clock/stopwatch/alarm/reminder/search was not touched for this part).
MCP tools now call the REST API for search/ecommerce
server/server.py'ssearch,ecommerce, andecommerce_comparetools used to import and calltools/search_tool.py/tools/ecommerce_tool.pydirectly - duplicating the SerpAPI-calling logic in two places.- They now make an HTTP call to
server/api_server.py's own REST endpoints instead (the same ones the React app and Postman already use), so there's a single source of truth for anything touching SerpAPI. - Clock/Alarm/Reminder/Stopwatch tools were not changed - they don't use an external API key, so calling their Python functions directly is fine as-is.
- Requires
python -m server.api_serverto already be running for these 3 tools to work from an LLM/agent.
How to verify this actually works
Method 1 (recommended) — FastMCP Inspector, a Postman-like UI for MCP:
# Terminal 1
python -m server.api_server
# Terminal 2
fastmcp dev server/server.py
This opens a link like http://127.0.0.1:6274 — open it in your browser,
pick a tool (e.g. search), type a test input, and click Run. Real
results back = the tool → HTTP → SerpAPI chain is working end to end.
Method 2 (fallback) — a plain Python script:
python tests/test_mcp_tools_manually.py
Calls the tool functions directly in Python (bypassing the MCP protocol
itself) so you can see the same HTTP-call code path run and print its
result or exact error, without needing fastmcp dev.
3. Frontend setup
cd frontend
npm install
npm run dev
Open http://localhost:5173.
Frontend structure
frontend/src/
api.js -> fetch() wrapper; auto-attaches the auth token
context/AuthContext.jsx -> signup/login/logout state, persisted in localStorage
App.jsx -> shows Sign in/up when logged out, main app when logged in
components/
SignInPage.jsx -> email + password -> redirects into the app
SignUpPage.jsx -> name + email + password -> auto signs in
Header.jsx -> tabs + "Sign out" button
ClockPage.jsx -> rotating-ring clock card
StopwatchPage.jsx -> HH:MM:SS:MS input, live countdown
AlarmPage.jsx -> HH:MM AM/PM, repeat, weekdays, sound, list
ReminderPage.jsx -> title/description/date/time, notify dropdown, list
SearchPage.jsx -> query box -> tools/search_tool.py
EcommercePage.jsx -> TWO product boxes -> side-by-side price compare
YouTubePage.jsx -> query box -> tools/youtube_tool.py (merged in)
TripPlannerPage.jsx -> origin/destination/days -> tools/trip_planner_tool.py (merged in)
NotesPage.jsx -> add/list/delete/summarize -> tools/notes_tool.py (merged in)
AlertOverlay.jsx -> full-screen alert (Stop/Delete, Snooze, Remind later)
4. Quick demo checklist
python server/init_db.pythenpython -m server.api_servercd frontend && npm run dev- Open http://localhost:5173 → you land on Sign up → create an account → you're redirected straight into the app.
- Click Sign out (top right) → you're taken back to Sign in.
- Sign back in with the same email/password → back in the app.
- Set an alarm 1–2 minutes in the future. If
.envhas valid SMTP settings, check that inbox when it rings — you should get an email alongside the in-app alert. - Go to Compare, type two product names, click Compare prices — both products' results appear side by side.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.