eu.ansvar/malaysian-law-mcp

平台与服务

by ansvar-systems

通过 MCP 访问马来西亚立法,支持在 statutes 与 provisions 间进行全文检索。

什么是 eu.ansvar/malaysian-law-mcp

通过 MCP 访问马来西亚立法,支持在 statutes 与 provisions 间进行全文检索。

README

Malaysian Law MCP Server

The Laws of Malaysia alternative for the AI age.

npm version MCP Registry License GitHub stars CI Daily Data Check Database Provisions

Query 589 Malaysian federal statutes -- from the Computer Crimes Act and Anti-Money Laundering Act to the Employment Act, Income Tax Act, and more -- directly from Claude, Cursor, or any MCP-compatible client.

If you're building legal tech, compliance tools, or doing Malaysian legal research, this is your verified reference database.

Built by Ansvar Systems -- Stockholm, Sweden


Why This Exists

Malaysian legal research is scattered across the AGC portal (lom.agc.gov.my), CommonLII, and various government gazettes. Whether you're:

  • A lawyer validating citations in a brief or contract
  • A compliance officer checking data protection or AML obligations
  • A legal tech developer building tools on Malaysian law
  • A researcher tracing legislative provisions

...you shouldn't need to navigate multiple sources and PDFs manually. Ask Claude. Get the exact provision. With context.

This MCP server makes Malaysian law searchable, cross-referenceable, and AI-readable.


Quick Start

Use Remotely (No Install Needed)

Connect directly to the hosted version -- zero dependencies, nothing to install.

Endpoint: https://mcp.ansvar.eu/law-my/mcp

ClientHow to Connect
Claude.aiSettings > Connectors > Add Integration > paste URL
Claude Codeclaude mcp add malaysian-law --transport http https://mcp.ansvar.eu/law-my/mcp
Claude DesktopAdd to config (see below)
GitHub CopilotAdd to VS Code settings (see below)

Claude Desktop -- add to claude_desktop_config.json:

json
{
  "mcpServers": {
    "malaysian-law": {
      "type": "url",
      "url": "https://mcp.ansvar.eu/law-my/mcp"
    }
  }
}

GitHub Copilot -- add to VS Code settings.json:

json
{
  "github.copilot.chat.mcp.servers": {
    "malaysian-law": {
      "type": "http",
      "url": "https://mcp.ansvar.eu/law-my/mcp"
    }
  }
}

Use Locally (npm)

bash
npx @ansvar/malaysian-law-mcp

Claude Desktop -- add to claude_desktop_config.json:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

json
{
  "mcpServers": {
    "malaysian-law": {
      "command": "npx",
      "args": ["-y", "@ansvar/malaysian-law-mcp"]
    }
  }
}

Cursor / VS Code:

json
{
  "mcp.servers": {
    "malaysian-law": {
      "command": "npx",
      "args": ["-y", "@ansvar/malaysian-law-mcp"]
    }
  }
}

Example Queries

Once connected, just ask naturally:

  • "What does the Computer Crimes Act 1997 say about unauthorised access?"
  • "Find provisions about money laundering in Malaysian law"
  • "What are the penalties under the Anti-Money Laundering Act 2001?"
  • "Show me Section 2 of the Employment Act 1955 -- the definitions"
  • "What does the Communications and Multimedia Act say about licensing?"
  • "Find provisions about evidence and computer documents"
  • "What are the offences under the Arms Act?"

What's Included

CategoryCountDetails
Statutes589 statutesComprehensive Malaysian federal legislation
Provisions24,514 sectionsFull-text searchable with FTS5
Legal Definitions5,830 definitionsExtracted from interpretation sections
Database Size~42 MBOptimized SQLite, portable
Census Coverage664 Acts enumerated589 ingestable, 75 repealed (metadata only)

Verified data only -- every provision is ingested from CommonLII (AustLII), which hosts the official English text of Malaysian consolidated statutes. Zero LLM-generated content.

Note: The CommonLII Malaysian legislation database was last updated in March 2010. Acts enacted after that date (e.g., PDPA 2010, Companies Act 2016) are not yet available from this source. A future update will supplement from AGC (lom.agc.gov.my) for post-2010 legislation.


See It In Action

Why This Works

Verbatim Source Text (No LLM Processing):

  • All statute text is ingested from CommonLII official sources
  • Provisions are returned unchanged from SQLite FTS5 database rows
  • Zero LLM summarization or paraphrasing -- the database contains regulation text, not AI interpretations

Smart Context Management:

  • Search returns ranked provisions with BM25 scoring (safe for context)
  • Provision retrieval gives exact text by act title + section number
  • Cross-references help navigate without loading everything at once

Technical Architecture:

code
CommonLII Index --> Census --> Ingest --> Parse --> SQLite --> FTS5 snippet() --> MCP response
                     |                     |                       |
              664 Acts enumerated   Section parser         Verbatim database query

Available Tools (8 core + 5 EU)

Core Legal Research Tools (8)

ToolDescription
search_legislationFTS5 search on 24,514 provisions with BM25 ranking
get_provisionRetrieve specific provision by act title + section number
search_case_lawFTS5 search on case law (reserved for future expansion)
get_preparatory_worksGet linked preparatory documents (reserved)
validate_citationValidate citation against database (zero-hallucination check)
build_legal_stanceAggregate citations from statutes and cross-references
format_citationFormat citations per Malaysian conventions
check_currencyCheck if statute is in force, amended, or repealed

EU Law Integration Tools (5)

ToolDescription
get_eu_basisGet EU directives/regulations referenced in Malaysian statutes
get_malaysian_implementationsFind Malaysian laws implementing international frameworks
search_eu_implementationsSearch EU documents with Malaysian implementation counts
get_provision_eu_basisGet international law references for specific provision
validate_eu_complianceCheck implementation status

Malaysian Legal System Context

  • Legal system: Mixed -- common law (British heritage), Islamic law (Syariah), and customary law (adat)
  • Language: Malay is official; the Malay text prevails in case of conflict (National Language Act 1963/67). However, legislation is available in both Malay and English.
  • Act numbering: Federal legislation uses "Act NNN" identifiers (e.g., Act 709 = PDPA 2010)
  • Structure: Sections (not Articles) -- common law tradition (s1, s2, s3...)
  • Key regulators: PDP Commissioner, MCMC, Bank Negara Malaysia, Securities Commission
  • ASEAN member: Participates in ASEAN Framework on Personal Data Protection

Key Acts by Domain

DomainActsSignificance
CybercrimeComputer Crimes Act 1997 (Act 563)Unauthorised access, modification, interception
TelecomCommunications and Multimedia Act 1998 (Act 588)MCMC, licensing, content regulation
FinanceAnti-Money Laundering Act 2001, Income Tax Act 1967AML/CFT obligations, fiscal compliance
EmploymentEmployment Act 1955Labour rights, minimum standards
EvidenceEvidence Act 1950Admissibility of electronic evidence (s90A-90C)
CriminalPenal Code (Revised 1997)General criminal offences including cyber-related
ConsumerConsumer Protection Act 1999E-commerce consumer protection

Data Sources & Freshness

All content is sourced from authoritative legal databases:

  • CommonLII -- AustLII's free legal information institute, hosting consolidated Malaysian statutes
  • AGC Malaysia -- Official Attorney General's Chambers portal (planned for post-2010 supplement)

Census-Driven Ingestion

The ingestion pipeline uses a census-first approach:

StepScriptOutput
Censusnpm run censusdata/census.json -- enumerates all 664 Acts
Ingestnpm run ingestdata/seed/*.json -- fetches and parses all provisions
Buildnpm run build:dbdata/database.db -- SQLite with FTS5

Security

This project uses multiple layers of automated security scanning:

ScannerWhat It DoesSchedule
CodeQLStatic analysis for security vulnerabilitiesWeekly + PRs
SemgrepSAST scanning (OWASP top 10, secrets, TypeScript)Every push
GitleaksSecret detection across git historyEvery push
TrivyCVE scanning on filesystem and npm dependenciesDaily
Docker SecurityContainer image scanning + SBOM generationDaily
Socket.devSupply chain attack detectionPRs
OSSF ScorecardOpenSSF best practices scoringWeekly
DependabotAutomated dependency updatesWeekly

See SECURITY.md for the full policy and vulnerability reporting.


Important Disclaimers

Legal Advice

THIS TOOL IS NOT LEGAL ADVICE

Statute text is sourced from CommonLII's consolidated collection. However:

  • This is a research tool, not a substitute for professional legal counsel
  • Coverage is limited to pre-2010 legislation -- PDPA 2010 and later Acts are not yet included
  • Verify critical citations against primary sources (lom.agc.gov.my) for court filings
  • The Malay text prevails in case of conflict between English and Malay versions

Before using professionally, read: DISCLAIMER.md | PRIVACY.md

Client Confidentiality

Queries go through the Claude API. For privileged or confidential matters, use on-premise deployment. See PRIVACY.md for professional compliance guidance.


Development

Setup

bash
git clone https://github.com/Ansvar-Systems/malaysian-law-mcp
cd malaysian-law-mcp
npm install
npm run build
npm test

Running Locally

bash
npm run dev                                       # Start MCP server
npx @anthropic/mcp-inspector node dist/index.js   # Test with MCP Inspector

Data Management

bash
npm run census                              # Enumerate all Acts from CommonLII
npm run ingest                              # Full census-driven ingestion
npm run ingest -- --limit 10                # Test with 10 acts
npm run ingest -- --resume                  # Resume interrupted ingestion
npm run ingest -- --skip-fetch              # Reuse cached HTML
npm run build:db                            # Rebuild SQLite database
npm run check-updates                       # Check for amendments
npm run drift:detect                        # Detect data drift

Performance

  • Search Speed: <100ms for most FTS5 queries
  • Database Size: ~42 MB (efficient, portable)
  • Ingestion Success Rate: 100% (589/589 Acts)
  • Ingestion Time: ~9 minutes for full corpus

Contract Tests

This MCP includes 12 golden contract tests covering:

  • 5 article retrieval tests (Computer Crimes Act s3, CMA s1, Evidence Act s3, AML Act s4, Employment Act s2)
  • 3 search tests (computer crimes, money laundering, income tax)
  • 2 citation roundtrip tests (commonlii.org URL patterns)
  • 2 negative tests (non-existent Act, malformed section)

Run with: npm run test:contract


Related Projects: Complete Compliance Suite

This server is part of Ansvar's Compliance Suite -- MCP servers that work together for end-to-end compliance coverage:

@ansvar/eu-regulations-mcp

Query 49 EU regulations directly from Claude -- GDPR, AI Act, DORA, NIS2, MiFID II, eIDAS, and more. Full regulatory text with article-level search. npx @ansvar/eu-regulations-mcp

@ansvar/us-regulations-mcp

Query US federal and state compliance laws -- HIPAA, CCPA, SOX, GLBA, FERPA, and more. npm install @ansvar/us-regulations-mcp

@ansvar/malaysian-law-mcp (This Project)

Query 589 Malaysian federal statutes directly from Claude -- Computer Crimes Act, AML Act, Evidence Act, Employment Act, and more. Full provision text with FTS5 search. npx @ansvar/malaysian-law-mcp

@ansvar/sanctions-mcp

Offline-capable sanctions screening -- OFAC, EU, UN sanctions lists. pip install ansvar-sanctions-mcp


Roadmap

  • Census-first full corpus ingestion -- 589 Acts, 24,514 provisions from CommonLII
  • FTS5 search -- unicode61 tokenizer for English and Malay terms
  • Legal definitions extraction -- 5,830 definitions from interpretation sections
  • AGC supplement for post-2010 legislation (PDPA 2010, Companies Act 2016, etc.)
  • Court case law integration
  • Subsidiary legislation (P.U.(A), P.U.(B))
  • Historical statute versions (amendment tracking)
  • Federal Constitution with Article-level parsing

Citation

If you use this MCP server in academic research:

bibtex
@software{malaysian_law_mcp_2026,
  author = {Ansvar Systems AB},
  title = {Malaysian Law MCP Server: Production-Grade Legal Research Tool},
  year = {2026},
  url = {https://github.com/Ansvar-Systems/malaysian-law-mcp},
  note = {Comprehensive Malaysian legal database with 589 statutes and 24,514 provisions}
}

License

Apache License 2.0. See LICENSE for details.

Data Licenses

  • Legislation: Malaysian Government (public domain / government work product)
  • Source Database: CommonLII (open access via AustLII)

About Ansvar Systems

We build AI-accelerated compliance and legal research tools for the global market. This MCP server started as part of our coverage of ASEAN jurisdictions -- Malaysian law is critical for cross-border compliance in Southeast Asia.

So we're open-sourcing it. Navigating 589 statutes shouldn't require manual PDF searching.

ansvar.eu -- Stockholm, Sweden


<p align="center"> <sub>Built with care in Stockholm, Sweden</sub> </p>

常见问题

eu.ansvar/malaysian-law-mcp 是什么?

通过 MCP 访问马来西亚立法,支持在 statutes 与 provisions 间进行全文检索。

相关 Skills

MCP构建

by anthropics

Universal
热门

聚焦高质量 MCP Server 开发,覆盖协议研究、工具设计、错误处理与传输选型,适合用 FastMCP 或 MCP SDK 对接外部 API、封装服务能力。

想让 LLM 稳定调用外部 API,就用 MCP构建:从 Python 到 Node 都有成熟指引,帮你更快做出高质量 MCP 服务器。

平台与服务
未扫描123.0k

Slack动图

by anthropics

Universal
热门

面向Slack的动图制作Skill,内置emoji/消息GIF的尺寸、帧率和色彩约束、校验与优化流程,适合把创意或上传图片快速做成可直接发送的Slack动画。

帮你快速做出适配 Slack 的动图,内置约束规则和校验工具,少踩上传与播放坑,做表情包和演示都更省心。

平台与服务
未扫描123.0k

邮件模板

by alirezarezvani

Universal
热门

快速搭建生产可用的事务邮件系统:生成 React Email/MJML 模板,接入 Resend、Postmark、SendGrid 或 AWS SES,并支持本地预览、i18n、暗色模式、反垃圾优化与追踪埋点。

面向营销与服务场景,快速搭建高质量邮件模板,省去反复设计与切图成本,成熟度和社区认可都很高。

平台与服务
未扫描12.5k

相关 MCP Server

Slack 消息

编辑精选

by Anthropic

热门

Slack 是让 AI 助手直接读写你的 Slack 频道和消息的 MCP 服务器。

这个服务器解决了团队协作中需要 AI 实时获取 Slack 信息的痛点,特别适合开发团队让 Claude 帮忙汇总频道讨论或发送通知。不过,它目前只是参考实现,文档有限,不建议在生产环境直接使用——更适合开发者学习 MCP 如何集成第三方服务。

平台与服务
84.2k

by netdata

热门

io.github.netdata/mcp-server 是让 AI 助手实时监控服务器指标和日志的 MCP 服务器。

这个工具解决了运维人员需要手动检查系统状态的痛点,最适合 DevOps 团队让 Claude 自动分析性能数据。不过,它依赖 NetData 的现有部署,如果你没用过这个监控平台,得先花时间配置。

平台与服务
78.5k

by d4vinci

热门

Scrapling MCP Server 是专为现代网页设计的智能爬虫工具,支持绕过 Cloudflare 等反爬机制。

这个工具解决了爬取动态网页和反爬网站时的头疼问题,特别适合需要批量采集电商价格或新闻数据的开发者。不过,它依赖外部浏览器引擎,资源消耗较大,不适合轻量级任务。

平台与服务
38.1k

评论