HKLaw MCP
A stateless MCP server for Hong Kong legal research, offering tools to analyze legal intent, search official HKeL statutes, fetch current law metadata, and check source status.
README
Hong Kong Law MCP
A stateless Model Context Protocol server for Hong Kong legal research, backed by official Hong Kong e-Legislation (HKeL) open-data manifests.
This is the Hong Kong foundation for a planned multi-jurisdiction service covering Hong Kong, Singapore, and Malaysia.
Current tools
The v0.1 core exposes four tools:
analyze_legal_intent— classifies a Hong Kong legal-research request and highlights source/high-stakes cautions without giving a legal conclusion.search_hk_laws— searches the official current HKeL manifest by chapter number or title.get_hk_law— returns current chapter metadata, status, version date, official HKeL URL, and machine-readable source provenance.get_hk_source_status— reports current official HKeL manifest timestamps for English and Traditional Chinese.
Source policy
Primary source: Hong Kong Department of Justice, Hong Kong e-Legislation (HKeL).
Current manifests:
- English:
https://resource.data.one.gov.hk/doj/data/hkel_list_c_all_en.json - Traditional Chinese:
https://resource.data.one.gov.hk/doj/data/hkel_list_c_all_zh-Hant.json - Simplified Chinese:
https://resource.data.one.gov.hk/doj/data/hkel_list_c_all_zh-Hans.json
Tool responses preserve official HKeL URLs, current version dates, status information, source filenames, and available SHA-256 provenance.
Legal-status distinction
Machine-readable data and HTML are used for research and retrieval. Where legal-status verification matters, use the official HKeL page and verified PDF copy carrying the official verification mark.
Simplified Chinese
HKeL states that its Simplified Chinese text is software-converted from Traditional Chinese and is for information only. If there is inconsistency or ambiguity, Traditional Chinese prevails. The MCP surfaces this warning whenever zh-Hans is requested.
Architecture
The current core is deliberately stateless: MCP clients call a Streamable HTTP endpoint, and the Worker retrieves current metadata from official HKeL manifests. Full-text provision indexing and point-in-time legislation can be added as separate persistence adapters without changing the public jurisdiction interface.
Local validation
Install dependencies and run:
npm run typecheck
npm test
Cloudflare/Wrangler deployment configuration is intentionally kept separate from this initial application-code PR.
Roadmap
HK v0.2
- Add full-text provision search/read from official HKeL machine-readable packages.
- Add point-in-time legislation and past-version retrieval.
- Add judgment search/read using authoritative Judiciary sources.
- Add amendment and legislative-history tools.
- Add citation and version-fidelity evals.
- Add production rate limiting and authentication where appropriate.
Singapore and Malaysia
Keep one public MCP interface with jurisdiction-specific adapters while preserving each jurisdiction's authoritative-source, commencement, versioning, citation, and court-hierarchy semantics.
Disclaimer
Research assistance only; not legal advice. Verify source text, version date, commencement/status, and any verified-copy requirements before relying on a result.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.