TfNSW Realtime Alerts MCP Server
A Model Context Protocol (MCP) server for TfNSW's realtime alerts API
Overview
TfNSW Realtime Alerts MCP Server is a Model Context Protocol (MCP) server designed for Transport for NSW's (TfNSW) Realtime Alerts API, providing tools to access and interact with real-time transport alerts and information via Large Language Models.
To use the server, you need to register for an API key at the TfNSW Open Data Hub, set the API key as an environment variable, and configure the server in your application. You can then access transport alerts using specific commands and prompts.
- Access transport alerts via
nsw-transport://URIs. - Filter alerts by transport mode (buses, trains, ferries, etc.). - Retrieve current transport alerts with detailed information. - Generate summaries of current transport alerts for AI assistants.
- Providing real-time updates on transport disruptions.
- Assisting AI assistants in delivering timely transport information.
- Integrating transport alerts into applications for enhanced user experience.
Add to your AI client
Use these steps to connect TfNSW Realtime Alerts MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"tfnsw-realtime-alerts-mcp-server-piddlingtuna": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-tfnsw-realtime-alerts-mcp-server-piddlingtuna"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"tfnsw-realtime-alerts-mcp-server-piddlingtuna": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-tfnsw-realtime-alerts-mcp-server-piddlingtuna"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"tfnsw-realtime-alerts-mcp-server-piddlingtuna": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-tfnsw-realtime-alerts-mcp-server-piddlingtuna"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"tfnsw-realtime-alerts-mcp-server-piddlingtuna": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-tfnsw-realtime-alerts-mcp-server-piddlingtuna"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"tfnsw-realtime-alerts-mcp-server-piddlingtuna": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-tfnsw-realtime-alerts-mcp-server-piddlingtuna"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"tfnsw-realtime-alerts-mcp-server-piddlingtuna": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-tfnsw-realtime-alerts-mcp-server-piddlingtuna"
]
}
}
}FAQ
How do I authenticate with the server?
You need to register for an API key at the TfNSW Open Data Hub and set it as an environment variable.
What transport modes are supported?
The server supports various modes including buses, trains, ferries, light rail, and more.
Is the server currently in development?
Yes, the server is still in development, and features may change as improvements are made.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":1878,"uuid":"854cddd7-03d8-438b-8d35-381b848ef6d6","name":"tfnsw-realtime-alerts-mcp-server","title":"TfNSW Realtime Alerts MCP Server","description":"A Model Context Protocol (MCP) server for TfNSW's realtime alerts API","avatar_url":"https://avatars.githubusercontent.com/u/46484970?v=4","created_at":"2025-03-05T05:50:26.631Z","updated_at":"2025-03-12T10:21:41.571Z","status":"created","author_name":"piddlingtuna","author_avatar_url":"https://avatars.githubusercontent.com/u/46484970?v=4","tags":"[]","category":"research-and-data","is_featured":false,"sort":1,"url":"https://github.com/piddlingtuna/tfnsw-realtime-alerts-mcp-server","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"4\",\"license\":\"MIT license\",\"language\":\"JavaScript\",\"is_official\":false,\"latest_commit_time\":\"2025-03-09 14:02:42\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]