- Home
- MCP servers
- Hong Kong transportation Data
Hong Kong transportation Data
- python
3
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"hkopenai-hk-transportation-mcp-server": {
"command": "python",
"args": [
"server.py"
]
}
}
}Hong Kong transportation MCP Server provides a FastMCP interface to Hong Kong’s transportation data, including daily passenger traffic statistics, real-time bus route data for KMB and Long Win, and current waiting times at land boundary control points. It is designed for developers and clients that need up-to-date transit insights and quick integration with MCP clients.
How to use
You connect to the MCP server using your MCP client and then request data streams or endpoints for passenger statistics, real-time bus routes, and waiting times. Use the server to filter results by language or date ranges and to fetch the latest data in real time as needed.
How to install
Prerequisites: you need Python installed on your system. You also need pip to install dependencies.
Steps to set up and run the MCP server locally:
# Step 1: Create and enter a project directory
mkdir hk_transport_mcp
cd hk_transport_mcp
# Step 2: Install Python dependencies
pip install -r requirements.txt
# Step 3: Run the MCP server
python server.py
Additional notes
This MCP server exposes data from multiple sources: passenger traffic data from the Hong Kong Immigration Department and bus route data from Kowloon Motor Bus and Long Win Bus Services. You can run the server in standard mode or enable SSE for server-sent events by using the --sse flag.
Running options: default is the standard startup. SSE mode is available on port 8000 when you start with the --sse option.
Cline integration shows how to connect the MCP server to a host client using stdio with a command and arguments (see the integration example snippet).
Testing: you can verify the setup with tests located in the tests/ directory. Run tests with pytest.
Available tools
Passenger Traffic Statistics
Get daily passenger traffic statistics at Hong Kong control points with filters for date ranges and a breakdown by visitor type.
Real time Arrival Data of KMB and LWB
Retrieve all bus routes for Kowloon Motor Bus and Long Win Bus Services with language filtering options.
Land Boundary Waiting Times
Fetch current waiting times at Hong Kong land boundary control points with language filtering.