- Home
- MCP servers
- LegCo
LegCo
- typescript
2
GitHub Stars
typescript
Language
4 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.
You can access Hong Kong Legislative Council open data through a remote MCP server that supports HTTP, Server-Sent Events (SSE), and WebSocket transports. It brings together voting results, bills, questions, and Hansard data with fast, edge-deployed access and robust search capabilities for AI-assisted research and integration.
How to use
Connect with an MCP client using one of the supported transports: SSE for real-time streaming, HTTP for simple request/response, or WebSocket for bidirectional communication. The server provides multi-word search, enhanced filtering, and comprehensive endpoints for voting results, bills, questions, and Hansard data. Use the transport that best fits your application: SSE for live updates, HTTP for easy programmatic calls, or WebSocket when you need a persistent connection for interactive experiences.
How to install
Prerequisites you need before starting:
- Node.js and npm installed on your development machine
- Basic command line usage knowledge
- Optional: a modern browser for testing SSE or WebSocket clients
Step-by-step installation and startup from scratch:
- Clone the MCP server repository
- Install dependencies
- Run the development server or deploy for production
git clone https://github.com/your-repo/legco-search-mcp
cd legco-search-mcp
npm install
npm run dev
# To deploy
# npm run deploy
Endpoints and data sources
Production endpoints you can connect to:
- SSE (recommended): https://legco-search-mcp.herballemon.workers.dev/sse
- HTTP: https://legco-search-mcp.herballemon.workers.dev/mcp-http
- WebSocket: wss://legco-search-mcp.herballemon.workers.dev/mcp
- Health Check: https://legco-search-mcp.herballemon.workers.dev/health Data coverage includes: Voting Results, Bills, Questions (Oral and Written), and Hansard records dating from 2012 onward, with historical Bills data back to 1844.
Security and performance
The MCP server enforces rate limiting (60 requests per minute per IP), supports CORS, validates and sanitizes inputs, and includes robust error handling with detailed request logging. It is designed to run at the edge with Cloudflare, providing low latency worldwide and automatic retry logic for resilient operations.
Troubleshooting
If you encounter connectivity or formatting issues, ensure you are using the correct transport and endpoint. For browser-based applications, prefer SSE to avoid cross-origin restrictions. If you see protocol or compatibility messages, verify you are using a supported protocol version (2024-11-05) with your MCP client.
Available tools
ping
Check server status and connectivity.
search_voting_results
Search voting results from LegCo meetings with detailed vote breakdowns.
search_bills
Search legislative bills with comprehensive bill information and tracking.
search_questions
Search parliamentary questions raised by Members at Council meetings.
search_hansard
Search official Hansard records of parliamentary proceedings and debates.