mcp-server-public-transport
mcp-server-public-transport
유럽 전역의 실시간 대중교통 데이터를 제공하는 MCP 서버입니다.
소개
mcp-server-public-transport는 유럽 전역의 대중교통 데이터에 접근할 수 있는 Model Context Protocol (MCP) 호환 로컬 서버입니다. 현재 영국, 스위스, 노르웨이, 벨기에, 베를린/브란덴부르크의 API를 통합하여 기차 연결편, 실시간 출발 정보, 버스 위치 등을 조회할 수 있습니다.
Related MCP server: BVG MCP Server
기능 구현 상태
지원 국가
국가 | API 기본 URL | 상태 |
영국 | ✅ | |
스위스 | ✅ | |
벨기에 | ✅ | |
노르웨이 | ✅ | |
베를린/브란덴부르크 | ✅ |
국가별 기능
기능 | API 경로 | 상태 |
영국 | ||
실시간 출발 정보 |
| ✅ |
스위스 | ||
연결편 검색 |
| ✅ |
역 조회 |
| ✅ |
출발 안내판 |
| ✅ |
주변 역 |
| ✅ |
벨기에 | ||
실시간 출발 정보 |
| ✅ |
역 조회 |
| ✅ |
주변 역 |
| ✅ |
노르웨이 | ||
장소 검색 |
| ✅ |
실시간 출발 정보 |
| ✅ |
여행 계획 |
| ✅ |
가장 가까운 정류장 |
| ✅ |
베를린/브란덴부르크 | ||
위치 검색 |
| ✅ |
실시간 출발 정보 |
| ✅ |
실시간 도착 정보 |
| ✅ |
여정 계획 |
| ✅ |
주변 역 |
| ✅ |
설정
환경 변수
다음 환경 변수를 설정하세요:
UK_TRANSPORT_APP_ID=your_uk_app_id
UK_TRANSPORT_API_KEY=your_uk_api_keyClaude Desktop에서 사용하기
claude_desktop_config.json`에 추가하세요:
{
"mcpServers": {
"mcp-server-public-transport": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/mcp-server-public-transport",
"run",
"server.py"
],
"env": {
"UK_TRANSPORT_APP_ID": "your-uk-app-id",
"UK_TRANSPORT_API_KEY": "your-uk-api-key"
}
}
}
}
/ABSOLUTE/PATH/TO/PARENT/FOLDER/mcp-server-public-transport를 저장소를 복제한 실제 경로로 바꾸세요.
참고: 명령 필드에 uv 실행 파일의 전체 경로를 입력해야 할 수도 있습니다. MacOS/Linux에서는
which uv, Windows에서는where uv를 실행하여 확인할 수 있습니다.
개발
개발 환경 설정
저장소 복제
git clone https://github.com/mirodn/mcp-server-public-transport.git
cd mcp-server-public-transport의존성 설치
uv sync환경 변수 설정
cp .env.example .env서버 실행
uv run server.py테스트 실행
이 프로젝트는 테스트를 위해 pytest를 사용하며 다음 명령을 사용할 수 있습니다:
# Run all tests
make test코드 품질
# Run linting
make lint
# Run code formatting
make format지속적 통합 (CI)
이 프로젝트에는 다음을 자동으로 수행하는 GitHub Actions 워크플로우(.github/workflows/test.yml)가 포함되어 있습니다:
Python 3.10, 3.11, 3.12에서 테스트 실행
ruff를 사용한 린팅 검사 실행
main브랜치에 대한 모든 푸시 및 풀 리퀘스트 시 실행
CI 파이프라인은 변경 사항이 병합되기 전에 지원되는 모든 Python 버전에서 코드 품질과 호환성을 보장합니다.
기여
기여를 환영합니다! 자유롭게 풀 리퀘스트를 제출해 주세요.
패키지는 pyproject.toml에서 project.version이 업데이트되면 PyPI에 자동으로 배포됩니다.
버전 관리는 semver를 따르세요.
라이선스
Available Tools
13 toolsbe_get_departuresB
Get live departure board for a Belgian train station.
Inputs: station (required), limit. Returns: object
be_get_vehicleA
Get details about a specific Belgian train vehicle by its ID.
Inputs: vehicle_id (required). Returns: object
be_search_connectionsB
Search train connections in Belgium between two stations. Powered by iRail API for real-time routes and schedules.
Inputs: origin (required), destination (required), results, date, +1 more. Returns: object
be_search_stationsB
Search for Belgian train stations by name.
Inputs: query (required). Returns: object
ch_get_departuresC
Get departure board for a Swiss train station with real-time information.
Inputs: station (required), limit, datetime. Returns: object
ch_nearby_stationsC
Find nearby Swiss train stations based on coordinates (latitude, longitude).
Inputs: latitude (required), longitude (required), distance. Returns: object
ch_search_connectionsA
Search for train connections in Switzerland between two stations. Uses transport.opendata.ch API to provide real-time connection data including departure times, duration, platforms, and transfers.
Inputs: origin (required), destination (required), limit, date, +2 more. Returns: object
ch_search_stationsC
Search for Swiss train stations by name or location.
Inputs: query (required), type. Returns: object
no_nearest_stopsB
Find nearest StopPlaces for a coordinate (lat, lon) within a radius in meters.
Inputs: lat (required), lon (required), radius, limit. Returns: object
no_search_placesC
Autocomplete search across stops/addresses/POIs in Norway via Entur Geocoder.
Inputs: text (required), lang, size. Returns: object
no_stop_departuresB
Upcoming departures for a StopPlace ID (e.g., 'NSR:StopPlace:58368').
Inputs: stop_place_id (required), limit. Returns: object
no_tripC
Door-to-door trip planning between two StopPlaces (NSR IDs).
Inputs: from_id (required), to_id (required), date_time, results. Returns: object
uk_live_departuresA
Get live departure information for a UK train station using its CRS code (e.g., 'PAD' for London Paddington, 'MAN' for Manchester Piccadilly). Uses the TransportAPI station timetables endpoint with live data.
Inputs: station_code (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Tools are clearly distinguished by country prefix (be_, ch_, no_, uk_) and specific functions like departures, connections, stations, and trips, with minimal overlap. However, some tools like be_get_departures and uk_live_departures serve similar purposes across different regions, which could cause minor confusion if an agent doesn't prioritize the country prefix.
Naming follows a consistent pattern of country prefix + verb_noun (e.g., be_get_departures, ch_search_connections), with all tools using snake_case. Minor deviations include no_nearest_stops (using 'nearest' instead of 'search' or 'get') and no_trip (using a noun instead of verb_noun), but overall the convention is predictable and readable.
With 13 tools, the count is well-scoped for a public transport server covering multiple countries (Belgium, Switzerland, Norway, UK). Each tool earns its place by providing distinct functionality per region, such as departures, connections, station searches, and trip planning, without being overly bloated or sparse.
The toolset offers comprehensive coverage for public transport queries across four countries, including core operations like searching stations, getting departures, and planning connections. Minor gaps exist, such as no tool for vehicle details outside Belgium or real-time alerts, but agents can work around these with the available tools for most common use cases.
Maintenance
Related MCP Connectors
An MCP server for Georgian public data, read from the organizations that publish it.
MCP server with quote and live cryptocurrency price tools, local and cloud-deployed transports.
MCP server for Travel & Transportation
MCP server for China Railway 12306 ticket availability: schedules and seats by Chinese station name.
Related MCP Servers
- FlicenseDqualityDmaintenanceProvides access to Berlin's public transport data through the VBB API, enabling users to search stops, get departures, and plan journeys across Berlin-Brandenburg.36-
- AlicenseNot gradedqualityDmaintenanceAn 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
- AlicenseAqualityDmaintenanceA zero-authentication MCP server for Swiss public transport, enabling users to query train connections, disruptions, station facilities, and plan journeys using natural language.121MIT
- AlicenseAqualityDmaintenanceMCP server for Swiss public transport — connections, stationboards, real-time delays, and direct booking links for SBB.426 PyPI1MIT