Search Japanese laws via e-Gov Law Search and fetch article text with source attribution.
MCPpedia last refreshed this data
io.github.SHAYOUWORLD/egov-law-mcp is an MCP server that search Japanese laws via e-Gov Law Search and fetch article text with source attribution. Its tool list has not been published yet over stdio, requires no API key, and scores 85/100 on MCPpedia's security, maintenance and efficiency rubric.
Config is the same across clients - only the file and path differ.
{
"mcpServers": {
"egov-law": {
"args": [
"-y",
"@codeagentjp/egov-law-mcp"
],
"command": "npx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Search Japanese laws via e-Gov Law Search and fetch article text with source attribution.
Run this in your terminal to verify the server starts. Then let us know if it worked - your result helps other developers.
npx -y '@codeagentjp/egov-law-mcp' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories - click any category to see the underlying evidence.
No known CVEs.
Checked @codeagentjp/egov-law-mcp against OSV.dev.
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience - it helps other developers decide.
Sign in to write a review.
Others in cloud
Cloud-powered AI platform with multi-agent swarms, sandboxes, and workflow automation
Gives AI development tools Firebase-specific capabilities and expertise.
Evidence-grounded agent memory with mandatory provenance, on local SQLite or Cloudflare D1
Draw cloud architecture diagrams with official AWS, Azure and GCP icons from a prompt or Terraform.
MCP Security Weekly
Get CVE alerts and security updates for io.github.SHAYOUWORLD/egov-law-mcp and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
Local stdio MCP server for searching Japanese laws and retrieving article text from e-Gov Law Search through the e-Gov Law API Version 2.
This server does not call an LLM. It only returns source-backed law data and e-Gov URLs so your MCP client (Claude Desktop, Claude Code, Cursor, or any other agent) can cite the original source.
Design choices were informed by reading Digital Agency's open-sourced Lawsy-Custom-BQ (released 2026-04-24 as part of the Gennai government AI OSS release). See the design notes at codeagent.jp.
There is an existing egov-law-mcp on npm by another author. This package differs in four ways:
find_related_laws — looks up enforcement orders (施行令) and regulations (施行規則) for a given base law name or abbreviation. Lawsy-Custom-BQ has the same step server-side; useful because definitions and delegated rules often live outside the parent act.asof (YYYY-MM-DD), so you can pin the same version of a law that a benchmark or an earlier answer used..mjs, no build step — bin/egov-law-mcp.mjs runs directly under Node 20+. Easier to audit, smaller install.MVP. The API surface is intentionally small:
search_laws — search current Japanese laws by title, abbreviation, law number, or law ID.get_article — retrieve a specific article (or paragraph) from a law by law ID, law number, or law revision ID.get_law — retrieve basic metadata and a text preview for a law.find_related_laws — find likely related enforcement orders and regulations.All four accept an optional asof. Since v0.2.0 every request goes to Law API v2 (/api/2/laws and /api/2/law_data/{id}); nothing calls the v1 endpoints any more. See Compatibility with v0.1.x.
https://laws.e-gov.go.jpFrom npm:
{
"mcpServers": {
"egov-law": {
"command": "npx",
"args": ["-y", "@codeagentjp/egov-law-mcp"]
}
}
}
From source for development:
git clone https://github.com/SHAYOUWORLD/egov-law-mcp.git
cd egov-law-mcp
node bin/egov-law-mcp.mjs
{
"mcpServers": {
"egov-law": {
"command": "node",
"args": ["/absolute/path/to/egov-law-mcp/bin/egov-law-mcp.mjs"]
}
}
}
search_lawsSearches laws that are not repealed (repeal_status=None) with one laws request. Keywords that look like a law ID (322AC0000000049) go to law_id, keywords that look like a law number (平成十五年法律第五十七号, …第五十七号) go to law_num, and everything else goes to law_title, which e-Gov matches against both the title and its abbreviations (個人情報保護法 finds 個人情報の保護に関する法律). With several space-separated words, the longest goes to e-Gov and the rest are checked locally. Up to 500 matches are ranked locally; truncated: true means e-Gov had more and the keyword should be narrowed.
{
"keyword": "個人情報保護法",
"category": "all",
"limit": 10,
"asof": "2026-10-29"
}
category maps to law_type: acts = Constitution, Act; orders = CabinetOrder, ImperialOrder; rules = MinisterialOrdinance, Rule; all = no filter.
get_articleRetrieves an article from the main provision (本則) with law_data?elm=MainProvision-Article_N[-Paragraph_M]. Provide either lawId or lawNum. article accepts 32, 32_2, 32の2, 第32条の2, or 第三十二条の二; paragraph accepts 2 or 第二項.
{
"lawId": "322AC0000
... [View full README on GitHub](https://github.com/shayouworld/egov-law-mcp#readme)