mcp-au-nsw
MCP servers for NSW Government APIs. Ask Claude (or any MCP client) things like "How do I get from UNSW to Circular Quay right now?", "Any crashes on the M4?" or "Where's the cheapest diesel near Parramatta?" and get live answers.
| Server | What it covers | Data source | Key |
|---|---|---|---|
transport |
Trip planning, real-time departures, service alerts (trains, metro, buses, light rail, ferries), Park&Ride car parks | TfNSW Open Data Hub | TfNSW key |
roads |
Live traffic hazards (crashes, roadworks, floods, fires, events) and toll costs | TfNSW Open Data Hub | TfNSW key (same one) |
fuel |
Live fuel prices for NSW & TAS | API.NSW | API.NSW key |
Each server is a separate subcommand, so you only add the ones you need.
Quick start
1. Get API keys (free)
TfNSW Open Data Hub (for transport and roads; one key covers both)
- Register: https://opendata.transport.nsw.gov.au/data/user/register
- Log in: https://opendata.transport.nsw.gov.au/data/user/login
- Click your profile icon → API Tokens, enter a name and click Create API Token.
- Copy the token right away; it can't be viewed again. This is your
NSW_TRANSPORT_API_KEY.
Official guide: https://opendata.transport.nsw.gov.au/developers/userguide
API.NSW (for fuel)
- Register: https://api.nsw.gov.au/Account/Register (log in: https://api.nsw.gov.au/Account/Login)
- Open the Fuel API page and click Subscribe, or go to My Apps → Add new app and attach the Fuel API: https://api.nsw.gov.au/Product/Index/22 (Each app can have only one API product.)
- Copy the app's API Key and API Secret into
NSW_FUEL_API_KEYandNSW_FUEL_API_SECRET. The free plan allows 2,500 calls per month.
2. Install uv (if you don't have it)
curl -LsSf https://astral.sh/uv/install.sh | sh
3. Add the servers to your MCP client
Claude Code
claude mcp add nsw-transport -e NSW_TRANSPORT_API_KEY=your-tfnsw-key -- uvx mcp-au-nsw transport
claude mcp add nsw-roads -e NSW_TRANSPORT_API_KEY=your-tfnsw-key -- uvx mcp-au-nsw roads
claude mcp add nsw-fuel -e NSW_FUEL_API_KEY=your-key -e NSW_FUEL_API_SECRET=your-secret -- uvx mcp-au-nsw fuel
Claude Desktop / Cursor / other clients: add the servers you want to the MCP config file (claude_desktop_config.json, .cursor/mcp.json, etc.):
{
"mcpServers": {
"nsw-transport": {
"command": "uvx",
"args": ["mcp-au-nsw", "transport"],
"env": { "NSW_TRANSPORT_API_KEY": "your-tfnsw-key" }
},
"nsw-roads": {
"command": "uvx",
"args": ["mcp-au-nsw", "roads"],
"env": { "NSW_TRANSPORT_API_KEY": "your-tfnsw-key" }
},
"nsw-fuel": {
"command": "uvx",
"args": ["mcp-au-nsw", "fuel"],
"env": { "NSW_FUEL_API_KEY": "your-key", "NSW_FUEL_API_SECRET": "your-secret" }
}
}
}
uvx caches the version it first downloads. To pick up a new release, use uvx mcp-au-nsw@latest ... or run uv cache clean mcp-au-nsw.
How the servers behave
- Places by name. Tools that take a place accept names ("Town Hall", "17 High St Kensington", "Sydney Opera House"), stop IDs, or
lat,lng. - No guessing. If a name matches several places about equally well (e.g. "UNSW" has two light rail stops, "Sydney Airport" has domestic and international stations), the tool returns the candidates instead of picking one, so the assistant can ask you.
- Live data, no caching. Every call fetches fresh data. Responses include stable IDs (stop IDs, station codes) so you can build your own lookups for analysis.
- Sydney local time. All times are
YYYY-MM-DD HH:MMin Sydney time.
transport server
| Tool | What it does |
|---|---|
plan_trip |
A-to-B journeys with legs, platforms, real-time delays and alerts. Supports arrive-by times and limiting modes |
get_departures |
Next departures from a station or stop, with real-time delays and platforms |
get_service_alerts |
Current disruptions and trackwork, filtered by mode, line (T1, L2, 333, ...) or stop |
find_stops |
Search stations, stops and wharves by name; returns stop IDs and modes |
get_car_park_availability |
Live free spaces at Transport Park&Ride car parks, by name or distance from a place |
get_car_park_history |
How full a Park&Ride car park was through a given day: hourly occupancy, peak, and when it filled up |
Example prompts:
- "How do I get from UNSW to Circular Quay right now?"
- "I need to be at Manly Wharf by 6pm. When should I leave Martin Place?"
- "When's the next train from Town Hall?"
- "Any problems on the T1 today?"
- "Are there any spaces left at the Tallawong Park&Ride?"
- "What time did the Tallawong P1 car park fill up yesterday?"
roads server
| Tool | What it does |
|---|---|
get_traffic_hazards |
Crashes, breakdowns, roadworks, floods, fires, alpine conditions and major events. Filter by area/road name or distance from a place |
calculate_toll |
Toll cost (AUD) and motorways used between two places, compared with the quickest toll-free route |
Example prompts:
- "Anything happening on the M4 right now?"
- "Any roadworks or events near Parramatta this weekend?"
- "How much are the tolls from Parramatta to Sydney International Airport, and how much time do they save?"
Toll amounts are estimates from Transport for NSW and may differ from what is actually charged.
fuel server
| Tool | What it does | API calls |
|---|---|---|
find_fuel_prices |
Cheapest (or nearest) stations for a fuel type around a suburb, postcode or coordinates | 1 (2 with a suburb/postcode) |
get_station_prices |
All current prices at one station | 1 |
search_stations |
Find stations by name, brand, suburb or postcode | 1 |
list_fuel_types |
Fuel type codes (U91, E10, P98, DL, ...) | 1 |
Prices are in cents per litre.
Example prompts:
- "Where's the cheapest diesel near UNSW?"
- "What are the prices at BP Redfern right now?"
Development
git clone https://github.com/fisher98kim/mcp-au-nsw
cd mcp-au-nsw
uv sync
uv run pytest
# run a server locally with keys from .env
uv run --env-file .env mcp-au-nsw transport
To try local changes in Claude Code:
claude mcp add nsw-transport-dev -e NSW_TRANSPORT_API_KEY=... \
-- uv run --directory /path/to/mcp-au-nsw mcp-au-nsw transport
License
MIT. Not affiliated with or endorsed by the NSW Government or Transport for NSW. Data is provided by API.NSW and the TfNSW Open Data Hub under their own terms of use.
Metadata
Release files for mcp-au-nsw 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mcp_au_nsw-0.2.0.tar.gz | 21.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcp_au_nsw-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 48.0 kB
Release files / mcp_au_nsw-0.2.0.tar.gz
| Download URL | mcp_au_nsw-0.2.0.tar.gz |
|---|---|
| Size | 21.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2d8bc049eff6830d459835890d98d628e0be5f7999c106c6d0d2a49fd2c28bc8
|
|
BLAKE2b-256 checksum How to use checksums |
5a1ff20a3d3b2929c6002897e2dddb410cde6c151e37094d7c7f5b7a2fa37fc3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / mcp_au_nsw-0.2.0-py3-none-any.whl
| Download URL | mcp_au_nsw-0.2.0-py3-none-any.whl |
|---|---|
| Size | 26.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
13ebd5036bc95655af78951253fe8fe43746fea87126807421e5f73b541b82f3
|
|
BLAKE2b-256 checksum How to use checksums |
85a787910ce7a5ef36e0ae7179643f69a8abb88a2f43b4ded9cc51de0bc1379f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for mcp-au-nsw 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.