Global law
The law of nearly every country on earth, any date: read it, see what changed it, check citations.
Search Japanese laws via e-Gov Law Search and fetch article text with source attribution.
列表按使用分(满分 100)排序,由以下部分组成
| 热度 | 0/80 | GitHub 星标或每周下载量:较大的计 60,较小的计 20 |
|---|---|---|
| 新鲜度 | 12/12 | 30 天内有发布或代码更新得满分 |
| 仍在响应 | 0/8 | 上次检查时云端端点有响应 |
| 使用分 | 12/100 |
质量: 基础检查通过 3/3 项(仅展示,不用于排序) · 上升势头: 暂无数据 (只用于“上升中”标签)
选择你使用的 AI 应用,然后复制设置。
用一句话让 AI 帮你安装
请帮我安装 Egov Law MCP。按照 https://mcp.popnx.com/i/shayouworld-egov-law-mcp.md 操作,先把命令给我看,等我同意后再运行。粘贴到能在你电脑上工作的 AI(如 Claude Code、Cursor)。它会读取我们的步骤,先给你看命令,等你同意。无需密钥,无需注册。 · 查看 AI 会读取的全文
通过 3/3 项检查 · 在你的电脑上运行 · ✓ 命令已检查 2026年11月13日
第一步:你用哪个 AI?
选择你用的应用,步骤会显示在下方。
可连接 Claude,但需要先准备
需要先在电脑上安装 Node.js(只需一次) · 仅限电脑上的 Claude 应用(Windows 或 Mac),网页和手机不可用
把这段话复制到 Claude 的对话里。AI 会先检查电脑,告诉你要改哪个文件,并且每次都等你同意。
请在这台电脑上为 Claude 安装 MCP server Egov Law MCP,按顺序:1) 用 node -v 检查是否有 Node.js。没有的话,请让我从 https://nodejs.org/en/download 安装,不要自己安装。2) 只使用这份配置(已通过 PopNx MCP 检查):{ "mcpServers": { "egov-law": { "command": "npx", "args": [ "-y", "@codeagentjp/egov-law-mcp" ] } } } 3) 告诉我要修改的文件完整路径或要运行的命令,等我同意。4) 不需要密钥。5) 按约定执行,然后确认 Egov Law MCP 的工具真的出现了。这段话不包含你的密钥。如果需要密钥,AI 会请你自己粘贴到文件或应用的输入框里。
已经装好了吗?先检查 · 打开终端,输入这条命令后按 Enter
node -vMac:按 ⌘ + Space,输入 Terminal 后按 Enter
Windows:打开“开始”菜单,输入 Windows PowerShell,然后选“打开”
还没安装: 打开官方下载页,选择 LTS 版本和点选式安装程序:Mac 用 .pkg · Windows 用 .msi。双击后一路下一步即可,不需要 curl 命令
装好后关掉终端再打开,重新运行同一条命令,应显示版本号: node -v
安装一次,所有需要 Node.js 的工具都能用
SettingsDeveloperEdit Config
{
"mcpServers": {
"egov-law": {
"command": "npx",
"args": [
"-y",
"@codeagentjp/egov-law-mcp"
]
}
}
}用 Egov Law MCP 告诉我你能帮我做什么,然后做一件给我看✓ 如果 Claude 说正在使用 Egov Law MCP,或回答中出现 Egov Law MCP 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 Anthropic 帮助页面核实 · 你的界面可能因版本略有不同
ChatGPT 暂时无法连接 Egov Law MCP
Egov Law MCP 需要安装在你的电脑上,而 ChatGPT 只能连接在网上运行的服务器
A · 使用能连接 Egov Law MCP 的应用
B · 法律与政府数据 类中能连接 ChatGPT 的其他服务器
从同类中使用较多的里挑选,仅限用地址即可连接、无需密钥的
可连接 Claude Code,但需要先准备
需要先在电脑上安装 Node.js(只需一次)
把这段话复制到 Claude Code 的对话里。AI 会先检查电脑,告诉你要改哪个文件,并且每次都等你同意。
请在这台电脑上为 Claude Code 安装 MCP server Egov Law MCP,按顺序:1) 用 node -v 检查是否有 Node.js。没有的话,请让我从 https://nodejs.org/en/download 安装,不要自己安装。2) 只使用这份配置(已通过 PopNx MCP 检查):claude mcp add --scope user egov-law -- npx -y @codeagentjp/egov-law-mcp 3) 告诉我要修改的文件完整路径或要运行的命令,等我同意。4) 不需要密钥。5) 按约定执行,然后确认 Egov Law MCP 的工具真的出现了。这段话不包含你的密钥。如果需要密钥,AI 会请你自己粘贴到文件或应用的输入框里。
已经装好了吗?先检查 · 打开终端,输入这条命令后按 Enter
node -vMac:按 ⌘ + Space,输入 Terminal 后按 Enter
Windows:打开“开始”菜单,输入 Windows PowerShell,然后选“打开”
还没安装: 打开官方下载页,选择 LTS 版本和点选式安装程序:Mac 用 .pkg · Windows 用 .msi。双击后一路下一步即可,不需要 curl 命令
装好后关掉终端再打开,重新运行同一条命令,应显示版本号: node -v
安装一次,所有需要 Node.js 的工具都能用
Mac:按 Command+空格,输入 Terminal · Windows:打开 PowerShell
claude mcp add --scope user egov-law -- npx -y @codeagentjp/egov-law-mcp应能看到 Egov Law MCP 在列表中并显示已连接
用 Egov Law MCP 告诉我你能帮我做什么,然后做一件给我看✓ 如果 Claude Code 说正在使用 Egov Law MCP,或回答中出现 Egov Law MCP 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 Anthropic 帮助页面核实 · 你的界面可能因版本略有不同
可连接 Cursor,但需要先准备
需要先在电脑上安装 Node.js(只需一次)
把这段话复制到 Cursor 的对话里。AI 会先检查电脑,告诉你要改哪个文件,并且每次都等你同意。
请在这台电脑上为 Cursor 安装 MCP server Egov Law MCP,按顺序:1) 用 node -v 检查是否有 Node.js。没有的话,请让我从 https://nodejs.org/en/download 安装,不要自己安装。2) 只使用这份配置(已通过 PopNx MCP 检查):{ "mcpServers": { "egov-law": { "command": "npx", "args": [ "-y", "@codeagentjp/egov-law-mcp" ] } } } 3) 告诉我要修改的文件完整路径或要运行的命令,等我同意。4) 不需要密钥。5) 按约定执行,然后确认 Egov Law MCP 的工具真的出现了。这段话不包含你的密钥。如果需要密钥,AI 会请你自己粘贴到文件或应用的输入框里。
已经装好了吗?先检查 · 打开终端,输入这条命令后按 Enter
node -vMac:按 ⌘ + Space,输入 Terminal 后按 Enter
Windows:打开“开始”菜单,输入 Windows PowerShell,然后选“打开”
还没安装: 打开官方下载页,选择 LTS 版本和点选式安装程序:Mac 用 .pkg · Windows 用 .msi。双击后一路下一步即可,不需要 curl 命令
装好后关掉终端再打开,重新运行同一条命令,应显示版本号: node -v
安装一次,所有需要 Node.js 的工具都能用
用 Egov Law MCP 告诉我你能帮我做什么,然后做一件给我看✓ 如果 Cursor 说正在使用 Egov Law MCP,或回答中出现 Egov Law MCP 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 Cursor 帮助页面核实 · 你的界面可能因版本略有不同
可连接 VS Code,但需要先准备
需要先在电脑上安装 Node.js(只需一次)
把这段话复制到 VS Code 的对话里。AI 会先检查电脑,告诉你要改哪个文件,并且每次都等你同意。
请在这台电脑上为 VS Code 安装 MCP server Egov Law MCP,按顺序:1) 用 node -v 检查是否有 Node.js。没有的话,请让我从 https://nodejs.org/en/download 安装,不要自己安装。2) 只使用这份配置(已通过 PopNx MCP 检查):{ "servers": { "egov-law": { "type": "stdio", "command": "npx", "args": [ "-y", "@codeagentjp/egov-law-mcp" ] } } } 3) 告诉我要修改的文件完整路径或要运行的命令,等我同意。4) 不需要密钥。5) 按约定执行,然后确认 Egov Law MCP 的工具真的出现了。这段话不包含你的密钥。如果需要密钥,AI 会请你自己粘贴到文件或应用的输入框里。
已经装好了吗?先检查 · 打开终端,输入这条命令后按 Enter
node -vMac:按 ⌘ + Space,输入 Terminal 后按 Enter
Windows:打开“开始”菜单,输入 Windows PowerShell,然后选“打开”
还没安装: 打开官方下载页,选择 LTS 版本和点选式安装程序:Mac 用 .pkg · Windows 用 .msi。双击后一路下一步即可,不需要 curl 命令
装好后关掉终端再打开,重新运行同一条命令,应显示版本号: node -v
安装一次,所有需要 Node.js 的工具都能用
用 Egov Law MCP 告诉我你能帮我做什么,然后做一件给我看✓ 如果 VS Code 说正在使用 Egov Law MCP,或回答中出现 Egov Law MCP 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 VS Code 帮助页面核实 · 你的界面可能因版本略有不同
Claude Code
claude mcp add --scope user egov-law -- npx -y @codeagentjp/egov-law-mcpClaude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"egov-law": {
"command": "npx",
"args": [
"-y",
"@codeagentjp/egov-law-mcp"
]
}
}
}Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"egov-law": {
"command": "npx",
"args": [
"-y",
"@codeagentjp/egov-law-mcp"
]
}
}
}VS Code (mcp.json)
{
"servers": {
"egov-law": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@codeagentjp/egov-law-mcp"
]
}
}
}这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
依据这个服务器的连接方式和各应用自己的文档,检查于 2026年11月10日。
在你的电脑上运行,适用于
ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月20日
注册名称已通过 GitHub 账户 SHAYOUWORLD 验证,该账户拥有此仓库
代码最后更新于21天前
使用 MIT
它在你的电脑上运行,没有互联网端点
在你的电脑上运行,改用本地设置
它在你的电脑上运行;我们只能读取互联网端点的工具列表
OSV.dev 中没有 @codeagentjp/egov-law-mcp@0.1.1 的记录
只检查这个版本的包本身,不包括所有依赖 · 检查于 2026年11月15日
如果你是作者,可把这段代码贴到 README。徽章会链接回本页。
[](https://mcp.popnx.com/en/servers/shayouworld-egov-law-mcp)提问、分享技巧或报告无法使用。按“有帮助”数量排序。
还没有评价
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
它在 3 项适用的基础检查中通过了 3 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
GitHub 仓库最后更新于21天前,最新版本(0.1.1)于2个月前进入注册中心。
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js。
同一分类中有:Global law, Open Legal Data (Germany), LibreJustice, InfraNode, Fedlex Connector
同一分类、其他作者、命令已通过检查。官方的排在前面,再按星标排序。
如何看卡片:↓ 每周下载量i★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
The law of nearly every country on earth, any date: read it, see what changed it, check citations.
German court decisions (Rechtsprechung) and laws (Gesetze) with citation graph and citation checks.
Search French-language and European case law and French legal texts (codes, statutes, treaties).
Keyless open data for 84 German cities: 12 lean read-only MCP tools covering 67 data types.
Search Swiss federal legislation: laws, articles, amendments via the Fedlex SPARQL endpoint.
| 本项 Egov Law MCP | Global law | Open Legal Data (Germany) | LibreJustice | InfraNode | Fedlex Connector | |
|---|---|---|---|---|---|---|
| 运行位置 | 需要安装在电脑上 | 在云端运行,无需安装 | 在云端运行,无需安装 | 在云端运行,无需安装 | 在云端运行,无需安装 | 在云端运行,无需安装 |
| 需要密钥 | 否 | 否 | 否 | 否 | 否 | 否 |
| 可在 Claude 中按 + 添加 | 否 | 否 | 否 | 否 | 否 | 否 |
| 基础检查 | 3/3 | 4/4 | 4/4 | 4/4 | 4/4 | 4/4 |
| 许可证 | MIT | NOASSERTION | MIT | Apache-2.0 | Apache-2.0 | MIT |
| 价格 | 登记中未列出费用 | 登记中未列出费用 | 登记中未列出费用 | 登记中未列出费用 | 登记中未列出费用 | 登记中未列出费用 |
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
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:
asof (YYYY-MM-DD), so you can pin the same version of a law that a benchmark or an earlier answer used.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": "322AC0000000049", "article": "32", "paragraph": "2", "asof": "2026-10-29" }
To pin an exact version, pass a law revision ID as lawId (for example 322AC0000000049_20260717_508AC0000000060); e-Gov then ignores asof. e-Gov accepts asof from 2017-04-01 onward.
get_lawRetrieves basic metadata and a plain text preview of a law.
{
"lawId": "503AC0000000035", "previewChars": 3000 }
find_related_lawsSearches for laws whose names or abbreviations look related to a base law name, including enforcement orders and regulations. It sends one laws?law_title= request with the name minus a trailing 法律 / 法 (and minus 施行令 / 施行規則, so a regulation also finds its parent act).
{
"lawName": "個人情報の保護に関する法律", "limit": 10 }
get_article and get_law return lawId, lawNum, lawTitle, lawRevisionId, and asof, plus a source object:
{
"name": "e-Gov法令検索", "api": "法令API Version 2", "url": "https://laws.e-gov.go.jp/law/322AC0000000049", "apiUrl": "https://laws.e-gov.go.jp/api/2/law_data/322AC0000000049?elm=MainProvision-Article_32-Paragraph_2&asof=2026-10-29&response_format=json&law_full_text_format=xml", "lawId": "322AC0000000049", "lawRevisionId": "322AC0000000049_20260717_508AC0000000060", "amendmentEnforcementDate": "2026-07-17", "asof": "2026-10-29", "attribution": "出典: e-Gov法令検索(https://laws.e-gov.go.jp/)", "processing": "法令API Version 2 の law_data で取得した法令XMLからタグを除き、平文にした。", "retrievedAt": "2026-10-29T05:57:09.260Z" }
url opens the current version on e-Gov Law Search. apiUrl reproduces the exact request, and lawRevisionId identifies the version that was returned. search_laws and find_related_laws return source with apiUrl, asof, and retrievedAt at the top level, and each result carries lawRevisionId, abbreviations, and the e-Gov URL.
v0.1.x called Law API v1 (/api/1/lawlists, /api/1/lawdata, /api/1/articles), which has no point-in-time parameter. v0.2.0 moves every tool to v2. The decision record is docs/adr/0001-law-api-v2-migration.md.
Unchanged:
keyword, article, lawName, and lawId or lawNum), and every existing input name.lawId, lawName, lawNo, promulgationDate, score, relationScore, url, text, preview, truncated, source.url, source.apiUrl, source.attribution, source.retrievedAt, …).Added:
asof input on all four tools.lawTitle, lawRevisionId, abbreviations, lawType, articleTitle, articleCaption, elm, matchedCount, and source.lawRevisionId / source.asof / source.processing.Changed:
promulgationDate is now YYYY-MM-DD (v2 format) instead of yyyyMMdd.search_laws no longer downloads the whole law list once per process. Each search is one laws request filtered by e-Gov, so abbreviations now match and results can differ from v0.1.x. cacheFetchedAt is kept and now holds the time that request's data was retrieved.find_related_laws only finds laws that share the base name's stem; v0.1.x could also list unrelated laws whose short names happened to appear inside the base name.get_article called with lawNum now also returns lawId (v1 left it empty). paragraph is checked as a number, and article numbers are converted for elm.e-Gov API returned HTTP 400 (400021: 要素(elm)に合致する要素が法令本文に存在しません。).laws.e-gov.go.jp at a time, even when a client calls several tools at once or sends a JSON-RPC batch.EGOV_LAW_MCP_INTERVAL_MS to wait longer; values below 1000 are ignored.retrievedAt.EGOV_LAW_MCP_TIMEOUT_MS (default 15000) sets the per-request timeout. It starts when the request is sent, not while it waits for its turn.The pacing applies within one server process; if you run several copies, keep their combined traffic modest.
This package uses the e-Gov Law API Version 2:
The law body is requested as law XML (law_full_text_format=xml, Base64 inside the JSON response) because the OpenAPI definition marks the JSON form of the body as a trial format that may change.
Tool results include source attribution. When you publish or redistribute output based on this package, include an appropriate e-Gov source attribution, and say that the text was converted from law XML to plain text (source.processing).
Suggested attribution:
出典: e-Gov法令検索(https://laws.e-gov.go.jp/)
https://laws.e-gov.go.jp/api/2/laws and https://laws.e-gov.go.jp/api/2/law_data/{id}, and refuses redirects.npm test
Tests launch the stdio server with fetch replaced by local Law API v2 fixtures. They cover each tool's request parameters and output fields, asof and law revision IDs, input validation, e-Gov error codes, request pacing, and the cache. Fixture sources are in test/fixtures/README.md.
MIT © codeagent.jp