Skip to main content
Glama
belgrano9

Renfe MCP Server

by belgrano9

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
RENFE_API_KEYNoAPI key for authentication.
RENFE_DEV_MODENoEnable development mode.
RENFE_LOG_LEVELNoLog level (e.g., INFO, DEBUG).
RENFE_ENABLE_AUTHNoEnable authentication. Set to 'true' or 'false'.
RENFE_RATE_LIMIT_ENABLEDNoEnable rate limiting.
RENFE_MAX_REQUESTS_PER_HOURNoMaximum requests per hour.
RENFE_MAX_REQUESTS_PER_MINUTENoMaximum requests per minute.

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/belgrano9/renfe_mcp_server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server