Renfe MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| RENFE_API_KEY | No | API key for authentication. | |
| RENFE_DEV_MODE | No | Enable development mode. | |
| RENFE_LOG_LEVEL | No | Log level (e.g., INFO, DEBUG). | |
| RENFE_ENABLE_AUTH | No | Enable authentication. Set to 'true' or 'false'. | |
| RENFE_RATE_LIMIT_ENABLED | No | Enable rate limiting. | |
| RENFE_MAX_REQUESTS_PER_HOUR | No | Maximum requests per hour. | |
| RENFE_MAX_REQUESTS_PER_MINUTE | No | Maximum requests per minute. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| search_trainsA | Search for train journeys between two cities on a specific date. Args: origin: Starting city name (e.g., "Madrid", "Barcelona", "Valencia") destination: Destination city name (e.g., "Madrid", "Barcelona", "Sevilla") date: Travel date. Accepts flexible formats: - ISO: "2025-11-28" (RECOMMENDED) - European: "28/11/2025" - Written: "November 28, 2025" or "28 November 2025" If not provided, searches for today's date. page: Page number to display (default: 1) per_page: Number of results per page (default: 10, max: 50) api_key: API key for authentication (optional if configured via environment) Returns: Formatted string with available train options including times and durations. |
| find_stationA | Search for train stations in a city and return matching options. Useful for checking what stations are available in a city before searching for journeys. Args: city_name: City name to search for (e.g., "Madrid", "Barcelona", "Valencia") api_key: API key for authentication (optional if configured via environment) Returns: A formatted string showing all matching stations with their IDs and full names. |
| get_train_pricesA | Check actual ticket prices for trains between two cities using web scraping with pagination. NOTE: This tool scrapes the Renfe website and may take a few seconds to complete. It complements the search_trains tool by providing real-time price information. This endpoint has stricter rate limits due to web scraping. Args: origin: Starting city name (e.g., "Madrid", "Barcelona", "Valencia") destination: Destination city name (e.g., "Madrid", "Barcelona", "Sevilla") date: Travel date. Accepts flexible formats: - ISO: "2025-11-28" (RECOMMENDED) - European: "28/11/2025" - Written: "November 28, 2025" or "28 November 2025" If not provided, checks prices for today's date. page: Page number to display (default: 1) per_page: Number of results per page (default: 5, max: 20) api_key: API key for authentication (optional if configured via environment) Returns: Formatted string with train prices, availability, and booking information. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 3 tools
Each tool serves a distinct purpose: station lookup, journey search, and price retrieval. No overlap in functionality.
All tools follow a consistent verb_noun pattern in snake_case: find_station, get_train_prices, search_trains.
Three tools cover the core workflow of finding stations, searching journeys, and checking prices. While minimal, it's appropriate for the scope.
Covers the essential travel information needs: station lookup, journey search, and pricing. Missing booking or detailed trip info, but acceptable for an info-focused server.