Skip to content

Malaysia legal AI, grounded in the official text.

Add mylaw.my as an MCP server and Claude, ChatGPT, Cursor, or any other MCP client can search Malaysian legislation, read the provisions, and quote them as published — with your personal access token.

What grounded legal AI means here

A chat model asked about Malaysian law answers from memory. It has read a great deal of Malaysian law, but it is not looking at any of it while it answers, so it reconstructs both the wording and the numbering. Section numbers are exactly the detail that reconstructs wrong. Connecting mylaw.my replaces the memory with the text.

Answering from memory

Ask an unconnected assistant for the termination notice period under the Employment Act 1955 and you usually get a section number and a paraphrase of the rule. The paraphrase is often close. The number is a guess, and nothing in the answer separates the two.

Answering from mylaw.my

Connected, it resolves “Employment Act 1955” to Act 265, reads section 12, and answers from what subsection (2)(a) says: four weeks' notice where the employee has been employed for less than two years. It names the Act, the 1 August 2023 update, and the subsection it read.

Why the citation matters

The citation is what makes an answer usable at work. Given an Act and a section you can open the provision here or at the Attorney General's Chambers, read it in full, and see what has amended it — so you are relying on the provision rather than on a summary of it. An answer with no citation cannot be checked, and an unverifiable answer about the law is not research.

What your assistant can read

Your assistant reads the same Malaysian corpus this site serves: federal law from the Attorney General's Chambers and state law from the Sabah and Sarawak gazettes, parsed into sections, paragraphs, and schedules it can quote, rather than held as PDFs it would have to summarise.

Malaysia corpus

State Subsidiary Legislation
28,792
Rules and notices made under a state law.
Court Decision
10,409
Federal Notification
8,838
Notices, appointments, and declarations published in the gazette.
Federal Subsidiary Legislation
6,914
Rules, regulations, and orders made by ministers under an Act.
Principal Act
861
Law passed by Parliament.
Amendment Act
400
A law that changes an existing Act rather than standing on its own.
State Ordinance
153
Law made by a state under its earlier legislature — mainly Sabah and Sarawak.
State Enactment
114
Law passed by a state legislative assembly.
State Constitution
3
The constitution of a single state.
Ordinance
3
Law made before the present Parliament, or under emergency powers.
Federal Constitution
1
The supreme law of the Federation. Every other law must be consistent with it.

Counted live from the corpus this site serves. How we source it.

How to connect

Two steps: issue a token, then paste one command into your client. The endpoint speaks streamable HTTP and authenticates with a bearer token, so any MCP client can use it.

Step 1: Create your token

Every connection authenticates with a personal token from your mylaw.my account. Tokens are shown once and can be revoked any time.

Create your token

Optional — fills your token into the commands below. It stays on this page; nothing is stored or sent.

Step 2: Add mylaw.my to your client

https://mylaw.my/api/mcp

Claude: Adds the remote server with an Authorization header — works in Claude Code and the Claude CLI.

Set your token, then add the server

export MYLAW_MY_MCP_TOKEN=mylaw_my_REPLACE_WITH_YOUR_TOKEN
claude mcp add --transport http mylaw-my https://mylaw.my/api/mcp --header "Authorization: Bearer ${MYLAW_MY_MCP_TOKEN}"
Server name
mylaw-my
Endpoint
https://mylaw.my/api/mcp
Transport
Streamable HTTP
Auth
Bearer token

What to ask once it is connected

Ask in plain language and name the instrument if you know it. The assistant resolves the name to an instrument, reads the provisions it needs, and answers from that text — so ask it to cite and quote, and check what it quotes.

  • What does the Employment Act 1955 say about termination notice? Cite the sections.

  • When is a contract voidable under the Contracts Act 1950? Quote the provisions.

  • Summarise a director's duties under the Companies Act 2016, with section citations.

  • What does the PDPA 2010 require before personal data leaves Malaysia?

Prefer to try it without setting anything up? The same corpus answers in the browser, or start from search.

What it does not do

  • It is not legal advice and it does not know your facts. It reports what a provision says, not what you should do about it.
  • Coverage is not complete. When an instrument is not in the corpus the tools report it as absent, which means “not here” and never “does not exist”.
  • Status and amendment history are derived from recorded relationships between instruments. Check the Attorney General's Chambers before relying on an in-force date.
  • Some older instruments reach us only as scans, so a provision can still carry page furniture from the printed gazette. Nothing is rewritten to tidy it — what the assistant reads is what was extracted.
  • Grounding gives the assistant the right text. It does not stop it reasoning badly about that text, so read the provisions it quotes rather than only its summary of them.

Questions about Malaysia legal AI

What is grounded legal AI?
An assistant that answers from the text of the law instead of from memory. mylaw.my gives your assistant read access to Malaysian legislation over MCP, so an answer can name the instrument and provision it came from and quote it as published.
How much Malaysian law can the assistant read?
mylaw.my holds 56,488 Malaysian works: 46,079 legislative instruments and 10,409 court decisions, parsed into 2,201,962 citable provisions and spanning 1900 to 2027.
Does it cover Malaysian court judgments?
Yes. 10,409 judgments and grounds of decision sit in the same corpus as the legislation, so the assistant can search them and read them by neutral citation alongside the statute text.
Which AI assistants can connect to mylaw.my?
Any client that speaks the Model Context Protocol over streamable HTTP. The setup on this page covers Claude, the Codex CLI, Cursor, and VS Code; the same endpoint and bearer token work for any other MCP client.
Does it read the Malay text as well as the English?
Where the publisher issued a law in both languages, both are in the corpus and the assistant can read either. Malaysian law published after the National Language Acts is often authoritative in Bahasa Malaysia, so ask for the language you need.
Does connecting mylaw.my cost anything?
A mylaw.my account and the MCP tokens it issues are free. You pay only what your own assistant costs you to run.
How is access secured?
Each token belongs to one account, is shown once when created, and can be revoked at any time from your account page. Requests carry it as a bearer token over HTTPS.
Can I rely on what the assistant says about Malaysian law?
Verify it first. mylaw.my is a free public interface, not the official publisher, and the assistant is a language model reading it. Open the provision it cites and check it against the official text before relying on either.

A mylaw.my account is free, and the token it issues is what your assistant authenticates with.

Create your token