flighttrack

flighttrack

MCP server for monitoring flight prices: users can track flights, set price thresholds, receive Telegram alerts on drops, and query current tracked flights and historical price trends via natural language.

Category
Visit Server

README

flighttrack

A self-hosted flight price monitor you can share with friends. Everyone talks to it two ways:

  • Telegram bot/track, /list, /stop, and instant push alerts the moment a tracked flight drops below its threshold.
  • Remote MCP server — add it as a custom connector in Claude and ask things like "any drops on my tracked flights?" or "what's the cheapest time to fly to Tokyo based on my history?"

Both read and write the same Postgres database, filled in by a background scraper that runs on a schedule.

How it works

  1. app/scheduler.py runs forever. Every CHECK_INTERVAL_MINUTES, it pulls every active tracked flight whose next check is due, scrapes a fresh price for it, stores the observation, and — if the price is at or below the user's threshold and they haven't been alerted for this flight recently — sends a Telegram alert.
  2. app/scraper.py wraps the faster-flights library, which queries Google Flights the same way its own web page does internally (a signed request, not a headless browser), so it's far lighter and less detectable than full browser automation. It reports back a status (ok / empty / blocked) so scraper failures don't get silently swallowed.
  3. app/telegram_bot.py is how people join. DMing the bot /start creates their account and hands back a personal MCP connector URL (with their token baked in). /track FROM TO YYYY-MM-DD [RETURN_DATE] PRICE [by:YYYY-MM-DD] adds a flight to watch in one line; /track with no arguments instead walks you through it - shows today's price for the route, then asks for your threshold and an optional buy-by deadline. The by: date / deadline is a decision cutoff - tracking auto-stops after it even if the price never dropped, useful when you want to buy well before the flight itself. Alerts list every offer at or under your threshold (not just the cheapest), each with a direct booking link where one can be built, plus a short buy-now-or-wait read based on that flight's own price history.
  4. app/mcp_server.py is a remote MCP server (Streamable HTTP transport). Each friend's connector URL is unique (https://yourhost/mcp?token=THEIR_TOKEN) so their tracked flights and history stay scoped to them — no shared login needed, and it doesn't depend on any Claude-side auth feature, since the token just rides along in the URL you give them.

Why this setup, specifically

  • Postgres, not SQLite — three processes (scheduler, bot, MCP server) all touch the database concurrently. Postgres handles that without the file-locking headaches SQLite has under concurrent writers.
  • A real always-on VPS, not free-tier serverless — the scraper needs to run on a schedule indefinitely and Postgres needs a persistent disk; serverless free tiers generally sleep or reset. A $5-6/mo box (Hetzner CX22, DigitalOcean basic droplet) is the simplest thing that actually stays up.
  • Query-param token, not the beta connector "request headers" feature — Claude's ability to attach a static auth header to a custom connector is still a slow beta rollout as of this writing, so it isn't something to depend on. A token embedded in the connector URL itself works today, for every friend, regardless of which Claude client or plan they're on.

Setup

1. Get a domain pointed at your server

Remote MCP servers must be reachable over public HTTPS — Claude connects to it from Anthropic's cloud, not from your friends' laptops. If you don't want to buy a domain, duckdns.org gives a free subdomain. Point it at your VPS's IP.

2. Create a Telegram bot

Message @BotFather on Telegram, /newbot, and copy the token it gives you into .env.

3. Configure

cp .env.example .env
# edit .env: TELEGRAM_BOT_TOKEN, POSTGRES_PASSWORD, PUBLIC_MCP_URL

4. Run it

docker compose up -d --build

This starts three containers (db, bot, mcp) plus the scheduler runs inside the bot container's process group (see docker-compose.yml).

5. Put HTTPS in front of it

Any reverse proxy that can auto-provision Let's Encrypt certs works — Caddy is the least config for this:

# /etc/caddy/Caddyfile
yourdomain.duckdns.org {
    reverse_proxy localhost:8000
}

6. Add friends

Have them DM your Telegram bot /start. It replies with their personal connector URL. They paste that into Claude at Settings → Connectors → Add custom connector.

What's here vs. what's a next step

This is a working skeleton, not a hardened production service. Before leaning on it hard, you'll want to:

  • Add retry/backoff in scraper.py for transient failures vs. real blocks.
  • Rotate/expire tokens (app/auth.py has the hook point).
  • Rate-limit the MCP track_flight tool so one person can't add hundreds of flights and blow through your scrape budget.
  • Swap the naive day-of-week average in get_recommendation for something better once you've got a few months of real data per route.

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured