Italian Travel Search MCP Server

io.github.Alexxanddr由 GitHub 帳號 Alexxanddr 發布v0.3.8更新於 Nov 7, 2026

Italian bus and train searches with live prices, availability and status.

發布方自己的服務:travel.art

概覽

AI 產生的概覽

透過營運商介面查詢義大利巴士與火車班次、車站、即時票價與運行狀態,並回傳官方訂票連結。

可以做什麼
  • 列出已設定的巴士與火車營運商及其可用功能
  • 依名稱尋找巴士地點 ID 與區分營運商的火車站
  • 搜尋單程巴士與火車行程,含價格、可訂狀況與分頁
  • 查詢火車即時運行狀態與營運商車站到離站資訊
  • 回傳官方營運商連結,方便手動完成訂票
適用情境
適合讓助理查詢義大利長途巴士或鐵路路線、比較不同營運商的即時票價與可訂狀況,或查看某班列車的即時狀態與車站到離站資訊,而不必由它自行下單。
執行需求
以 stdio 在本機執行,可透過 npx 或建置後的 Node.js 程序啟動;需要 Node.js 22.18 以上版本與 npm。未宣告帳號、API 金鑰或環境變數。需要連線至營運商訂票介面的網路。
安裝前請注意
屬於非官方、唯讀的營運商介面整合,上游介面可能隨時變動;啟用即時轉接器前應確認符合各營運商條款。僅支援單程查詢,可訂狀況為營運商回報訊號而非保證。不處理帳號、訂位或付款,購票須在官方營運商網站完成。查詢內容會傳送給第三方營運商。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Italian Travel Search MCP Server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Italian Travel Search

[CI]

An unofficial, read-only TypeScript service for live Italian coach and train searches through HTTP and Model Context Protocol interfaces.

The project hides provider-specific station catalogs, request formats, fare structures, and multi-leg responses behind one shared application core. Italo pricing initializes an anonymous technical session and temporary planning resource; customer login, fare selection, seat reservation, and payment are excluded.

[!IMPORTANT] This project is not affiliated with or endorsed by Itabus, Autoservizi Salemi, Autolinee Federico, MarinoBus, or FlixBus. Provider names and trademarks belong to their owners. Before enabling a live adapter, confirm that your use complies with the provider's terms, applicable law, and any required authorization. This repository does not grant data-extraction or redistribution rights.

Features

  • One response model for locations and journeys across different booking platforms.
  • Live adapters for five bus operators and two train operators.
  • Partial results when one provider fails and another succeeds.
  • MCP over local stdio or stateless Streamable HTTP at /mcp, with backward-compatible bus tools and separate rail tools.
  • Trenitalia and Italo station and journey searches directly from their live booking APIs.
  • Official links for continuing a search manually on provider sites.
  • Searches respect the requested departure day; city searches preserve all Itabus stops, with physical-stop names/addresses where available.
  • Rail warnings identify urban transfers excluded from the quoted fare.
  • Structured, provider-scoped errors instead of leaked upstream responses.
  • Finite upstream request timeouts and bounded asynchronous quote polling.
  • One-hour location caches and 60-second journey caches.
  • Opt-in immutable journey pagination with five-minute in-memory snapshots, shared by HTTP and MCP.
  • Per-client in-memory rate limiting at 60 requests per minute.
  • Offline tests with synthetic fixtures; the test suite never contacts provider sites.
  • A small runtime dependency surface: the official MCP SDK and Zod.

Supported providers

Provider IDOperatorIntegrationLocationsJourneys
itabusItabusDemandware endpointsLiveLive
salemiAutoservizi SalemiAlbatross tenantLiveLive
federicoAutolinee FedericoAlbatross tenantLiveLive
marinobusMarinoBusAlbatross tenantLiveLive
flixbusFlixBusGlobal FlixBus search APILiveLive

Public provider behavior and limitations are documented in the bus and train API guides below.

Train stations, journeys, prices and availability come directly from Trenitalia and Italo booking APIs. No timetable download, dataset, storage volume or initialization command is required. If one operator fails, its error is reported alongside the other operator's results. ViaggiaTreno and Italo live boards/standalone status remain independent; Italo quote sessions are cleaned up best-effort.

Requirements

  • Node.js 22.18 or newer
  • npm

Quick start

sh
git clone https://github.com/Alexxanddr/italian-travel-search.gitcd italian-travel-searchnpm installcp .env.example .envnpm start

The server listens on http://127.0.0.1:3000 by default.

sh
curl http://127.0.0.1:3000/healthcurl http://127.0.0.1:3000/providerscurl http://127.0.0.1:3000/train-providerscurl 'http://127.0.0.1:3000/locations?query=Roma&provider=marinobus'

For journey searches, use today or a future date in Europe/Rome:

sh
curl 'http://127.0.0.1:3000/journeys?origin=Roma&destination=Milano&date=YYYY-MM-DD&adults=1&children=0&provider=marinobus'

YYYY-MM-DD is a placeholder and must be replaced before running the command.

HTTP interface

MethodPathPurpose
GET/healthProcess liveness
GET/providersAdapter status and operational reason
GET/train-providersTrain operators and configured schedule/price/live capabilities
GET/locationsProvider location search
GET/journeysNormalized one-way journey search
GET/train-locationsTrenitalia/Italo station search
GET/train-journeysLive rail journeys, availability and nullable prices
GET/train-statusStandalone live status where enabled
GET/station-boardLive arrivals/departures where enabled
POST/mcpStateless MCP Streamable HTTP endpoint

/locations and /journeys accept an optional provider parameter. Without it, all providers are queried independently and successful data is preserved alongside provider-scoped errors.

The complete contract is split into the Bus API and Train API, with shared behavior indexed in HTTP API.

MCP server

The simplest MCP configuration runs the published package directly with npx:

json
{  "mcpServers": {    "italian-travel-search": {      "command": "npx",      "args": ["-y", "italian-travel-search@latest"]    }  }}

Alternatively, build and start the local stdio server:

sh
npm run buildnpm run mcp:built

The existing list_providers, search_locations, and search_journeys bus tools remain compatible. Location and journey searches accept optional offset/limit; increment offset by limit until truncated is false to retrieve every page. Rail adds list_train_providers, search_train_locations, search_train_journeys, get_train_status, and get_station_board. Trenitalia and Italo price and live adapters are enabled; Italo live tools retain date-unverified semantics.

For exhaustive journey searches, start with snapshot: true and continue with only the returned searchId, offset and limit. This keeps prices, errors, order and totals identical across pages. Expired IDs require a new search. The same opt-in flow exists over HTTP; see stable pagination.

json
{  "mcpServers": {    "italian-travel-search": {      "command": "node",      "args": ["/absolute/path/to/italian-travel-search/dist/mcp/stdio.js"]    }  }}

For a container or remote MCPHub deployment, start the HTTP process and point the client to http://italian-travel-search:3000/mcp. The container image is ghcr.io/alexxanddr/italian-travel-search:latest. No dataset initialization or persistent volume is needed.

See MCP interface for the authoritative tool contract, limits, errors, and development command.

Architecture

The application has four layers:

  1. HTTP and MCP adapters validate their transport-specific requests;
  2. shared validation and SearchService orchestrate searches and partial results;
  3. each provider adapter translates a remote protocol into domain types;
  4. the domain module owns normalized data and error contracts.

Provider adapters implement one shared interface, so callers do not know whether a result came from Itabus Demandware or an Albatross tenant. See Architecture for modules, seams, data flow, caches, and test strategy.

Development

sh
npm run devnpm run mcpnpm run check

npm run check runs the complete offline test suite, TypeScript type checking, and the configured lint check. To add an operator, follow Adding a provider; do not infer a new integration from HTML alone or copy credentials into fixtures.

Deployment

The default server deliberately binds to loopback and keeps rate-limit and cache state in process memory. Read Operations before placing it behind a reverse proxy or running multiple replicas.

Project documentation

  • HTTP API — shared behavior and error contract.
  • Bus API — bus providers, locations, journeys, and examples.
  • Train API — rail schedules, live prices/status, provenance, and examples.
  • MCP interface — authoritative tools, results, limits, and transport contract.
  • Architecture — modules, seams, flows, and design decisions.
  • Adding a provider — research, implementation, and verification checklist.
  • Operations — configuration, deployment constraints, and failure handling.
  • Glossary — stable project terminology.
  • Contributing — local workflow and pull-request expectations.
  • Security policy — private vulnerability reporting and supported versions.
  • Agent instructions — compact routing instructions for coding agents.

Scope and limitations

  • Searches are one-way only.
  • Availability is a provider-reported signal, not a seat or price guarantee.
  • Prices and schedules can change between search and purchase; rail results expose live observation and source metadata. The legacy field name timetableSource is retained for compatibility.
  • Caches and rate limits reset when the process restarts and are not shared across replicas.
  • Upstream interfaces are unofficial and can change without notice.
  • Both interfaces intentionally exclude accounts, bookings, payments, and CAPTCHA handling.

Always complete and confirm a purchase on the official provider site linked by bookingUrl.

Contributing and security

Contributions are welcome; start with CONTRIBUTING.md. Report vulnerabilities privately according to SECURITY.md, not through a public issue.

License

Source code is available under the MIT License. The license covers this repository's code, not third-party data, provider trademarks, or access rights to upstream systems.

Train connections to Cosenza

Search Cosenza directly: the backend preserves native connections via Paola, including Italo services followed by a Trenitalia regional train when offered by the booking API. Results include both legs, their operators, the interchange and the combined passenger fare when fully available. The destination is never silently replaced with Paola. See Train API.

來源:README.md,提交 abb56cd

工具

8

list_providers

List Italian bus providers

BUS ONLY. List configured bus/coach providers and their status. Never use this tool for trains or rail; use list_train_providers instead.

無需輸入參數。

list_train_providers

List Italian train providers

TRAINS ONLY. Use for requests involving trains or rail. Lists train operators and whether schedule, price, live-status, and station-board capabilities are enabled.

無需輸入參數。

search_locations

Search Italian bus locations

BUS ONLY. Find bus/coach location IDs and exact names. Never use for train stations; use search_train_locations instead. For an aggregate bus search, reuse exact names shared across providers.

輸入參數limitquery必填offsetprovider

search_journeys

Search Italian bus journeys

BUS ONLY. Search one-way bus/coach journeys. Never use for trains or rail; use search_train_journeys instead. Results include official links for continuing manually on provider sites. For stable pagination start with snapshot:true; continue using only searchId, offset and limit.

輸入參數datelimitadultsoffsetoriginchildrenprovidersearchIdsnapshotdestination

search_train_locations

Search Italian train stations

TRAINS ONLY. Use for every request involving trains or rail to find operator-aware stations. Prefer names across operators; station IDs are operator-specific.

輸入參數limitquery必填offsetprovider

search_train_journeys

Search Italian train journeys

TRAINS ONLY. Requires origin, destination, and date. When the user states passenger counts, always pass adults and children explicitly. Each price is the total for those passengers; never infer discounts or convert it to a per-person price. For stable pagination start with snapshot:true; continue using only searchId, offset and limit.

輸入參數datelimitadultsoffsetoriginchildrenprovidersearchIdsnapshotdestination

get_train_status

Get train status

Get live status using operator, train number, service date, and origin identity. Live status may be unavailable independently of schedules.

輸入參數origin必填provider必填serviceDate必填trainNumber必填

get_station_board

Get train station board

Get an operator station board with its observation timestamp. Live boards may be unavailable independently of schedules.

輸入參數provider必填direction必填stationId必填stationName必填

版本歷史

2
  1. v0.3.8最新Nov 5, 2026
  2. v0.3.6Oct 29, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Travel 整合