Summary
Search Italian high-speed and regional trains via Trenitalia's Le Frecce mobile API. Find trips by origin/destination/date, read offers and prices, see live home alerts and mobility info. 3 tools, no auth — reverse-engineered from the Le Frecce iOS app.
Try asking
Example prompts for Trenitalia
Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.
Claude is AI and can make mistakes. Please double-check responses.
Self-hosted only. Trenitalia refuses requests from datacenter IP addresses, and AnythingMCP Cloud runs in a datacenter, so this connector is not available on AnythingMCP Cloud. It works on an AnythingMCP instance you run yourself on a computer or server with a regular home or office internet connection.
Trenitalia + Claude
Search Italian high-speed and regional trains via Trenitalia's Le Frecce mobile API. Find trips by origin/destination/date, read offers and prices, see live home alerts and mobility info. 3 tools, no auth — reverse-engineered from the Le Frecce iOS app.
Prerequisites
See the full setup instructions baked into the connector (visible in the in-app store when you select the connector). The required environment variables for this connector are:
(none — public API)
Step 1 — Get credentials
This connector wraps the Trenitalia Le Frecce mobile app's internal API (app.lefrecce.it, channel Channels.Mobile.BFF).
Setup: nothing. The endpoints exposed here are the same the Le Frecce iOS app uses for trip discovery.
What it does NOT do: complete bookings. The booking flow requires a logged-in session and the Trenitalia payment hub. Use this connector to find trains and prices; book in the Le Frecce app or trenitalia.com.
…(continued in the in-app connector instructions)
Step 2 — Install the adapter
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
- Open
http://localhost:3000and register. The first account becomes the admin. - Open the connector store (
http://localhost:3000/connectors/store), pick Trenitalia, fill in the credentials it asks for (some connectors need none) and install it. - Under MCP Servers, create a server and assign the Trenitalia connector to it. On the server's page, copy the MCP endpoint (
http://localhost:4000/mcp/<server-id>) and generate a key under API keys.
The quickstart listens on localhost only. For an instance that other people or cloud-based AI clients can reach, clone the repository and run ./setup.sh, which sets up a domain, HTTPS and OAuth (deployment guide).
Step 3 — Add the Trenitalia connector to Claude
Claude reaches MCP servers in two different ways, and only one of them works with the localhost quickstart.
Claude Code runs on your computer, so it can use the local endpoint directly:
claude mcp add --transport http trenitalia http://localhost:4000/mcp/<server-id> --header "X-API-Key: <your-api-key>"
Run claude mcp list to check that it connected.
Claude.ai and Claude Desktop add remote servers as custom connectors: go to Customize → Connectors, click + and choose Add custom connector (on Team and Enterprise plans an owner adds it first under Organization settings → Connectors). Claude opens that connection from Anthropic's cloud, not from your computer, so a localhost URL does not work there. You need an AnythingMCP instance with a public HTTPS address (see ./setup.sh above) on a connection Trenitalia accepts; paste that instance's MCP endpoint and sign in to AnythingMCP when Claude asks.
Available tools
| Tool | What it does |
|---|---|
trenitalia_search_trips | Search Trenitalia trains between two stations on a date |
trenitalia_get_home_alerts | Get current service alerts and mobility info from Trenitalia's home feed — strikes, delays, line-wide notices |
trenitalia_get_mobility_info | Get general mobility info — strikes (scioperi), planned outages, network status — from Trenitalia's home info feed |
FAQ
Why isn't Trenitalia available on AnythingMCP Cloud? Trenitalia refuses requests from datacenter IP addresses. AnythingMCP Cloud runs in a datacenter, so every call would fail. An AnythingMCP instance on a home or office connection usually works.
Next steps
Was this guide helpful?