india-flights-mcp
An MCP server for Indian domestic flights: live fares, day-of-travel flight status, airline fare rules and DGCA passenger rights with citations, and your saved travel preferences. It runs on your own computer, over stdio, with your own free API keys. Use it from Claude Desktop, Claude Code or any other MCP client.
A personal portfolio project, not affiliated with any airline, Google, SerpApi, AirLabs or DGCA. Source and full documentation: github.com/rkZ-10/travel-assistant.
What it does
| Tool | Backed by | Use it for |
|---|---|---|
search_flights |
Google Flights via SerpApi | Fares on a future date: one-way or round trip, class, nonstop, airlines, max price. Prices in INR |
get_booking_options |
SerpApi | Sellers and fare types for one itinerary, with a link to book on the seller's site |
get_flight_status |
AirLabs (optional) | Delay, gate and terminal for a flight in the next ~12 hours |
get_route_departures |
AirLabs (optional) | What's leaving on a route in the next ~12 hours |
get_api_usage |
local | API calls used this month against your budget |
search_policies |
local index | Baggage, fare types, change and cancellation fees, refunds, DGCA compensation: cited passages with the date each page was captured, and which airlines aren't covered |
list_policy_sources |
local | Which policy pages are indexed, when they were captured, how to add the rest, and how the latest index build went |
build_policy_index |
official airline and DGCA pages | Builds or updates the policy index in the background: the same as travel-rag ingest. Called only when you ask, or after Claude tells you it fetches those pages |
get_travel_preferences / update_travel_preferences |
local | Your defaults: home airport, airlines to prefer or avoid, stops, departure window, budget… |
It also offers a plan_trip prompt, and tells the model how to use the tools well: answer fare rules only from the
cited passages, say when an airline isn't covered, never invent prices or fees, and save preferences only with your
agreement. Nothing is booked: booking links open the seller's own site.
Install
You need uv (it fetches Python 3.12+ if needed). Nothing
else to install: uvx india-flights-mcp downloads and runs the server. To check it installs:
uvx india-flights-mcp --version
Run without options, it waits for an MCP client on stdin; your client starts it for you (below).
(pip install india-flights-mcp also works; it provides the same india-flights-mcp command plus travel-mcp
and travel-rag.)
API keys (free plans)
| Variable | Needed for | Get one | Free plan (at the time of writing) |
|---|---|---|---|
SERPAPI_KEY (needed) |
search_flights, get_booking_options |
serpapi.com | ~250 searches a month |
AIRLABS_API_KEY (optional extra) |
get_flight_status, get_route_departures |
airlabs.co | ~1,000 requests a month |
AirLabs is optional. Without AIRLABS_API_KEY the two live-status tools aren't offered at all, and the server
tells the model live status isn't available. Everything else works the same. Add the key later to turn them on.
The server counts your calls and stops at 90 % of each monthly budget, so a free plan isn't overrun. Results are
cached (searches 20 minutes, status 5 minutes), and cached answers are free; get_api_usage shows what's left. On a
bigger plan, raise the budgets with SERPAPI_MONTHLY_BUDGET and AIRLABS_MONTHLY_BUDGET. Without SERPAPI_KEY, the
search tools say so when called and the rest keep working.
Keys go in the env block of your MCP client's config (below). They're only sent to SerpApi and AirLabs.
Claude Desktop
One-click bundle: download india-flights-mcp-<version>.mcpb from the
releases page and open it (or Settings → Extensions →
Advanced settings → Install Extension…). Claude asks for your SerpApi key and, optionally, your AirLabs key, and
installs the Python dependencies itself; the first start takes a minute.
Or by config: open Settings → Developer → Edit Config and add this to claude_desktop_config.json, then fully quit and reopen
Claude:
{
"mcpServers": {
"india-flights": {
"command": "uvx",
"args": ["india-flights-mcp"],
"env": {
"SERPAPI_KEY": "your-serpapi-key",
"AIRLABS_API_KEY": "your-airlabs-key"
}
}
}
}
No AirLabs key? Leave out the AIRLABS_API_KEY line (and the comma before it).
If Claude reports it can't find uvx, put its full path in command (run where uvx on Windows or which uvx on
macOS and Linux to find it).
Claude Code
claude mcp add india-flights --scope user \
--env SERPAPI_KEY=your-serpapi-key --env AIRLABS_API_KEY=your-airlabs-key \
-- uvx india-flights-mcp
Without an AirLabs key, drop --env AIRLABS_API_KEY=.... --scope user makes it available in every project; leave it out to add it to the current project only. Check it
with claude mcp list.
First run: build the policy index
Fare-rule and refund answers come from a local index of official airline pages and DGCA rules. It starts empty. Build it once, either way:
-
Ask Claude to build the policy index. It calls
build_policy_index, which runs in the background (a minute or two; ask "is the policy index ready?" to check). Nothing else to install, so this suits the Claude Desktop bundle. -
Or from a terminal:
uvx --from india-flights-mcp travel-rag ingest uvx --from india-flights-mcp travel-rag sources
Both fetch only the official pages this package lists, check each site's robots.txt first, identify themselves honestly, and read hand-saved pages from your disk. The first build downloads the embedding model, about 70 MB, which then runs locally (no API key, nothing sent anywhere). The first install of the server itself is also a few hundred MB of dependencies (ONNX Runtime, NumPy). Rebuild every month or two; answers warn when a page was captured more than 60 days ago.
Which airlines are covered
| Airline | How its pages get into the index |
|---|---|
| Akasa Air, Alliance Air, DGCA rules | Fetched automatically by ingest |
| IndiGo (4 pages), Air India (2), Air India Express (2), SpiceJet (1) | Saved by hand from a browser: these sites block automated clients, disallow them in robots.txt, or build the page with JavaScript |
| Star Air, Fly91 | Not covered yet. The server says so instead of guessing |
Saving the browser-only pages
save-pages walks you through them, one at a time:
uvx --from india-flights-mcp travel-rag save-pages
For each page that's missing or older than 60 days, it opens the page in your own browser and tells you the file name and how to save it. Then it waits for the file to appear in your Downloads folder, checks it, and files it in your policy pages folder under the right name. You do the visiting and saving; the tool never fetches these pages itself and never drives the browser.
How to save each one (press Ctrl+S, or Cmd+S on a Mac):
- most pages: "Webpage, HTML only";
- Air India Express's baggage FAQ: "Webpage, Complete" (the page is built by JavaScript; the
_filesfolder that comes with it is moved too); - Air India Express's fees: the PDF itself (its download button), not a printout.
Each saved file is checked with the same tests ingest uses. A bot-check page, a cookie wall or an empty
JavaScript shell is rejected with the reason, and you can retry or skip. Your previous copy is kept until a new one
passes. When it's done, it prints a summary and indexes what you saved.
| Option | Use |
|---|---|
--all |
Re-save every hand-saved page, even fresh ones |
--only ID [ID ...] |
Just these pages (ids from travel-rag sources) |
--downloads DIR |
Your browser saves somewhere other than ~/Downloads |
--timeout SEC |
How long to wait for each file (default 300) |
--no-ingest |
Don't index afterwards; run travel-rag ingest yourself |
travel-rag sources lists every page with its status and suggests save-pages when some are missing or stale.
You can also save a page by hand: sources prints the exact file path for each one.
ingest fetches only the automatic sources. It identifies itself honestly as india-flights-mcp, respects
robots.txt, and never pretends to be a browser. Saved pages stay on your computer.
The DGCA refund rules in the index are the 2019 version, which DGCA revised in March 2026. Answers flag this.
Where your data is stored
Everything stays in a per-user folder:
| System | Folder |
|---|---|
| Windows | %LOCALAPPDATA%\india-flights-mcp |
| macOS | ~/Library/Application Support/india-flights-mcp |
| Linux | ~/.local/share/india-flights-mcp (or $XDG_DATA_HOME/india-flights-mcp) |
It holds the API cache and monthly call counts (travel_mcp.sqlite3), the policy index (policies.sqlite3), the
embedding model (models/), your preferences (preferences.json, with a change log), and the policy pages folder
(rag/: snapshots/ from ingest, manual/ for pages you save). Set TRAVEL_MCP_DATA_DIR to use a different
folder, or TRAVEL_MCP_RAG_DIR to move just the policy pages. Delete the folder to start fresh.
Limits
- Fares come from Google Flights through SerpApi and can differ from the airline's own site. A search price usually means the airline's basic fare; the exact fare type shows when you book.
- Flight status covers roughly the next 12 hours only.
- Policy answers are only as current as the pages you captured, and only cover the airlines listed above.
More
- MCP server documentation: tools, quotas, validation, configuration
- Policy index (RAG): sources, extraction, retrieval, freshness
- Developing from a checkout
- Issues
MIT licence.
Metadata
Release files for india-flights-mcp 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| india_flights_mcp-0.1.1.tar.gz | 47.7 kB | Without provenance | Details for india_flights_mcp-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| india_flights_mcp-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for india_flights_mcp-0.1.1-py3-none-any.whl |
Total release size: 106.7 kB
Release files / india_flights_mcp-0.1.1.tar.gz
| Download URL | india_flights_mcp-0.1.1.tar.gz |
|---|---|
| Size | 47.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2fc1e534cb35c1ffbf959ee859643d37fd2ead81f259ed25d5d60c912812bb67
|
|
BLAKE2b-256 checksum How to use checksums |
35775c2a1e2b8e08477163f1a4c86b323bab9d7ffc748fb9d2bcffd3a20cf2af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Release files / india_flights_mcp-0.1.1-py3-none-any.whl
| Download URL | india_flights_mcp-0.1.1-py3-none-any.whl |
|---|---|
| Size | 58.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
670e5ca9fef21f2a5f1dbb41e31a0c4b3e63d1ad2582f2799c80d006ecbf4e1f
|
|
BLAKE2b-256 checksum How to use checksums |
4390a44bbef14ddff438ec71b90dc27dbb5a9c15d269476505083ce8c95cfb04
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Security for india-flights-mcp 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.