Egov Law MCP server
io.github.SHAYOUWORLD/egov-law-mcp·v0.1.1Search Japanese laws via e-Gov Law Search and fetch article text with source attribution.
0 stars4 downloads/wk
Reviews
Write oneNobody has reviewed Egov Law yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Egov Law tools (4)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
find_related_lawsFind laws related to a base law name, including enforcement orders and regulations.
get_articleRetrieve a specific article from e-Gov Law Search by law ID or law number.
get_lawRetrieve law metadata and a plain text preview from e-Gov Law Search.
search_lawsSearch current Japanese laws from e-Gov Law Search by keyword.
Public scan report
scanner v0.1.9 · 2026-09-24 · same rubric, same numbers if you re-run it
- Code scan2 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitylocal package, no credentials required12/15
- Maintenancelast push 0 days ago15/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
How Egov Law compares
Against every graded Web search MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 92/100
- higher than 90% of 3,470 Web search servers
- Tools
- 4
- the typical Web search server has 5
- Tools that change things
- 0%
- typical: 0%. Fewer write tools means less an agent can break
- Downloads a week
- 4
- more than 0% of 827 Web search servers with a package
What its tools let an agent do: 4 read
Install Egov Law in Claude Code, Cursor or VS Code
Runs npx -y @codeagentjp/egov-law-mcp on your machine. Read the scan report first; the gateway never runs local packages.
claude mcp add egov-law-mcp -- npx -y @codeagentjp/egov-law-mcp
What the publisher says
From the Egov Law repository's README, as published. We do not edit it. Read it on GitHub
@codeagentjp/egov-law-mcp
Local stdio MCP server for searching Japanese laws and retrieving article text from e-Gov Law Search.
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.
Why another e-Gov MCP
There is an existing egov-law-mcp on npm by another author. This package differs in three ways:
- findrelatedlaws — looks up enforcement orders (施行令) and regulations (施行規則) for a given base law name. Lawsy-Custom-BQ has the same step server-side; useful because definitions and delegated rules often live outside the parent act.
- Source attribution baked into every tool result — every response includes the law name, law ID, article number, and the canonical e-Gov URL, so the calling LLM cannot drop the citation.
- Single-file .mjs, no build step — bin/egov-law-mcp.mjs runs directly under Node 20+. Easier to audit, smaller install.
Status
MVP. The API surface is intentionally small:
- search_laws — search current Japanese laws by keyword.
- get_article — retrieve a specific article from a law by law ID or law number.
- get_law — retrieve basic metadata and a text preview for a law.
- findrelatedlaws — find likely related enforcement orders and regulations.
Requirements
- Node.js 20 or later
- Network access to https://laws.e-gov.go.jp
Install
From 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"]
}
}
}Tools
search_laws
Searches the e-Gov law list.
{
"keyword": "個人情報",
"limit": 10
}get_article
Retrieves article text. Provide either lawId or lawNum.
{
"lawId": "503AC0000000035",
"article": "2"
}get_law
Retrieves basic metadata and a plain text preview of a law.
{
"lawId": "503AC0000000035",
"previewChars": 3000
}findrelatedlaws
Searches for laws whose names look related to a base law name, including enforcement orders and regulations.
{
"lawName": "個人情報の保護に関する法律",
"limit": 10
}Data Source and Attribution
This package uses the e-Gov Law Search API:
- e-Gov Law Search:
- Law API documentation:
- e-Gov terms:
- MCP stdio transport:
Tool results include source attribution. When you publish or redistribute output based on this package, include an appropriate e-Gov source attribution.
Suggested attribution:
出典: e-Gov法令検索()
Safety Notes
- This package is a law reference tool, not legal advice. Verify important legal conclusions against the official e-Gov page and, where necessary, consult a qualified professional.
- It does not execute shell commands.
- It writes JSON-RPC messages only to stdout and logs only to stderr.
- It fetches only e-Gov Law Search endpoints.
Related
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Egov Law: common questions
- Is Egov Law MCP server safe?
- Yes, by our scan: it is graded A (92/100). Read the Egov Law safety report
- How do I install Egov Law?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does Egov Law need an API key?
- Not as far as the registry entry and our scan can tell: no credentials are declared or required.
- Is Egov Law maintained?
- The last commit was 41 days ago (2026-09-24). The latest release is v0.1.1.
- What can I use instead of Egov Law?
- Servers from other publishers that do the same job: Pubmed MCP server, Arxiv MCP server and Misakanet MCP server.
- How does Egov Law compare with other Web search MCP servers?
- safety score 92/100 (higher than 90% of 3,470 Web search servers); tools 4 (the typical Web search server has 5); tools that change things 0% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.
Alternatives to Egov Law
Same job from other publishers: the closest match first, then the best rated.
- PubmedSearch PubMed/Europe PMC, fetch articles and full text (PMC/EPMC/Unpaywall), citations, MeSH terms.not reviewedEstablishedA
- ArxivSearch arXiv papers, download full text, semantic search, citation graphs, and alerts via MCP.not reviewedWidely usedA
- MisakanetFailure-memory layer for coding agents: search evidence-rated failure lessons by error text.not reviewedEstablishedA
Legal Data HunterSearch 18M+ legal documents worldwide — case law, legislation, and doctrine across 110+ countries.not reviewedEstablishedA- Zotero MCPSearch your Zotero library, retrieve item metadata, and read full text from AI assistants.not reviewedEstablishedB