variflight-mcp — Claude Code MCP server: flights and weather
VariFlight's official MCP server puts flight search, connections, fares and airport weather inside your coding agent. An API key is required.
claude mcp add variflight-mcp -e VARIFLIGHT_API_KEY=<VARIFLIGHT_API_KEY> -- npx -y @variflight-ai/variflight-mcpWhat variflight-mcp does
Eight tools land in your agent. You can look up direct flights between two cities or airport codes on a given date, pull a single flight by its number, and list connecting options for a longer route. A separate tool covers comfort: on-time performance, aircraft type, cabin layout, meals and entertainment. There is also live aircraft tracking by tail number, a three-day airport weather forecast, an itinerary summary with the lowest fare and shortest duration, and raw cabin-level pricing between two cities.
It runs through npx, so nothing needs to stay running locally. You do need a VariFlight key, created in the console at ai.variflight.com; new accounts get ¥50 in trial credits. The key goes into VARIFLIGHT_API_KEY. The same tools are offered as a remote server over streamable HTTP, which skips the local process entirely, and clients with OAuth 2.1 can connect without a key and sign in when asked.
Paging is available on searchFlightsByDepArr and getFlightTransferInfo through limit, offset and detail. Setting detail: "summary" trims each result to its core fields, while full is the default and returns everything. Every page is billed as its own call, so on busy routes a small limit with summary keeps both the response and the bill down. One rule on codes: don't mix a city code and an airport code on the same side of a query — BJS for departure and PEK for arrival in one request won't work.
What it helps with
- find direct flights between two cities on a given date
- build a connecting itinerary for a long-haul route
- compare cabin-level fares and spot the cheapest option
- check on-time performance and cabin layout for a specific flight
- get a three-day weather forecast for an airport
Example prompts for the agent
- Find direct flights from
PEKtoSHAon 2024-03-20, summary detail only - Where is aircraft
B2021right now - Suggest itineraries from
BJStoSHAon 2025-04-20 with the lowest price
How to install variflight-mcp
Platform CLI
claude mcp add variflight-mcp -e VARIFLIGHT_API_KEY=<VARIFLIGHT_API_KEY> -- npx -y @variflight-ai/variflight-mcpReplace <…> with your own values
Platform CLI
codex mcp add variflight-mcp --env VARIFLIGHT_API_KEY=<VARIFLIGHT_API_KEY> -- npx -y @variflight-ai/variflight-mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"variflight-mcp": {
"command": "npx",
"args": [
"-y",
"@variflight-ai/variflight-mcp"
],
"env": {
"VARIFLIGHT_API_KEY": "<VARIFLIGHT_API_KEY>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"variflight-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@variflight-ai/variflight-mcp"
],
"env": {
"VARIFLIGHT_API_KEY": "<VARIFLIGHT_API_KEY>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e VARIFLIGHT_API_KEY=<VARIFLIGHT_API_KEY> variflight-mcp npx -y @variflight-ai/variflight-mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about variflight-mcp
How do I install variflight-mcp in Claude Code?
Run claude mcp add variflight-mcp -e VARIFLIGHT_API_KEY=<VARIFLIGHT_API_KEY> -- npx -y @variflight-ai/variflight-mcp, replacing the placeholder with the key from your ai.variflight.com console.
What does variflight-mcp do?
It hands your agent VariFlight tools: flight search by route or flight number, connections, fares, a comfort index, live aircraft position by tail number, and airport weather.
Do I need an API key, and can I skip the local process?
The stdio setup needs VARIFLIGHT_API_KEY. The same tools are also served remotely over streamable HTTP, and OAuth 2.1 clients can connect without a key and sign in on prompt.