Transport NSW

A Model Context Protocol (MCP) implementation for some useful Transport NSW API endpoints.
  • python

0

GitHub Stars

python

Language

7 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs

This MCP server provides a programmable interface to Transport NSW data, enabling you to query transport stops, fetch current alerts and disruptions, and monitor real-time departures via a Model Context Protocol client. It wraps the Transport NSW API in a standardized, AI-friendly service so you can integrate transit data into your applications and workflows.

How to use

You can access three core capabilities through a MCP client: find transport stops by name or location, retrieve current transport alerts and disruptions, and fetch real-time departure information for specific stops. The server exposes these endpoints in a consistent, model-friendly format so you can build intelligent agents, dashboards, or automation that rely on up-to-date transit data.

How to install

Prerequisites: you need Python-enabled tooling and a way to run the MCP server locally.

Follow these steps to set up and run the MCP server locally.

# 1. Clone this project
# Replace with your preferred clone method and URL
# git clone https://example.com/transportnsw-mcp.git

# 2. Create a Python virtual environment using uv as the package manager
uv venv

# 3. Install or sync dependencies
uv sync

# 4. Create a configuration file with your API key
# Put your actual API key in place of YOUR_API_KEY
OPEN_TRANSPORT_API_KEY=your_api_key_here

Run the MCP Inspector (optional)

If you want to run the MCP Inspector to view and test the API interactively, start the inspector frontend and point it to the local server.

uv run mcp dev api.py

Then open the inspector in your browser at http://localhost:5173 (port may vary).


## Available tools

### find\_transport\_stops

Query transport stops by name or coordinates to retrieve matching stop records.

### get\_transport\_alerts

Fetch current transport alerts and apply optional filters by date or motor type.

### get\_departure\_monitor

Retrieve real-time departures for a specific stop, with optional time and vehicle type filters.
Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational