Rulewise
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Rulewise I'm building a payment app for Sri Lanka. What legal risks should I check?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Rulewise
Legal issue-spotting for people who build software. Connect it to your AI coding tool (Claude Code, Cursor, Codex, VS Code) as an MCP server. While you build, it tells you which laws apply to what you're building, how serious each one is, and what to ask a lawyer. Starts with Sri Lankan law.
It gives legal information, not legal advice.
Use it
Nothing to install. Add the hosted server to your AI tool:
Claude Code:
claude mcp add --transport http rulewise https://rulewise.victoriousdune-a7b660c5.centralindia.azurecontainerapps.io/mcpCursor (
~/.cursor/mcp.json,{"mcpServers": {"rulewise": {"url": "<address>"}}}), VS Code (.vscode/mcp.json,{"servers": {"rulewise": {"type": "http", "url": "<address>"}}}), Codex (~/.codex/config.toml,[mcp_servers.rulewise]withurl = "<address>"). Codex doesn't follow the server's own instructions, so also add the Rulewise skill (skills/rulewise/SKILL.md), or it only uses Rulewise when asked:npx skills add malithJayasinghe2000/legal-mcp(asks which AI tools to install it into). Without Node.js, add this line toAGENTS.mdinstead (project, or~/.codex/AGENTS.md):Before planning or building a product or feature, check it with the Rulewise MCP tools (get_fact_questions, then check_legal_risks).
Prefer to run it on your own computer? Install uv, then:
claude mcp add rulewise -- uvx --from git+https://github.com/malithJayasinghe2000/legal-mcp rulewiseThen just describe what you're building and where your users are. Claude calls the check_legal_risks tool
when you plan a feature for a product used in Sri Lanka. The server receives only
facts and country codes, never your idea text or code, and stores nothing.
Tools: check_legal_risks, get_fact_questions, get_rule (exact law quote + link).
Check a whole project
Already built something? Ask your AI tool to check the whole project. It reads your code on
your computer, sends Rulewise only the facts it found, and writes RULEWISE-REPORT.md: Must,
Should and Check with a lawyer items, the file each one applies to, what to fix first and
questions for a lawyer.
Claude Code plugin (the server, the skill and
/rulewise:checkin one install; use it instead of theclaude mcp addline above):/plugin marketplace add malithJayasinghe2000/legal-mcp /plugin install rulewise@rulewiseIn the VS Code panel
/pluginisn't available yet; run this in a terminal instead:claude plugin marketplace add malithJayasinghe2000/legal-mcp claude plugin install rulewise@rulewiseThen reload the window and run
/rulewise:check.Codex, Copilot and others with the Rulewise skill: say "check my project with Rulewise".
Tools that show MCP prompts: the server's
check_projectprompt does the same.Any tool with the server: "Check this project with Rulewise and write a report" works too.
PDPA 2027 checklist
Most of Sri Lanka's data protection law (PDPA) starts on 1 January 2027 (Gazette 2498/16); users' rights and
the marketing rule have no start date yet. /rulewise:pdpa (Claude Code plugin), "run the
Rulewise PDPA checklist" (skill) or the pdpa_checklist prompt checks your code against the PDPA rules
that apply and writes RULEWISE-PDPA-CHECKLIST.md: "X of Y found in your code", each item with the file
and line as proof, what is missing, and questions code can't answer. Found means seen in the code, not
verified, and there is no score: it never says "compliant".
Related MCP server: @lexvibe/mcp
Develop
uv sync # install
uv run pytest # tests
uv run --group sources python scripts/fetch_sources.py # download the law sources
claude mcp add rulewise -- uv run --directory /path/to/legal-check rulewise # use your local copyHost it
See docs/DEPLOY-AZURE.md (Docker, Azure Container Apps).
Website
See web/README.md. For now it is a home page with setup steps; the guided check is hidden (brief D21).
Status: Phase 1. 61 draft rules in 11 areas (not yet reviewed by a lawyer). Website: https://legal-mcp.vercel.app. MCP server hosted on Azure. See docs/PROJECT-BRIEF.md and docs/ROADMAP.md.
Licence
MIT. The rules are legal information, not legal advice; they are provided "as is", without warranty (see the licence and the privacy and terms page).
Available Tools
4 toolscheck_legal_risksARead-onlyIdempotentInspect
Check a planned or new feature for legal risks. Call this whenever the user plans or builds a feature for a product used in Sri Lanka, or made by a Sri Lankan company or person, even if they didn't ask about law. If the user hasn't said where the users or company are, ask them first; never guess the country. Send country codes and facts from get_fact_questions only (no idea text, no code). Returns warnings with severity (Must / Should / Check with a lawyer), the law and section, what to do, and the areas NOT covered.
Inputs: facts (required), users_in (required), done, company_in, +1 more. Returns: object
get_checklistARead-onlyIdempotentInspect
Get a law checklist for the product, for example the PDPA 2027 checklist: the rules of that law that apply to these facts, each with what to look for in the code (look_for) or ask the user (ask). Use it when the user asks whether their project is ready for the PDPA. Send country codes and facts only. Mark each item Found (with file and line), Missing or Can't tell from code; never give a score.
Inputs: facts (required), users_in (required), law, company_in, +1 more. Returns: object
get_fact_questionsARead-onlyIdempotentInspect
List the facts check_legal_risks understands, grouped, each with the question it answers. Call once before check_legal_risks.
Inputs: no named parameters. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a fairly distinct role: fact discovery (get_fact_questions), risk evaluation (check_legal_risks), single-rule proof lookup (get_rule), and law-wide checklist (get_checklist). The only real overlap is between get_rule and get_checklist, which both retrieve rule content but at different granularity; descriptions make the intended sequencing clear.
All names are snake_case verb_noun (check_legal_risks, get_fact_questions, get_rule, get_checklist), which is predictable. The minor deviation is the mix of 'check_' and 'get_' prefixes, though both are meaningful verbs rather than arbitrary variants.
Four tools is on the lean side but matches a narrow, well-defined purpose (Sri Lanka legal risk review). Each tool earns its place; there is no filler, though the surface is small enough that an agent may need to chain all four for one task.
The surface covers the full flow: discover required facts, run the risk check, prove a warning with the exact law quote, and audit against a named law checklist. Minor gaps are the lack of a way to enumerate supported countries/laws or available checklists, which forces the agent to guess checklist names like 'PDPA 2027'.
Maintenance
Related MCP Connectors
One-step legal compliance for vibe-coded apps: privacy, terms, cookie banner and EU AI Act check.
Current law as data for AI: search, read and verify statutes and citations. CIS countries first.
Declare what your app does and where it operates; get cited, jurisdiction-specific findings.
Provenance-backed EU and UK legislation for AI agents, addressable to the individual provision.
Related MCP Servers
- AlicenseAqualityBmaintenanceGenerates legal policies (privacy, terms, cookies, etc.) directly from AI coding tools by analyzing codebase context.16MIT
- AlicenseAqualityBmaintenanceOne-step legal compliance for vibe-coded apps: scans project, generates privacy policies/TOS, installs cookie consent banner, and checks EU AI Act risk.1080 npmMIT

Lawstronaut MCPofficial
FlicenseNot gradedqualityCmaintenanceConnects AI agents to 50+ million laws and court cases across 150+ jurisdictions via the Model Context Protocol.2-
Legalizeofficial
AlicenseNot gradedqualityCmaintenanceEnables AI assistants to search and read consolidated legislation from multiple countries, retrieve exact law texts as of any historical date with citations and git commit SHAs, and create webhook or email subscriptions to track legal changes.2MIT