Transport NSW API Client MCP
NSW 교통 API 클라이언트(MCP 구현)
Transport NSW API와 직접 HTTP 요청을 사용하여 상호 작용하는 Claude MCP입니다.
에 대한
이 프로젝트는 Transport NSW의 API에 대한 MCP(Model Context Protocol) 서비스를 구현합니다.
Related MCP server: openbusdata
설정
이 저장소를 복제하세요
uv(빠른 Python 패키지 관리자)를 사용하여 종속성을 설치합니다.
지엑스피1
API 키로
.env파일을 만듭니다.OPEN_TRANSPORT_API_KEY=your_api_key_here(선택 사항) MCP 검사기를 실행합니다.
uv run mcp dev api.py그리고 http://localhost:5173 에서 서버를 방문하세요(포트는 다를 수 있음).
특징
정류장 찾기 API : 이름이나 좌표로 교통 정류장 찾기
알림 API : 교통 알림 및 중단에 대한 정보를 받으세요
출발 모니터 API : 교통 정류장의 실시간 출발 정보를 얻으세요
MCP 구현 : 모델 컨텍스트 프로토콜 서비스로 구성됨
사용 예
MCP 예제는 곧 제공됩니다. 아래는 표준 Python 예제입니다.
교통 정류장 찾기
from api import find_transport_stops
# Search by name
stops = find_transport_stops(stop_name="Central Station")
# Search by coordinates (Central Station area)
central_station = '151.206290:-33.884080:EPSG:4326'
stops = find_transport_stops(coord=central_station, radius=500)교통 알림 받기
from api import get_transport_alerts
# Get all current alerts
alerts = get_transport_alerts()
# Get alerts for a specific date
date_alerts = get_transport_alerts(date='22-03-2025')
# Get train alerts only (mot_type=1)
train_alerts = get_transport_alerts(mot_type=1)실시간 출발 모니터링
from api import get_departure_monitor
# Get departures from Central Station
departures = get_departure_monitor("200060") # Central Station ID
# Get departures for a specific time
from datetime import datetime
time_departures = get_departure_monitor("200060", time="15:30")
# Get only train departures
train_departures = get_departure_monitor("200060", mot_type=1) # 1 = Train데모 스크립트
이 프로젝트에는 모든 API 기능을 보여주는 포괄적인 데모 스크립트가 포함되어 있습니다.
# Run the full demo
python demo.py
# Run specific sections
python demo.py --stops # Stop finder demo
python demo.py --alerts # Transport alerts demo
python demo.py --departures # Departure monitoring demo테스트
로컬 테스트
pytest로 전체 테스트 모음을 실행합니다.
uv run pytest적용 범위 보고를 사용하여 실행:
uv run pytest --cov=api지속적인 통합
메인 브랜치에 대한 모든 푸시 및 풀 요청에 대해 GitHub Actions에서 테스트가 자동으로 실행됩니다. 워크플로는 다음과 같습니다.
Python 3.10을 설정합니다
uv 및 프로젝트 종속성을 설치합니다.
커버리지 보고를 통해 테스트를 실행합니다.
이 기능을 사용하려면:
OPEN_TRANSPORT_API_KEY를 GitHub 저장소 비밀로 추가하세요.코드를 GitHub에 푸시하세요
MCP 통합
이 프로젝트는 모델 컨텍스트 프로토콜 사양을 따르므로 AI 모델이 표준화된 인터페이스를 통해 NSW 교통 데이터에 액세스할 수 있습니다.
패키지 관리
이 프로젝트는 Rust로 작성된 최신 Python 패키지 관리자인 uv를 사용합니다. 종속성은 다음을 통해 관리됩니다.
pyproject.toml: 프로젝트 종속성을 정의합니다.uv.lock: 재현 가능한 환경에 대한 종속성 버전을 잠급니다.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceAn MCP server for interacting with the Berlin Public Transport (BVG) API to search for locations and plan journeys. It provides real-time access to departures, arrivals, trip details, and vehicle tracking within Berlin's transit network.MIT
- AlicenseCqualityBmaintenanceMCP server for the UK Bus Open Data Service, enabling timetable queries, stop search, route discovery, journey planning, and real-time bus tracking.16MIT
- Flicense-qualityDmaintenanceMCP server for real-time German public transport data (HAFAS/VBN network). Enables querying departures, arrivals, journeys, and nearby stops using natural language.
- Alicense-qualityBmaintenanceMCP server that integrates with the transport12 API to provide tools for searching stops, routes, arrivals, and vehicle forecasts, enabling natural language interaction with public transport data.9MIT
Related MCP Connectors
Swiss Transport MCP — wraps Transport Open Data API (free, no auth)
TomTom MCP — wraps the TomTom Search & Routing APIs (api.tomtom.com)
Real-time transit stops, routes, arrivals, vehicle positions, and schedules via OneBusAway APIs.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/danhussey/transportnsw-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server