MCP connect

Connect your AI assistant to Malaysian law.

Add mylaw.my as an MCP server so Claude, Cursor, and other assistants can search and cite Malaysian legislation directly, using your personal access token.

Token

Create a personal MCP token from your account. Tokens are shown once and can be revoked any time.

Manage tokens

Endpoint

https://mylaw.my/api/mcp
{
  "mcpServers": {
    "mylaw-my": {
      "type": "streamable-http",
      "url": "https://mylaw.my/api/mcp",
      "headers": {
        "Authorization": "Bearer mylaw_my_REPLACE_WITH_YOUR_TOKEN"
      }
    }
  }
}

Client setup

Codex CLI

Use an environment-backed bearer token so the token does not live in the config file.

export MYLAW_MY_MCP_TOKEN=mylaw_my_REPLACE_WITH_YOUR_TOKEN
codex mcp add mylaw-my --url https://mylaw.my/api/mcp --bearer-token-env-var MYLAW_MY_MCP_TOKEN

Claude Desktop or Claude CLI

Add the remote HTTP server with an Authorization header.

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}"

Cursor

Use mcp.json with a streamable HTTP server and a token environment variable.

{
  "mcpServers": {
    "mylaw-my": {
      "type": "streamable-http",
      "url": "https://mylaw.my/api/mcp",
      "headers": {
        "Authorization": "Bearer ${MYLAW_MY_MCP_TOKEN}"
      }
    }
  }
}

VS Code MCP

Prompt for the token at runtime and pass it as an Authorization header.

{
  "inputs": [
    {
      "type": "promptString",
      "id": "mylaw-my-mcp-token",
      "description": "mylaw.my MCP token",
      "password": true
    }
  ],
  "servers": {
    "mylaw-my": {
      "type": "http",
      "url": "https://mylaw.my/api/mcp",
      "headers": {
        "Authorization": "Bearer ${input:mylaw-my-mcp-token}"
      }
    }
  }
}