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.
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
app/scheduler.pyruns forever. EveryCHECK_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.app/scraper.pywraps thefaster-flightslibrary, 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.app/telegram_bot.pyis how people join. DMing the bot/startcreates 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;/trackwith 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. Theby: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.app/mcp_server.pyis 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.pyfor transient failures vs. real blocks. - Rotate/expire tokens (
app/auth.pyhas the hook point). - Rate-limit the MCP
track_flighttool so one person can't add hundreds of flights and blow through your scrape budget. - Swap the naive day-of-week average in
get_recommendationfor something better once you've got a few months of real data per route.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。