Skip to main content
Glama

KMB 버스 MCP 서버

홍콩의 KMB(九龍巴士) 및 롱윈 버스(龍運巴士) 노선 정보와 도착 시간에 대한 실시간 접근을 제공하는 모델 컨텍스트 프로토콜(MCP) 서버입니다. 이 서버를 통해 언어 모델은 홍콩 버스 서비스 정보를 쿼리하여 버스 노선, 정류장, 예상 도착 시간에 대한 사용자 질문에 답변할 수 있습니다.

특징

  • 실시간 버스 도착 정보(ETA)

  • 종합적인 버스 노선 조회

  • 버스 정류장 정보 및 검색

  • 경로-정류장 매핑

  • API 호출을 최적화하기 위한 캐싱 시스템

  • 이중 언어 지원(영어 및 중국어 번체)

데이터 소스

이 프로젝트는 공식 KMB/LWB 오픈 데이터 API를 활용합니다.

필수 조건

  • Python 3.10 이상

  • uv 패키지 관리자

설치

  1. 먼저, 아직 uv를 설치하지 않았다면 설치하세요.

지엑스피1

  1. 저장소를 복제합니다.

git clone git@github.com:kennyckk/mcp_hkbus.git cd mcp_hkbus
  1. uv를 사용하여 Python 패키지를 처리합니다.

uv sync #using uv.lock

용법

  1. MCP 클라이언트(예: Claude Desktop)에서 구성을 편집하세요.

{ "mcpServers": { "bus_service": { "command": "path/to/uv.exe", "args": ["--directory", "path/to/kmb_bus", "run", "kmb_mcp.py"], "background": true } } }
  1. 서버는 언어 모델이 버스 정보를 쿼리하는 데 사용할 수 있는 여러 도구를 제공합니다.

  • get_route_list() : 모든 버스 노선 목록을 가져옵니다

  • get_stop_list() : 모든 버스 정류장 목록을 가져옵니다

  • get_route_stops() : 특정 경로에 대한 정류장을 가져옵니다.

  • find_stops_by_name() : 이름으로 버스 정류장 검색

  • get_all_routes_at_stop() : 특정 정류장을 경유하는 모든 경로를 가져옵니다.

  • get_eta() : 예상 도착 시간을 가져옵니다

테스트

pytest를 사용하여 테스트 모음을 실행합니다.

pytest test/kmb-mcp-tests.py

종속성

  • httpx : 비동기 HTTP 요청용

  • fastmcp : MCP 서버 구현용

  • pytest : 테스트용(개발 전용)

기여하다

기여를 환영합니다! 풀 리퀘스트를 제출해 주세요.

감사의 말

  • 오픈 데이터 API를 제공하는 KMB/LWB

  • MCP 프로토콜 개발자

메모

이 서비스는 KMB/LWB 오픈 데이터 API를 사용합니다. API 속도 제한을 준수하고 프로덕션 환경에서는 적절한 오류 처리를 구현해 주시기 바랍니다.

Related MCP Servers

  • A
    security
    F
    license
    A
    quality
    Enables Large Language Models to access real-time data on Vilnius public transport stops and routes through the Model Context Protocol.
    Last updated -
    2
    1
  • -
    security
    A
    license
    -
    quality
    A Model Context Protocol Server search realtime flight detail with multiple fligh carrier, price , stop , time duration for any given date using simple prompt
    Last updated -
    36
    MIT License
  • A
    security
    A
    license
    A
    quality
    A Model Context Protocol server that allows large language models to search for and analyze Chinese railway (12306) tickets through a simple API interface.
    Last updated -
    8
    510
    10
    MIT License
  • -
    security
    A
    license
    -
    quality
    An MCP server providing access to Hong Kong transportation data, including passenger traffic statistics at control points and real-time bus arrival information for KMB and Long Win Bus services.
    Last updated -
    3
    MIT License

View all related MCP servers

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/kennyckk/mcp_hkbus'

If you have feedback or need assistance with the MCP directory API, please join our Discord server