TfNSW Realtime Alerts MCP Server

by MCP-Mirror

256 downloads
Not rated
GitHub

About

A Model Context Protocol server that integrates with Transport for NSW’s Realtime Alerts API. It enables AI assistants to access up-to-date information about transport disruptions, planned works, and other alerts across the NSW transport network. Designed for developers and…

Details

Author
MCP-Mirror
Downloads
256
Categories
Other

- Resources accessible via nsw-transport:// URIs
- Filter alerts by transport mode (buses, trains, ferries, etc.)
- Provides get-transport-alerts tool with formatted alert details
- Offers transport-disruption-summary prompt for LLM summarisation
- Plain text alert format for easy AI consumption
- Supports eight transport modes including all modes

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name TfNSW Realtime Alerts MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install and configure by adding the server config to your Claude Desktop settings file. Use the command npx -y tfnsw-realtime-alerts-mcp-server and set the environment variable NSW_TRANSPORT_API_KEY to your TfNSW Open Data API key. The server provides tools like get-transport-alerts (filterable by transport mode) and prompts such as transport-disruption-summary.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "tfnsw realtime alerts mcp server": {
            "tfnsw-realtime-alerts": {
                "command": "npx",
                "args": [
                    "-y",
                    "tfnsw-realtime-alerts-mcp-server"
                ],
                "env": {
                    "NSW_TRANSPORT_API_KEY": "your_api_key_here"
                }
            }
        }
    }
}

McpServers

{
    "tfnsw-realtime-alerts": {
        "command": "npx",
        "args": [
            "-y",
            "tfnsw-realtime-alerts-mcp-server"
        ],
        "env": {
            "NSW_TRANSPORT_API_KEY": "your_api_key_here"
        }
    }
}

TfNSW Realtime Alerts MCP Server

A Model Context Protocol server for Transport for NSW's (TfNSW) Realtime Alerts API. This server provides tools to access and interact with real-time transport alerts and information via Large Language Models.

Overview

This TypeScript-based MCP server implements integration with Transport for NSW's Realtime Alerts system. It enables AI assistants to access up-to-date information about transport disruptions, planned works, and other important alerts across the NSW transport network.

Features

Resources

- List and access transport alerts via nsw-transport:// URIs - Filter alerts by transport mode (buses, trains, ferries, etc.) - Plain text format for easy consumption by AI assistants

Tools

- get-transport-alerts - Retrieve current transport alerts - Filter by transport mode - Returns formatted alert information including affected routes, time periods, and impact details

Prompts

- transport-disruption-summary - Generate a summary of current transport alerts - Includes relevant alert details as embedded resources - Returns structured prompt for LLM summarisation of major disruptions

Transport Modes

The following transport modes are supported:

- all - All transport modes
- buses - Sydney Metro and Outer Metro Bus services
- ferries - Sydney Ferries and Newcastle Transport ferries
- lightrail - Light Rail services
- metro - Sydney Metro
- nswtrains - NSW Trains regional trains and coaches
- regionbuses - Regional Bus services
- sydneytrains - Sydney Trains suburban and intercity network

Authentication

This server requires authentication with the TfNSW Open Data API. You will need to register for an API key at the TfNSW Open Data Hub.

Installation

To use with Claude Desktop, add the server config:

On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json

On Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "tfnsw-realtime-alerts": {
      "command": "npx",
      "args": [
        "-y",
        "tfnsw-realtime-alerts-mcp-server"
      ],
      "env": {
        "NSW_TRANSPORT_API_KEY": "your_api_key_here"
      }
    }
  }
}

Replace "your_api_key_here" with your TfNSW API key from the TfNSW Open Data Hub.

Development

Configure your API key as an environment variable in your .env file:

NSW_TRANSPORT_API_KEY="your_api_key_here"

Install dependencies:

npm install

Build the server:

npm run build

For development with auto-rebuild:

npm run watch

Debugging

You can use the MCP Inspector for debugging, which is available as a package script:

npm run inspector

The Inspector will provide a URL to access debugging tools in your browser.

License

This project is licensed under the MIT License - see the LICENSE file for details.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.