Prototype · Preview: every server in the official registry, synced every 30 minutes. Sign in with Google to write reviews.Prototype · updated every 30 min
PopNx MCPMCP servers for people who use AI · explained in plain words

Egov Law MCP

by SHAYOUWORLDversion 0.1.1i★ 0iRuns on your computerOfficial site ↗
Registry nameio.github.SHAYOUWORLD/egov-law-mcp

How to install

What it does

Search Japanese laws via e-Gov Law Search and fetch article text with source attribution.

  • Connects Runs on your computer
  • Account or key No key needed
  • Category Law & government data

Why it ranks here

Lists are ordered by a usage score (out of 100) built from these parts

Popularity0/80GitHub stars or weekly downloads: the larger counts 60, the smaller 20
Freshness12/12Full marks for a release or code change within 30 days
Still answering0/8The cloud endpoint answered at the last check
Usage score12/100

Quality: Passed 3/3 basic checks (shown, not used for ordering) · Momentum: No data yet (Used only on the Trending tab)

Install

Pick the AI app you use, then copy the settings.

Let your AI install it with one sentence

Please install Egov Law MCP. Follow https://mcp.popnx.com/i/shayouworld-egov-law-mcp.md, show me the commands and wait for my OK before running them.

Paste it into an AI that can work on your computer (such as Claude Code or Cursor). It reads our steps, shows you the commands and waits for your OK. No key, no sign-up. · See the full text your AI reads

Passed 3/3 checks · Runs on your computer · ✓ Commands checked Nov 13, 2026

First: which AI do you use?

Pick your app and the steps appear below.

Works with Claude, with some setup first

Install Node.js on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone

Let AI install it

Copy this message into a Claude chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Egov Law MCP for Claude on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "egov-law": { "command": "npx", "args": [ "-y", "@codeagentjp/egov-law-mcp" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Egov Law MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Node.js (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    node -v
    • A version number such as v26.13.1 = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed

    Open the Node.js download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v

    Install once; it works for everything that needs Node.js

  2. Open the Claude desktop app’s settings file

    SettingsDeveloperEdit Config

  3. Paste these settings and save the file

    {
      "mcpServers": {
        "egov-law": {
          "command": "npx",
          "args": [
            "-y",
            "@codeagentjp/egov-law-mcp"
          ]
        }
      }
    }
  4. Quit Claude and open it again

  5. Try it

    Use Egov Law MCP and tell me what you can do for me, then show me one thing

    ✓ If Claude says it is using Egov Law MCP or shows a Egov Law MCP tool in the answer, you are connected

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

ChatGPT cannot connect Egov Law MCP yet

Egov Law MCP runs on your computer, but ChatGPT can only connect servers that run on the web

What you can do instead

A · Use an app that can connect Egov Law MCP

  • Install Node.js on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
  • Install Node.js on your computer first (one time)
  • Install Node.js on your computer first (one time)
  • Install Node.js on your computer first (one time)

B · Others in Law & government data that work with ChatGPT

Picked from the most used in the same category, only ones that connect by address with no key

Works with Claude Code, with some setup first

Install Node.js on your computer first (one time)

Let AI install it

Copy this message into a Claude Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Egov Law MCP for Claude Code on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): claude mcp add --scope user egov-law -- npx -y @codeagentjp/egov-law-mcp 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Egov Law MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Node.js (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    node -v
    • A version number such as v26.13.1 = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed

    Open the Node.js download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v

    Install once; it works for everything that needs Node.js

  2. Open Terminal

    Mac: press Command+Space and type Terminal · Windows: open PowerShell

  3. Paste this command and press Enter

    claude mcp add --scope user egov-law -- npx -y @codeagentjp/egov-law-mcp
  4. Type /mcp in Claude Code

    You should see Egov Law MCP listed as connected

  5. Try it

    Use Egov Law MCP and tell me what you can do for me, then show me one thing

    ✓ If Claude Code says it is using Egov Law MCP or shows a Egov Law MCP tool in the answer, you are connected

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with Cursor, with some setup first

Install Node.js on your computer first (one time)

Let AI install it

Copy this message into a Cursor chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Egov Law MCP for Cursor on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "egov-law": { "command": "npx", "args": [ "-y", "@codeagentjp/egov-law-mcp" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Egov Law MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Node.js (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    node -v
    • A version number such as v26.13.1 = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed

    Open the Node.js download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v

    Install once; it works for everything that needs Node.js

  2. Click this button to open Cursor

    Open in Cursor

    Cursor asks you to confirm; click Install

  3. Open the AI chat in Cursor in Agent mode

  4. Try it

    Use Egov Law MCP and tell me what you can do for me, then show me one thing

    ✓ If Cursor says it is using Egov Law MCP or shows a Egov Law MCP tool in the answer, you are connected

Menu names checked against Cursor’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with VS Code, with some setup first

Install Node.js on your computer first (one time)

Let AI install it

Copy this message into a VS Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Egov Law MCP for VS Code on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "servers": { "egov-law": { "type": "stdio", "command": "npx", "args": [ "-y", "@codeagentjp/egov-law-mcp" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Egov Law MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Node.js (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    node -v
    • A version number such as v26.13.1 = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed

    Open the Node.js download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v

    Install once; it works for everything that needs Node.js

  2. Click this button to open VS Code

    Open in VS Code

    VS Code asks you to confirm; click Install

  3. Open the AI chat in VS Code in Agent mode

  4. Try it

    Use Egov Law MCP and tell me what you can do for me, then show me one thing

    ✓ If VS Code says it is using Egov Law MCP or shows a Egov Law MCP tool in the answer, you are connected

Menu names checked against VS Code’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Other apps that use MCP, such as Windsurf, Zed or Gemini CLI, each add servers differently. See how in the app list.

See every app that uses MCP →

JSON settings are under “For developers” below

Stuck? Ask people who use Egov Law MCP💬 Discussion →
For developers: Terminal commands and JSON settings

Installed on your computer

Claude Code

claude mcp add --scope user egov-law -- npx -y @codeagentjp/egov-law-mcp

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

These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.

At a glance

Downloads per weeki
54/wk
Connection
Runs on your computer
Latest versioni
0.1.1
Published to registryi
Sep 24, 2026
Code last changedi
Oct 30, 2026
Maker
SHAYOUWORLD
Packages
npm: @codeagentjp/egov-law-mcp
Registry status
Active

Which apps can use it

Based on how this server connects and on each app’s own docs, checked Nov 10, 2026.

Run on your computer in

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

All apps, with pros and cons →

Related guides

What it can do

Runs on your computer; the tool list appears in your AI app after you install it.

Basic checksi

We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 20, 2026

  • ✓ Pass

    Maker matches the repo

    The registry name was verified with the GitHub account SHAYOUWORLD, which owns the repo

  • ✓ Pass

    Still maintained

    Code last changed 21 days ago

  • ✓ Pass

    Has a licence

    Uses MIT

  • – Not applicable

    Endpoint responds

    This one runs on your computer; there is no internet endpoint

  • – Not applicable

    Sign-in with OAuth

    Runs on your computer and uses local settings instead

  • … Not checked yet

    No hidden instructions in tool descriptions

    Runs on your computer; we can only read tool lists from internet endpoints

Published vulnerabilities (OSV.dev)

No entries on OSV.dev for @codeagentjp/egov-law-mcp@0.1.1

Checks only this package version, not every dependency · checked Nov 15, 2026

What we check → · JSON

Makers: ask for a re-check or report wrong info
For makers: add a badge to your README

If you made this, paste this code into your README. The badge links back to this page.

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/shayouworld-egov-law-mcp.svg)](https://mcp.popnx.com/en/servers/shayouworld-egov-law-mcp)

Discussion

Ask, share a tip or report that it does not work. Sorted by what people marked helpful.

No posts yet. Be the first to ask or share.

Posts here are written by users, not the PopNx team.

Sign in to post

User reviews

No reviews yet

Sign in to write a review

Compared with others in Law & government datai

  • More stars than 0% of the other 1957 servers in this category
  • Published to the registry more recently than 36% of the other 1957 servers in this category
  • Basic checks equal to or better than 99% of the other 1957 servers in this category

Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.

Common questions

Is Egov Law MCP safe?

It passed 3 of 3 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.

What keys or codes does it need?

The registry does not list a required key, though some servers ask you to sign in on first use.

Does it run on my computer or in the cloud?

It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).

Is it still maintained?

The GitHub repo last changed 21 days ago, and the latest version (0.1.1) reached the registry 2 months ago.

Which apps can use it?

Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Node.js on your computer.

What can I use instead?

In the same category: Global law, Open Legal Data (Germany), LibreJustice, InfraNode, Fedlex Connector

Similar alternatives

Same category, other makers, commands already checked. Official ones first, then by stars.

Reading a card:↓ Downloads per weeki★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi

Global law

The law of nearly every country on earth, any date: read it, see what changed it, check citations.

by lexifinaWidely used★ 2.1KUpdated 10 days ago

Runs in the cloud✓ lexifina.com

LibreJustice

Search French-language and European case law and French legal texts (codes, statutes, treaties).

by librejusticeEarly★ 36Updated 2 months ago

Runs in the cloud✓ service owner · librejustice.fr

InfraNode

Keyless open data for 84 German cities: 12 lean read-only MCP tools covering 67 data types.

by street1983nkEarly★ 18Updated 5 months ago

Runs in the cloud✓ service owner · infranode.dev

Fedlex Connector

Search Swiss federal legislation: laws, articles, amendments via the Fedlex SPARQL endpoint.

by JayTheSkierEarly★ 8Updated 7 months ago

Runs in the cloud✓ service owner · fedlex-connector.ch
Compared with similar ones
This one
Egov Law MCP
Global lawOpen Legal Data (Germany)LibreJusticeInfraNodeFedlex Connector
Runs whereInstalls on your computerRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to install
Needs a keyNoNoNoNoNoNo
Add with + in ClaudeNoNoNoNoNoNo
Basic checks3/34/44/44/44/44/4
LicenseMITNOASSERTIONMITApache-2.0Apache-2.0MIT
PriceNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registry

README from the maker

Open the README

Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.

@codeagentjp/egov-law-mcp

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.

Why another e-Gov MCP

There is an existing egov-law-mcp on npm by another author. This package differs in four ways:

  1. `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.
  2. Source attribution baked into every tool result — every response includes the law name, law ID, article number, the law revision ID (版), the retrieval time, and the canonical e-Gov URL, so the calling LLM cannot drop the citation.
  3. Point-in-time retrieval — every tool accepts asof (YYYY-MM-DD), so you can pin the same version of a law that a benchmark or an earlier answer used.
  4. 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 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.

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 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_article

Retrieves 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_law

Retrieves basic metadata and a plain text preview of a law.

{

"lawId": "503AC0000000035", "previewChars": 3000 }

find_related_laws

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

What the results contain

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.

Compatibility with v0.1.x

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:

  • Tool names, required inputs (keyword, article, lawName, and lawId or lawNum), and every existing input name.
  • Every existing output field 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.
  • Output fields such as 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.
  • Errors from e-Gov include its code, for example e-Gov API returned HTTP 400 (400021: 要素(elm)に合致する要素が法令本文に存在しません。).
  • Requests to e-Gov are paced (see below).

Request pacing and cache

  • At most one request goes to laws.e-gov.go.jp at a time, even when a client calls several tools at once or sends a JSON-RPC batch.
  • Each request starts at least 1 second after the previous one finished. Set EGOV_LAW_MCP_INTERVAL_MS to wait longer; values below 1000 are ignored.
  • Identical requests within 5 minutes are answered from an in-process cache (or share the request already in flight) and do not reach e-Gov. Cached answers keep their original 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.

Data Source and Attribution

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/)

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 https://laws.e-gov.go.jp/api/2/laws and https://laws.e-gov.go.jp/api/2/law_data/{id}, and refuses redirects.

Development checks

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.

Related

License

MIT © codeagent.jp