pongiotdevelop
MCP Serverpongiotdeveloppublic

kmb_mcp

提供九龙巴士路线、站点和预计到达时间信息的MCP服务器。

Repository Info

0
Stars
0
Forks
0
Watchers
0
Issues
Python
Language
-
License

About This Server

提供九龙巴士路线、站点和预计到达时间信息的MCP服务器。

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

Kowloon Motor Bus (KMB) MCP Server

A Model Context Protocol (MCP) server that provides KMB route, stop, and ETA information from https://data.etabus.gov.hk/

Features

  • Get Routes List and information
  • Get Stops List and information
  • Get ETA information

Data Source

This project utilizes the official ETA Bus API: BASE_URL = "https://data.etabus.gov.hk/"

Prerequisites

  • Python 3.10 or higher
  • requests library
  • fastmcp library

Installation

  1. Install Python

  2. Install required dependencies:

pip install requests fastmcp
  1. Clone this repository:
git clone https://github.com/pongiotdevelop/kmb_mcp.git

Usage

  1. Add the below to your MCP configuration
{
    "mcpServers": {
        "kmb_mcp": {
            "command": "python",
            "args": [
                "<directory of the project>/kmb_mcp.py"
            ]
        }    
    }
}
  1. The server provides several tools that can be used by Language Models to Query the ETA bus information
  • get_Route_List() : Get the list of KMB bus routes.
  • get_Route_API(route: str, direction: str = "outbound", Path: str = "1") : Get the route information for a specific KMB bus route.
  • get_Stop_List() : Get the list of KMB bus stops.
  • get_Stop_API(stop_id: str) : Get the information for a specific KMB bus stop.
  • get_Route_Stop_List() : Get the list of KMB bus stops for a specific route.
  • get_Route_Stop_API(route: str, direction: str = "outbound", Path: str = "1"): Get the list of KMB bus stops for a specific route and direction.
  • get_ETA_API(stop_id: str, route: str, service_type: str = "1"): Get the ETA for KMB bus routes.
  • get_Stop_ETA_API(stop_id: str) : Get the ETA for KMB bus routes.
  • get_Route_ETA_API(route: str, service_type: str = "1") : Get the ETA for KMB bus routes.

Testing

Run the test.py for testing the API functions of MCP server:

python test.py

Dependencies

  • requests: For HTTP requests
  • fastmcp: For MCP server implementation

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Acknowledgments

  • Real-time Arrival Information of The Kowloon Motor Bus Company (1933) Limited API Specifications
  • The MCP protocol developers

Quick Start

1

Clone the repository

git clone https://github.com/pongiotdevelop/kmb_mcp
2

Install dependencies

cd kmb_mcp
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownerpongiotdevelop
Repokmb_mcp
LanguagePython
License-
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation