Flywise MCP Server
Enables searching for equivalent replacement flights ranked by practical equivalence to the original ticket, comparing fare conditions, and generating airline agent requests.
README
Flywise
Live website: https://wuisabel-gif.github.io/Flywise/
Flywise is a TypeScript MVP for disruption recovery. It ranks replacement flights by practical equivalence to a traveler's original ticket instead of treating the current public fare as the whole answer. Live flight inventory is searched through Duffel, with a server-side integration that keeps the Duffel access token out of the browser.
The repository includes:
- A polished React/Vite passenger workspace.
- A transparent scoring engine for schedule, exchange cost, cabin, baggage, routing, and rebooking likelihood.
- Editable original-flight details, including route, date, airline, flight number, fare, baggage, and passengers.
- A secure Duffel adapter for real-time offers from its airline network, including American Airlines and hundreds of other carriers.
- Demo inventory that is clearly labeled and never substituted for another route after a live-search failure.
- An MCP Apps server with data-first search tools and a separate render tool for ChatGPT.
- Unit tests for ranking, flexibility filtering, and agent-request generation.
- A local Codex plugin that bundles the Flywise MCP connection with a reusable flight-recovery skill.
Architecture
Flywise keeps flight-search and equivalence logic in one API and MCP service, then exposes it through multiple passenger and agent experiences:
Flywise API + MCP
│
┌───────────┬───────┼─────────┬───────────┐
▼ ▼ ▼ ▼ ▼
Website ChatGPT Codex Cursor Claude
passenger UI app UI plugin plugin MCP
Codex plugin
The repo-local plugin lives in plugins/flywise-flight-recovery. It teaches Codex how to collect an original itinerary, search equivalent replacements, distinguish public price from exchange cost, compare fare conditions, and draft a request for an airline agent.
Start the local MCP server before using the plugin:
npm run build
npm run dev:server
The plugin connects to http://127.0.0.1:3000/mcp. Its marketplace catalog is stored in .agents/plugins/marketplace.json so the plugin can be installed and tested from this repository.
Local development
npm install
npm run dev
Open http://127.0.0.1:5173.
Enable live airline search
- Copy
.env.exampleto.envand add a Duffel test or live access token. - Run the API with
npm run dev:server. - Run the frontend with
VITE_FLYWISE_API_URL=http://127.0.0.1:3000 npm run dev.
The token is read only by the Express server and is never included in browser JavaScript. Flywise creates a Duffel offer request and normalizes the returned operating carrier, flights, routing, cabin, baggage, public price, and conditions before ranking the options.
Duffel integration
Flywise uses the Duffel Flights API as its first live inventory provider. The server sends the traveler's route, departure date, passenger count, cabin, and maximum connections to Duffel's Offer Requests API. Returned offers are converted into Flywise's normalized FlightOffer model before the equivalence engine ranks them.
Flywise website → Flywise Express API → Duffel → airline offers
↓
normalize and equivalence-rank
Required configuration:
| Variable | Used by | Purpose |
|---|---|---|
DUFFEL_ACCESS_TOKEN |
Express server | Authenticates private requests to Duffel. Never expose this through a VITE_ variable. |
VITE_FLYWISE_API_URL |
Browser build | Points the website to the deployed Flywise Express API. |
ALLOWED_ORIGINS |
Express server | Restricts which browser origins may call the API. |
Duffel results provide live public offers and prices. They do not by themselves confirm what an airline will charge to exchange an existing ticket. Flywise therefore labels the exchange cost as requiring airline confirmation while still comparing the offer's schedule, cabin, baggage, routing, and public price.
To build the widget and run the MCP server:
npm run build
npm run dev:server
The health route is http://127.0.0.1:3000/health and the MCP endpoint is http://127.0.0.1:3000/mcp.
Connect in ChatGPT Developer Mode
- Build and start the MCP server.
- Expose port 3000 through an HTTPS tunnel, such as
ngrok http 3000. - In ChatGPT, enable Developer Mode under Settings → Apps & Connectors → Advanced settings.
- Create a new app and use the public tunnel URL ending in
/mcp. - Refresh the app after changing tool descriptors, metadata, or the widget template.
MCP tools
search_equivalent_flights— data-only, ranked equivalent options.render_rebooking_results— renders the interactive Flywise widget after search.compare_fare_conditions— explains a selected offer's scoring and warnings.generate_airline_agent_request— produces a concise involuntary-reaccommodation request.
All tools are read-only and idempotent. Exchange costs are explicitly estimates until an airline confirms them.
Production boundary
GitHub Pages hosts only the frontend. Deploy render.yaml as a Render Blueprint (or deploy the same Node server elsewhere), set its DUFFEL_ACCESS_TOKEN, then add the backend URL as the GitHub repository variable FLYWISE_API_URL. The Pages workflow injects that URL at build time.
Duffel publicly lists American Airlines and 300+ other airlines. Delta does not appear in Duffel's current public airline directory; full Delta shopping requires a separate approved Delta/GDS partnership. The provider boundary in server/duffel.ts is intentionally isolated so another authorized provider can be added without changing the Flywise UI or scoring engine.
Flywise remains a decision assistant, not a universal ticket-exchange system. Search results are live public offers, but an existing ticket's exchange cost still depends on the issuing carrier, fare rules, waiver policy, booking-class inventory, interline agreements, and servicing authority. The UI therefore requires airline confirmation instead of presenting an unverified exchange price.
The visual specification is stored at design/flywise-concept.png.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。