travelpayouts-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@travelpayouts-mcp Find cheap flights from Moscow to Istanbul next month"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
travelpayouts-mcp
MCP-сервер для Travelpayouts / Aviasales: дешёвые билеты, календарь низких цен, спецпредложения, популярные направления и создание партнёрских ссылок — прямо в Claude Desktop / Claude Code / Cursor / VS Code / DSH.
0 зависимостей — только Python standard library (3.9+), ставится без pip.
2 API в одном сервере: Aviasales Data API (кэш цен) + Partner Links API (брендовые короткие ссылки с
sub_id).Docker MCP Toolkit — готовый catalog-entry, работает с вашим профилем Docker MCP.
Офлайн-тесты — 52 теста на stdlib
unittest, мок-API, без токена и сети.Комплаенс из коробки — в README описано, что можно и нельзя по правилам Travelpayouts и GitHub (без спама и «серых» ссылок).
Независимый open-source проект. Не аффилирован с Travelpayouts/Aviasales. Партнёрские ссылки, созданные сервером, должны сопровождаться раскрытием («affiliate link» / «партнёрская ссылка») по правилам FTC/EU и Travelpayouts.
Что внутри
# | Инструмент | Что делает | API |
1 |
| Дешёвые билеты на маршрут/даты, с пересадками и ссылкой поиска |
|
2 |
| Самый дешёвый билет на каждый день месяца |
|
3 |
| Цены по дням месяца с группировкой по пересадкам |
|
4 |
| Аномально дешёвые предложения — сырьё для «deal of the day» |
|
5 |
| Откуда летят в заданный город (для лендингов направлений) |
|
6 |
| Популярные направления из города |
|
7 |
| Свежие найденные цены за период, сортировка по цене |
|
8 |
| Город/название → IATA-код (города + аэропорты) |
|
9 |
| Собрать deep-link Aviasales ( | — |
10 |
| URL бренда → партнёрская короткая ссылка с |
|
Данные Data API — из кэша Aviasales (актуальность до 7 дней); это нормально для
статичных страниц и контента, но не для «живого» бронирования. Партнёрские
ссылки в 2026 создаются через Partner Links API: старый формат
tp.media/r?... отдаёт 404, поэтому build_search_url даёт обычную ссылку,
а трекинг появляется только после create_partner_links.
Related MCP server: Taskade MCP Server
Быстрый старт
# 1. Клонировать (или взять из этого workspace)
cd travelpayouts-mcp
# 2. Токен: https://app.travelpayouts.com/profile/api-token
export TRAVELPAYOUTS_TOKEN="ваш_X-Access-Token"
# 3. Запустить MCP-сервер (stdio, JSON-RPC)
python3 -m travelpayouts_mcp # нужен Python 3.9+
python3 -m travelpayouts_mcp --version # 0.1.0Проверить без клиента:
printf '%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18"}}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \
| python3 -m travelpayouts_mcpПодключение клиентов
Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"travelpayouts": {
"command": "python3",
"args": ["-m", "travelpayouts_mcp"],
"env": {
"TRAVELPAYOUTS_TOKEN": "PASTE_X_ACCESS_TOKEN_HERE",
"TRAVELPAYOUTS_MARKER": "YOUR_MARKER",
"TRAVELPAYOUTS_TRS": "YOUR_TRS"
}
}
}
}Cursor / VS Code / Claude Code: те же command/args/env в вашем
mcp.json — готовые шаблоны в examples/.
DSH + Docker MCP: см. раздел «Docker MCP Toolkit».
Переменные окружения
Переменная | Обязательна | Назначение |
| Да (для API) | Партнёрский API-токен ( |
| Для Links API | Партнёрский маркер, напр. |
| Для Links API | ID проекта ( |
| Нет | Хост Aviasales для сырых ссылок ( |
| Нет |
|
| Нет | Маркет Data API: |
| Нет | Локаль справочника/названий: |
| Нет | Переопределение API (тесты, мок) |
| Нет | Таймаут HTTP, секунды (по умолчанию 20) |
Токен нигде не логируется и не попадает в вывод инструментов.
Примеры использования
«Найди дешёвые билеты Москва → Стамбул на июль 2026»
{"name": "search_cheapest_tickets",
"arguments": {"origin": "MOW", "destination": "IST",
"departure_at": "2026-07", "limit": 10}}→ ответ: цена, авиакомпания, пересадки, departure_at, search_url.
«Когда дешевле лететь в Стамбул? Покажи календарь на июль»
{"name": "get_price_calendar",
"arguments": {"origin": "MOW", "destination": "IST", "departure_date": "2026-07"}}«Сделай партнёрскую ссылку на этот поиск для канала seo_en»
{"name": "create_partner_links",
"arguments": {"urls": ["https://www.aviasales.com/search/MOW1607IST1"],
"sub_id": "seo_en"}}→ https://aviasales.tpk.ro/... (нужны TRAVELPAYOUTS_MARKER и TRAVELPAYOUTS_TRS).
Docker
docker build -t travelpayouts-mcp:local .
docker run --rm -i \
-e TRAVELPAYOUTS_TOKEN="$TRAVELPAYOUTS_TOKEN" \
-e TRAVELPAYOUTS_MARKER=YOUR_MARKER \
-e TRAVELPAYOUTS_TRS=YOUR_TRS \
travelpayouts-mcp:localОбраз — python:3.12-slim без pip-установок и сетевых зависимостей на этапе
сборки.
Docker MCP Toolkit
Готовый catalog-entry: catalog/travelpayouts-mcp.yaml.
docker build -t travelpayouts-mcp:local .
cp catalog/travelpayouts-mcp.yaml ~/.docker/mcp/catalogs/
# добавить в профиль (dsh — профиль DSH; можно любой свой)
docker mcp profile server add dsh --server file://travelpayouts-mcp.yaml
# секреты: Docker Desktop → MCP Toolkit → Secrets, либо CLI
docker mcp secret set travelpayouts.token
docker mcp secret set travelpayouts.marker
docker mcp secret set travelpayouts.trsЗатем перезагрузить gateway (в DSH: Plugins → docker-mcp-gateway Off/On) —
в чате появятся инструменты mcp__docker__search_cheapest_tickets и остальные.
Тесты
PYTHONPATH=. python3 -m unittest discover -s tests -v # 52 теста, без сетиТесты поднимают локальный мок Travelpayouts API на 127.0.0.1:<port>,
проверяют заголовок X-Access-Token, параметры запросов, партнёрские ссылки,
тело Links API, ошибки (401/500/non-JSON), MCP-протокол (initialize,
tools/list, tools/call, ping, parse error) и реальный stdio-handshake
subprocess'ом.
Публикация (чек-лист)
GitHub: создать публичный репозиторий, добавить topics
mcp,model-context-protocol,travelpayouts,aviasales,flights,affiliate.PyPI:
python -m build && twine upload dist/*(имя пакета свободно — проверьтеtravelpayouts-mcp).Smithery и mcp.so / Glama: загрузить
server-карточку (smithery.yaml— шаблон, формат уточняйте в их документации).Docker MCP Catalog:
docker mcp catalog create <org>/travelpayouts-mcp --server file://catalog/travelpayouts-mcp.yaml, затемdocker mcp catalog push.MCP Registry: заполнить
server.json(шаблон в репозитории) иmcp-publisher publish.README: добавить реальные скриншоты/демо и ссылку на живой сайт — конверсия звёзд в клики сильно зависит от README.
Правила GitHub: реклама допустима в своих README/Pages и должна быть связана с проектом; спам в чужих issues/PR/репозиториях запрещён (AUP §4 и §10).
Комплаенс Travelpayouts (важно)
Проект должен быть про путешествия, оригинальный и регулярный — «только виджеты» или нерегулярный контент отклоняют.
Нельзя: спам, бренды в объявлениях, push/adult-трафик, мотивированный трафик.
sub_idв Links API — обязательный инструмент аналитики: разные каналы (seo_en,tg_en_deals,github_mcp) → разныеsub_id.Партнёрские ссылки должны иметь раскрытие (FTC/EU): «Affiliate link» / «Партнёрская ссылка».
Лимиты Links API: ≤10 ссылок за запрос, 100 запросов/мин на маркер.
Архитектура
travelpayouts-mcp/
├── travelpayouts_mcp/
│ ├── api.py # Data API + Partner Links API клиент, справочник IATA
│ ├── links.py # deep-link builder Aviasales (params, DDMM, классы)
│ ├── server.py # MCP stdio JSON-RPC, 10 инструментов, схемы
│ ├── __main__.py # python -m travelpayouts_mcp
│ └── __init__.py
├── catalog/travelpayouts-mcp.yaml # Docker MCP catalog entry
├── examples/ # конфиги Claude/Cursor
├── tests/ # 52 офлайн-теста + мок API
├── Dockerfile
├── pyproject.toml
├── smithery.yaml / server.json # шаблоны для реестров MCP
└── README.mdRoadmap
отели (Hotellook/Booking) после подключения партнёрских программ;
кэш ответов Data API на диск (TTL 6–24 ч) + дедуп запросов;
get_special_offers→ генератор постов под каналы (EN/ES) сsub_id;HTTP-транспорт (streamable HTTP) для хостинга;
GitHub Action: ежедневные сделки → issue/Telegram;
публикация в Smithery / mcp.so / Docker MCP Catalog.
Лицензия
MIT — см. LICENSE. Данные принадлежат Aviasales/Travelpayouts; используйте API в рамках их правил и лимитов.
Available Tools
10 toolsbuild_search_urlA
Build a plain Aviasales search URL (params string + filled form URL + results URL). No tracking: for affiliate links call create_partner_links.
Inputs: origin (required), destination (required), adults, infants, +4 more.
create_partner_linksA
Create Travelpayouts affiliate links from brand URLs via the Partner Links API (branded short links, tracked by sub_id). Requires TRAVELPAYOUTS_TOKEN, TRAVELPAYOUTS_MARKER and TRAVELPAYOUTS_TRS. Limits: max 10 URLs per call, 100 calls/min per marker.
Inputs: urls (required), trs, marker, sub_id, +1 more.
get_city_directionsC
Popular destinations from a city (v1/city-directions).
Inputs: origin (required), limit, currency.
get_latest_pricesC
Recently found prices for a period (v3/get_latest_prices): dates or directions, sorted by price.
Inputs: page, limit, origin, one_way, +6 more.
get_month_matrixC
Cheapest price per day of a month (v2/prices/month-matrix), grouped by transfers. Alternative calendar view.
Inputs: origin (required), destination (required), limit, month, +3 more.
get_popular_directionsB
Cheapest origins flying to a destination (v3/get_popular_directions) — useful for destination landing pages.
Inputs: destination (required), limit, locale, currency.
get_price_calendarB
Cheapest ticket for every day of a month for a route (v1/prices/calendar). Good for 'when is it cheaper to fly' answers.
Inputs: origin (required), destination (required), currency, max_days, +3 more.
get_special_offersA
Abnormally cheap flight deals (v3/get_special_offers) — the best starting point for 'deal of the day' content.
Inputs: limit, locale, origin, airline, +2 more.
resolve_placeA
Resolve a city name or IATA code to IATA codes (cities + airports) using the Travelpayouts directory. Use before search tools.
Inputs: query (required), limit, locale.
search_cheapest_ticketsA
Cheapest Aviasales tickets found during the last 48 hours for a route or dates (Travelpayouts Data API, cached up to 7 days). Returns prices, airline, transfers and plain search URLs. Use create_partner_links to turn a URL into a tracked affiliate link.
Inputs: page, limit, direct, market, +8 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Most tools target clearly distinct endpoints (deals, popular directions, place resolution, URL/affiliate building), but get_price_calendar and get_month_matrix both return 'cheapest price per day of a month' and differ only by API version and transfer grouping, which invites misselection. search_cheapest_tickets vs get_latest_prices is also a close pair, though descriptions distinguish cached-route results from period-wide recent prices.
Every tool follows a consistent snake_case verb_noun pattern (get_*, search_*, resolve_*, build_*, create_*), with verbs that accurately reflect the operation. No camelCase or stylistic mixing.
10 tools is well within the ideal range and each maps to a distinct Travelpayouts API endpoint or a necessary helper (place resolution, URL building, affiliate link creation). No filler tools.
The surface covers the full affiliate workflow: resolve place → search prices/calendars/deals → build search URL → create tracked links. Minor gaps exist, such as no tool for airline/route metadata or batch multi-route queries, but agents can work around them with existing tools.
Maintenance
Related MCP Connectors
Unofficial Travelpayouts MCP — wraps the Aviasales Flights Data API (travelpayouts.com)
Search award flights and cash fares, optimize points, and predict fares inside ChatGPT and Claude.
Kiwi.com MCP server for ChatGPT, Claude and any AI agent: search flights, list my bookings, add baggage, request refund and check in in your own Kiwi.com account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Kiwi.com yourself; Cotlet does not store your password and you need no Kiwi.com API key. About the official Kiwi.com API: Kiwi.com has no public API for managing your own bookings (checked 11 Oct 2026). Its official MCP server has one tool, search-flight, which returns flights with a booking link for each and does not manage trips, and new Tequila API partnerships have been by invitation only since May 2024. Setup and FAQ: https://cotlet.dev/integrations/kiwi-com-api-mcp-server
AI marketplace — flights, tours, activities, transport & more via MCP. No auth required.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenancePay-per-use tool marketplace for AI agents. Search, price-check, and call APIs via MCP.-
- AlicenseNot gradedqualityAmaintenanceEnables AI clients such as Claude, Cursor, VS Code, and Windsurf to read and manage workspaces, projects, tasks, and AI agents, and to build automations through natural language. It also includes an OpenAPI codegen that turns any OpenAPI spec into MCP tools.2,530 npmMIT
- FlicenseNot gradedqualityAmaintenanceEnables coding-plan users to run AI-powered web searches that return organic results with related queries, and to analyze images from URLs or local files (JPEG, PNG, WebP) against text prompts. It integrates with MCP clients such as Claude Desktop, Cursor, and Windsurf via stdio or SSE transport to enhance coding workflows.-
- AlicenseNot gradedqualityCmaintenanceEnables MCP hosts such as Claude Desktop, Cursor, and Windsurf to call autonomous specialist agents and tools for coding, browser automation, research, media synthesis, and YouTube analysis.1MIT