Renfe Data MCP for AI. Monitor Spain's railway network live.
Works with every AI agent you already use
…and any MCP-compatible client








Connect to your AI in seconds.
Renfe Data provides direct access to Spain's national railway network data. You get real-time GPS coordinates for Cercanías and Long Distance trains (AVE/LD/MD).
It also gives you static GTFS schedules, service alerts, and a searchable repository of thousands of open government datasets.
What your AI can do
Ckan datastore search
Searches specific data resources within the Renfe Data portal using keywords or filters.
Ckan package list
Retrieves a list of all available dataset names hosted in the Renfe Data repository.
Ckan package show
Gets detailed metadata about one specific dataset, including its structure and source.
Retrieves the current GPS coordinates and movement status of trains (Cercanías or Long Distance) at set intervals.
Gathers real-time information on track incidents, planned service changes, or system-wide disruptions across the network.
Uses the CKAN tools to list, search, and view metadata for thousands of available railway datasets.
Fetches direct download URLs containing standardized GTFS schedules and station lists for offline application development.
Provides updates on specific train routes, indicating if a service is running on time or if there's an expected delay/cancellation.
Ask an AI about this
Waiting for input…
Renfe Data MCP Server: 11 Tools for Rail Operations
These tools let your agent query the entire scope of the Renfe network, ranging from listing open datasets via CKAN to getting live vehicle coordinates.
Make your AI actually useful.
Add this MCP to Claude, Cursor, or Windsurf and your AI stops guessing. It gets real tools to look things up, take action, and handle the stuff you keep doing by hand.
Start using Renfe Data on VinkiusCkan Datastore Search
Searches specific data resources within the Renfe Data portal using keywords or filters.
Ckan Package List
Retrieves a list of all available dataset names hosted in the Renfe Data repository.
Ckan Package Show
Gets detailed metadata about one specific dataset, including its structure and...
Ckan Resource Show
Retrieves metadata for a specific data resource within a package.
Get Avisos
Checks planned service modifications or track incidents across the network.
Get Static Datasets
Lists direct download URLs for comprehensive static datasets like schedules and station lists.
Rt Alerts Cercanias
Gets real-time service alerts specifically for the Cercanías (commuter) lines, updating every 20 seconds.
Rt Trip Updates Cercanias
Provides live trip status updates for Cercanías trains, showing delays or...
Rt Trip Updates Ld
Gets real-time trip updates for Long Distance (AVE/LD/MD) services, updating...
Rt Vehicle Positions Cercanias
Retrieves the live GPS position and movement status of Cercanías trains, updated...
Rt Vehicle Positions Ld
Gets real-time vehicle positions for Long Distance (AVE/LD/MD) services, updated...
Security and governance baked right in.
Pick your AI client below to get set up. Just create a Vinkius account, subscribe, and you're instantly up and running. We handle the entire backend infrastructure, delivering out-of-the-box support for HTTPS Streamable, SSE, and OAuth2—zero messy routing required.
Choose How to Get Started
Build a custom MCP for your own tools, or connect a ready-made integration from our catalog.
Build Your Own
Turn any API into an MCP. Import a spec, define Agent Skills, or deploy with MCPFusion.
- Import from OpenAPI, Swagger, or YAML specs
- Create Agent Skills with progressive disclosure
- Deploy to edge with MCPFusion framework
- Built in DLP, auth, and compliance on every call
- Real time usage dashboard and cost metering
- Publish to catalog or keep private
Make Your AI Do More
Start with Renfe Data, then connect any of our 5,100+ other servers whenever your AI needs more. One click, no limits.
- Use this MCP plus 5,100+ others, all in one place
- Add new capabilities to your AI anytime you want
- Every connection is secured and compliant automatically
- Track usage and costs across all your servers
- Works with Claude, ChatGPT, Cursor, and more
- New servers added to the catalog every week
Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by Renfe Data. All third-party trademarks, logos, and brand names are the property of their respective owners. Their use on this website is strictly for informational purposes to identify service compatibility and interoperability.
VINKIUS INFRASTRUCTURE
Cloud Hosted
Managed infra
V8 Isolated
Sandboxed per request
Zero-Trust Proxy
No stored credentials
DLP Enforced
Policy on every call
GDPR Compliant
EU data residency
Token Compression
~60% cost reduction
Works with Claude, ChatGPT, Cursor, and more
The Model Context Protocol standardizes how applications expose capabilities to LLMs. Instead of operating in isolation, your AI gains direct access to external platforms, live data, and real-world actions through secure, standardized connections.
This connection provides 11 powerful capabilities that interface natively with Claude, ChatGPT, Cursor, and other compatible AI platforms. No middleware. No custom integration required.
Checking train status used to mean opening three different websites and cross-referencing PDFs.
Today's process is a nightmare of tabs. You open Renfe’s main site, check the line map for a general alert, then jump to another page to see if there are any specific delays listed by trip number. If you want historical schedules, you download a separate GTFS file, which probably isn't up-to-date anyway. It takes 15 minutes and three copies of your coffee.
With the Renfe Data MCP Server, you ask your agent one question: 'What's the status on Line C3 today?' The agent runs `rt_trip_updates_cercanias` and spits out a single, structured response detailing delays or confirmations. You get an accurate answer in seconds.
The Renfe Data MCP Server gives you live position data with `rt_vehicle_positions_cercanias`.
Before this, tracking a train meant relying on infrequent updates or physical signs. You'd only know the train was 'approaching' when it got close enough to report its status—it wasn't precise, and you couldn't build anything dynamic with that data.
Now, `rt_vehicle_positions_cercanias` provides a continuous stream of GPS coordinates. Your agent can use this minute-by-minute location data to power real-time map visualizations or trigger alerts the moment a train deviates from its expected path.
What your AI can actually do with this
You connect your AI agent to this server to access Spain's national railway data—it’s got everything from live GPS coordinates to thousands of open government datasets. When you use it, you get real-time operational status and static resources all in one spot.
Real-Time Tracking
You can track where trains are right now. For the commuter lines (Cercanías), rt_vehicle_positions_cercanias gives you the live GPS coordinates and movement status, updating every 20 seconds. If you need to know if a Cercanías train is delayed or canceled, rt_trip_updates_cercanias provides that specific trip status update, also refreshing every 20 seconds.
For Long Distance services (AVE/LD/MD), the system tracks vehicle positions using rt_vehicle_positions_ld, which updates roughly every 15 minutes. To get a direct read on whether an entire long-distance service is delayed or canceled, you use rt_trip_updates_ld; this update comes through around every 30 seconds.
Service Alerts and Disruptions
You don't have to guess if the line's running smooth. You check for system-wide disruptions using get_avisos, which reports planned service modifications or actual track incidents across the entire network. If you need real-time alerts specific to the commuter lines, rt_alerts_cercanias feeds you those immediate updates on service changes or incidents every 20 seconds.
Static Data and Offline Prep
When your app needs data without Wi-Fi, this server has you covered. You use get_static_datasets to pull direct download URLs for major static datasets, like comprehensive GTFS schedules and station lists, perfect for building an application that runs totally offline.
Dataset Discovery and Metadata
The service exposes a massive repository of open government data using the CKAN tools. You start by seeing what's available with ckan_package_list, which returns a list of every single dataset package name hosted in the Renfe Data portal. If you know generally what kind of data you want, you run ckan_datastore_search to filter and search specific resources within that data portal using keywords or defined filters.
To understand the structure of a particular set of data, you use ckan_package_show, which retrieves detailed metadata about one entire package, telling you its source and what it's built around. If you know exactly which resource you need inside those packages, ckan_resource_show gives you the metadata for that specific data asset.
Finally, if you want to see the raw details of a dataset without searching through the whole portal, you can get precise information using ckan_datastore_search again; this function lets you target and pull data resources based on your criteria.
019e38e3-5d94-7233-8abe-a6e7cadbb30e Here's how it actually works
The bottom line is: you use natural language to call specific functions that pull live operational data from Spain's railway system.
Subscribe to the Renfe Data server and input your API key.
Tell your AI client (Claude, Cursor, etc.) exactly what data you need—for example, 'What is the current position of a Cercanías train?'
The agent runs the correct tool (e.g., rt_vehicle_positions_cercanias), and it returns structured, up-to-date JSON data.
Who is this actually for?
This server serves developers and analysts who rely on timely, accurate transport information. Think of the logistics manager stuck waiting for a fleet report or the app developer building a critical transit tool. You need data that changes every minute, not just historical spreadsheets.
Uses rt_vehicle_positions_ld and ckan_datastore_search to analyze fleet movement patterns and measure network performance metrics.
Integrates specific tools like rt_trip_updates_cercanias and get_static_datasets into a custom app that shows real-time local train movement to users.
Calls the CKAN metadata tools (ckan_package_list, etc.) to find, verify, and download open government datasets for research and visualization.
What Changes When You Connect
See the exact location of a train right now. Instead of checking multiple physical signs, calling rt_vehicle_positions_cercanias gives you GPS coordinates for every active commuter train instantly.
Get current delay status in one call. You don't have to visit different websites to check if an AVE is delayed; running rt_trip_updates_ld pulls the latest information directly.
Prepare for offline use. Use get_static_datasets to grab GTFS files and station lists once. Your application can then run without needing a constant connection to Renfe's servers.
Find data schemas quickly. If you need to know what kind of datasets exist, start by listing packages with ckan_package_list. This tells you the scope before you dive into searching.
Track service changes immediately. Running get_avisos gives you real-time alerts about track incidents or planned maintenance, letting you warn users before they reach a problem spot.
See it in action
A commuter needs to check for morning delays.
The user asks their agent: 'Are there any issues on the Madrid-Cercanías line?' The agent immediately calls rt_alerts_cercanias and then follows up with rt_trip_updates_cercanias, solving the problem by giving a clear status report of delays or cancellations.
A developer needs historical data for a map visualization.
Instead of manually collecting schedule PDFs, the agent runs get_static_datasets. This provides direct download URLs for GTFS files. The developer downloads these structured schedules and builds their full-featured mapping service.
A logistics firm needs to monitor entire fleet movements.
The analyst asks: 'What are the positions of all long-distance trains right now?' The agent executes rt_vehicle_positions_ld, returning a structured list of vehicle IDs and their current coordinates, allowing immediate performance assessment.
A researcher needs to know about local urban transport data.
The scientist first runs ckan_package_list to see what's available. They then use ckan_datastore_search with terms like 'mobility' or 'Estaciones' to find the exact dataset they need for their academic model.
The honest tradeoffs
Treating static data as real-time.
Asking, 'What is the current position of train X?' but only using ckan_datastore_search because it's a search tool. The agent will return old metadata instead of live coordinates.
If you need location data right now, use the dedicated tools: rt_vehicle_positions_cercanias or rt_vehicle_positions_ld. Only use the CKAN tools for searching dataset definitions, not actual live readings.
Over-relying on general searches.
Asking a vague question like 'Tell me about train service' which forces the agent to guess if you mean delays, positions, or schedules. The response is slow and incomplete.
Be specific with your request. For instance: 'Check for planned service modifications today.' This directs the agent to use get_avisos, giving a precise answer.
Assuming all data types are available in one place.
Expecting trip updates and historical schedules from the same call. The system can't mix live GPS with last year's timetable.
Use a two-step process: 1) Get current status via rt_trip_updates_cercanias. 2) Download permanent data for future analysis using get_static_datasets.
When It Fits, When It Doesn't
You must use this server if your workflow depends on verifiable, real-time Spanish railway movements or structured open government data. The key is the time sensitivity of your task; if you need to know what happened in the last five minutes, these tools are critical.
Don't use this if:
1. You just need a general directory of all available API endpoints (use ckan_package_list for that).
2. Your data source is outside the Spanish rail network (you need a different transport API).
3. You only care about high-level corporate statistics and not granular, trip-by-trip movements.
If your goal involves tracking movement or service disruptions, you'll use the specialized rt_* tools. If your goal is pure data research, stick to the CKAN search functions.
Questions you might have
How do I find out what kind of datasets are available with ckan_package_list? +
You run ckan_package_list. This command retrieves all dataset names in the Renfe Data portal. It's a good first step to see if 'GTFS' or 'Estaciones' is listed before you try to use it.
What should I use for real-time position updates on commuter trains? +
Use the rt_vehicle_positions_cercanias tool. It gives live GPS coordinates and movement status, updating every 20 seconds. This is the specific function you need for current location data.
Can I get historical schedules from Renfe Data? +
Yes. You use get_static_datasets to list direct download URLs for GTFS schedules and station lists. These files are designed for offline analysis, unlike the live tools.
Which tool shows planned service modifications? ckan_datastore_search or get_avisos? +
You must use get_avisos. This specific function retrieves real-time information on track incidents and planned service changes, which is different from searching general datasets.
How often do the trip updates run for Long Distance trains using rt_trip_updates_ld? +
The rt_trip_updates_ld tool updates every 30 seconds. This provides a consistent, low-latency stream of delay and cancellation information for AVE/LD/MD services.
I want to see the full schema of a specific dataset; should I use `ckan_package_show` or `ckan_resource_show`? +
ckan_resource_show gives you the precise metadata for an individual data resource. If you need to know what fields are available within a package, that's your tool. It provides details like format and last updated dates.
How do I get download links for offline analysis using `get_static_datasets`? +
get_static_datasets returns direct URLs to static files, such as GTFS schedules and station lists. Your AI client can use these links directly to pull the data into a local format for deep-dive work.
What is the update frequency when I run `rt_vehicle_positions_cercanias`? +
The rt_vehicle_positions_cercanias tool updates every 20 seconds. This means your agent will receive near real-time GPS coordinates for commuter trains, making it ideal for continuous monitoring.
How often are the real-time train positions updated? +
It depends on the service: Cercanías positions (rt_vehicle_positions_cercanias) update every 20 seconds, while Long Distance trains (rt_vehicle_positions_ld) update every 15 minutes.
Can I check for delays or platform changes for a specific trip? +
Yes. Use rt_trip_updates_cercanias or rt_trip_updates_ld to get live information on delays, cancellations, and platform assignments across the network.
Where can I find the static GTFS files for schedules? +
You can use the get_static_datasets tool. It returns direct download URLs for GTFS schedule packages and CSV/XLSX lists of all Renfe stations.
We've already built the connector for Renfe Data. Just plug in your AI agents and start using Vinkius.
No hosting. No infrastructure. No complex setup.
All 11 tools are live and waiting.
You're up and running in seconds.
Vinkius gives your AI agents access to the full catalog of app connectors, all fully managed, secure, and enterprise-ready. One subscription, every tool you need.
Built, hosted, and secured by Vinkius. You just connect and go.