logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

railway-data-gateway-service

An interface providing instantaneous transit logistics for the Dutch rail network (NS), empowering users to retrieve timetable details, operational status updates, and resolve complex travel inquiries.

Author

railway-data-gateway-service logo

r-huijts

MIT License

Quick Info

GitHub GitHub Stars 43
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

nshuijtsapishuijts nsrailways nsrequests huijts

MseeP.ai Security Assessment Badge

NS Logo NS Travel Information Server MCP server

NS Transit Intelligence Conduit

smithery badge npm version

Elevate your digital assistant capabilities into a premier consultant for Dutch railway operations! This Managed Computation Protocol (MCP) gateway establishes a connection between Claude and live data feeds from NS (Nederlandse Spoorwegen), making it the definitive instrument for navigating ground transportation across the Netherlands.

Deployment Procedures

You may deploy this server via three distinct methodologies:

1. Utilizing Claude Desktop with NPM Package Distribution

Modify your Claude configuration manifest (~/Library/Application Support/Claude/claude_desktop_config.json):

{ "mcpServers": { "ns-server": { "command": "npx", "args": [ "-y", "ns-mcp-server" ], "env": { "NS_API_KEY": "your_api_key_here" } } } }

Secure your requisite access credential from the NS API Portal

2. Automated Integration via Smithery

To provision the NS Transit Intelligence Conduit automatically using Smithery:

bash npx -y @smithery/cli install ns-server --client claude

3. Compilation From Source Code

  1. Repository checkout: bash git clone

  2. Dependency resolution: bash npm install

  3. Replicate the sample environment file: bash cp .env.example .env

  4. Inject your NS access token into the .env file:

NS_API_KEY=your_api_key_here

Subsequently, adjust your Claude configuration file as follows:

{ "mcpServers": { "ns-server": { "command": "node", "args": [ "/path/to/ns-server/build/index.js" ], "env": { "NS_API_KEY": "your_api_key_here" } } } }

Critical verification steps: 1. Substitute /path/to/ns-server with the actual directory location of your local deployment. 2. Ensure the NS access token is correctly populated within the env block. This token is obtainable at https://apiportal.ns.nl/product#product=NsApp

Apply these modifications and relaunch Claude Desktop to activate the server integration.

Practical Application Scenarios

  • "Is the standard 08:15 departure from Almere to Amsterdam maintaining its schedule?"
  • "Are there reported service interruptions affecting the Rotterdam-Den Haag corridor today?"
  • "What is the recommended alternate routing to Utrecht should the primary line experience planned maintenance?"
  • "Determine the minimal trajectory that ensures arrival at my Amsterdam Zuid workplace prior to 09:00."
  • "Which pathway to Amsterdam involves the fewest necessary transfers when traveling with a baby stroller?"
  • "What is the earliest feasible train departure to reach my 10 AM engagement in The Hague?"
  • "What is the final outbound service scheduled from Amsterdam to Groningen following late evening activities?"
  • "Are there any planned overnight or weekend engineering activities that might impact my commute on Monday morning?"
  • "Verify the availability of OV-fiets rental bicycles at the Utrecht Centraal hub for my afternoon engagement."
  • "Is Eindhoven Strijp-S station fully accessible for wheelchair users, and what is the designation for its service tracks?"
  • "List all train arrivals expected at Utrecht Centraal within the ensuing sixty minutes."
  • "Has the scheduled train originating from Venlo for Schiphol Airport maintained its punctuality?"
  • "Ascertain the cost of a premium (first-class) passage between Amsterdam and Rotterdam."
  • "Quote the fare for a party consisting of two adults and one child traveling to Den Haag."

🔑 Operational Environment Parameters

Parameter Explanation
NS_API_KEY Your mandatory authentication credential for the NS platform

🌟 Capability Set

This MCP conduit furnishes comprehensive access to NS operational data via the following interface points:

Live Rail Operations Data

  • Departure Manifests: Retrieve up-to-the-minute departure particulars, including track assignments, latency indicators, and advisory notices.
  • Arrival Schedules: Access pending arrival data, detailing originating points, platform modifications, and status confirmations.
  • Route Optimization: Calculate optimal travel paths, accounting for required changes and real-time alterations.
  • Service Bulletins: Monitor active incidents, planned infrastructure works, and engineering schedules.

Tariff Structure Access

  • Fare Quotations: Obtain precise pricing for one-way and round-trip itineraries.
  • Service Tier Comparison: Contrast expense levels between standard and premium travel accommodations.
  • Group Rate Calculation: Determine aggregate fares for mixed-age passenger cohorts (adults/children).
  • Concession Inquiry: Investigate availability of joint travel reductions and specific promotional offers.
  • Ticket Specifics: Review associated usage windows and stipulations.

Terminal Facility Intelligence

  • Station Profiles: Access exhaustive facility manifests, encompassing:
  • Amenities provision and accessibility compliance standards
  • Track configurations and specific platform assignments
  • Inventory status for OV-fiets bicycle rentals
  • Geographic coordinates and access approach information

Supplementary Functionality

  • Multilingual Support: Data presentation capability in both Dutch and English.
  • Query Versatility: Search capability supporting station nomenclature, alphanumeric codes, or UIC identifiers.
  • Temporal Synchronization: Correct management of time bases for stations situated across different time zones.
  • Dynamic Tracking: Monitoring of service alterations, delays, and cancellations as they occur.

Licensing Details

This software artifact is distributed under the terms of the MIT License; consult the LICENSE document for specifics.

WIKIPEDIA: XMLHttpRequest (XHR) is an API in the form of a JavaScript object whose methods transmit HTTP requests from a web browser to a web server. The methods allow a browser-based application to send requests to the server after page loading is complete, and receive information back. XMLHttpRequest is a component of Ajax programming. Prior to Ajax, hyperlinks and form submissions were the primary mechanisms for interacting with the server, often replacing the current page with another one.

== History == The concept behind XMLHttpRequest was conceived in 2000 by the developers of Microsoft Outlook. The concept was then implemented within the Internet Explorer 5 browser (1999). However, the original syntax did not use the XMLHttpRequest identifier. Instead, the developers used the identifiers ActiveXObject("Msxml2.XMLHTTP") and ActiveXObject("Microsoft.XMLHTTP"). As of Internet Explorer 7 (2006), all browsers support the XMLHttpRequest identifier. The XMLHttpRequest identifier is now the de facto standard in all the major browsers, including Mozilla's Gecko layout engine (2002), Safari 1.2 (2004) and Opera 8.0 (2005).

=== Standards === The World Wide Web Consortium (W3C) published a Working Draft specification for the XMLHttpRequest object on April 5, 2006. On February 25, 2008, the W3C published the Working Draft Level 2 specification. Level 2 added methods to monitor event progress, allow cross-site requests, and handle byte streams. At the end of 2011, the Level 2 specification was absorbed into the original specification. At the end of 2012, the WHATWG took over development and maintains a living document using Web IDL.

== Usage == Generally, sending a request with XMLHttpRequest has several programming steps.

Create an XMLHttpRequest object by calling a constructor: Call the "open" method to specify the request type, identify the relevant resource, and select synchronous or asynchronous operation: For an asynchronous request, set a listener that will be notified when the request's state changes: Initiate the request by calling the "send" method: Respond to state changes in the event listener. If the server sends response data, by default it is captured in the "responseText" property. When the object stops processing the response, it changes to state 4, the "done" state. Aside from these general steps, XMLHttpRequest has many options to control how the request is sent and how the response is processed. Custom header fields can be added to the request to indicate how the server should fulfill it, and data can be uploaded to the server by providing it in the "send" call. The response can be parsed from the JSON format into a readily usable JavaScript object, or processed gradually as it arrives rather than waiting for the entire text. The request can be aborted prematurely or set to fail if not completed in a specified amount of time.

== Cross-domain requests ==

In the early development of the World Wide Web, it was found possible to brea

See Also

`