How to connect e-Gov法令検索 to AI agents
checked by the operator
TL;DR
| Verdict | Official, individuals OK Individuals can connect through an official route (MCP, connector or API) without a business contract or review |
|---|---|
| Who can use it | Anyone. The Law API needs no API key and no registration, and can be called directly from a personal agent |
| Method | Official API (REST) |
| Pricing | Free (no additional charge for using the Law API) |
| Risk | Attribution is mandatory (Public Data License (v1.0)). If you edit or adapt content, state that fact and who made the changes separately, and do not publish or use it in a way that suggests the government created it. An agent summarizing or paraphrasing provisions may also count as editing or adaptation, so give attribution and note the adaptation together |
There is an official Law API that lets you search laws, retrieve their text and get revision histories with no API key and no registration (read-only). There is no official MCP server, but several unofficial MCP servers wrapping the official API are published.
| Authentication | None (no API key or registration required) |
|---|---|
| Checked by the operator | 2026.12.05 |
| How the operator checked | Checked against official documentation |
Official MCP and AI guides
- Official MCP serverNo
There is no official MCP server for e-Gov Law Search. The Digital Agency's official MCP is a separate one for administrative procedure survey data, not for law search. All law-related servers in the official MCP registry are third-party and unofficial.
- Official guide for AI agentsNo
No dedicated guide for AI or agents could be found. laws.e-gov.go.jp has no llms.txt (checked on December 5, 2026; the site returned its not-found page). There is law-data documentation (alpha).
Connectors
Official connectors from AI services
Not supported: Claude, Microsoft Copilot
Unverified: ChatGPT, Gemini
Third-party integration services
Not supported: Zapier, Make, n8n, Power Automate, Yoom
Unverified: IFTTT, Pipedream, Composio
Unofficial MCP servers
Published by someone other than the provider. The provider does not guarantee how they work or how safe they are.
hourei-mcp-server(groundcobra009)
An unofficial MCP server using the Law API. 3 tools (law search, law data retrieval, revision information). The latest confirmed npm release of hourei-mcp-server is 1.0.6 (published October 28, 2025).
japan-legislation-mcp-server(cyanheads)
An unofficial MCP server using Law API Version 2. 8 tools (law search, full-text search, provision retrieval, law retrieval, revision lists and more). The latest confirmed npm release of @cyanheads/japan-legislation-mcp-server is 0.3.0 (registry record updated December 1, 2026). Besides stdio, the provider also offers a hosted endpoint (Streamable HTTP). Registered in the official MCP registry.
An unofficial MCP server using Law API Version 2. Tools include law search and law retrieval (by article, paragraph and item, with tables of contents). The latest confirmed npm release of @shuji-bonji/houki-egov-mcp is 0.21.0 (last GitHub push October 11, 2026). Registered in the official MCP registry.
Security assessment
For each available connection method: who provides it, the permissions it requires, how the terms treat it, and the data path. Items we could not confirm are marked Unverified.
- Unofficial MCPhourei-mcp-server(groundcobra009)Third party (unofficial)
Permissions required Read only No credentials required (the Law API itself needs no key)
Terms of service Conditional It uses the official Law API, so the e-Gov Law Search terms (Public Data License (v1.0)) apply. Attribution is required, edits or adaptations must be marked as such, and content must not be published in a way that suggests the government created it
Source: relevant section of the terms
Data path Runs locally and connects directly to the e-Gov Law API. Retrieved content is passed to the AI service using the MCP server - Unofficial MCPjapan-legislation-mcp-server(cyanheads)Third party (unofficial)
Permissions required Read only No credentials required (the Law API itself needs no key)
Terms of service Conditional It uses the official Law API, so the e-Gov Law Search terms (Public Data License (v1.0)) apply. Attribution is required, edits or adaptations must be marked as such, and content must not be published in a way that suggests the government created it
Source: relevant section of the terms
Data path With stdio it runs locally and connects directly to the Law API. With the hosted endpoint, search queries and retrieved results pass through the provider's server. In either case, retrieved content is passed to the AI service using the MCP server - Unofficial MCPhouki-egov-mcp(shuji-bonji)Third party (unofficial)
Permissions required Read only No credentials required (the Law API itself needs no key)
Terms of service Conditional It uses the official Law API, so the e-Gov Law Search terms (Public Data License (v1.0)) apply. Attribution is required, edits or adaptations must be marked as such, and content must not be published in a way that suggests the government created it
Source: relevant section of the terms
Data path Runs locally and connects directly to the e-Gov Law API. Retrieved content is passed to the AI service using the MCP server
Data you can fetch within the terms of service
Laws can be searched and their text and revision histories retrieved without login. The API also needs no key or registration
- ScrapingNot stated in terms
The e-Gov Law Search terms state that the Public Data License (v1.0) applies to the site's content. Attribution is mandatory; edits or adaptations must state that fact and who made the changes separately, and publishing or using content in a way that suggests the government created it is prohibited. No clause expressly prohibiting or restricting automated access could be found in the terms or API materials
- Fetching with the agent's own browser
There is an official API or MCP server, so we do not recommend having an agent sign in and operate the site in a browser on your behalf.
Usage
How to connect
- In the Law API Version 2 Swagger UI, check the endpoints you need
- Send GET requests with no API key to the endpoints under https://laws.e-gov.go.jp/api/2/: /laws (law list and search), /law_data/{law ID} (text), /law_revisions/{law ID} (revision history), /keyword (keyword search). Law text supports element selection (elm) and point-in-time selection (asof)
- When displaying or sharing retrieved law data, give attribution (e-Gov Law Search). If you adapted it, state that as well
Retrieve provisions
Get the Civil Code provisions on renunciation of inheritance
With the Law API's keyword search and law text retrieval, you can fetch the provisions as they are. With asof you can also retrieve the text as of a past date (from April 1, 2017 onward)
Check amendment history
List the amendment history of the Act on the Protection of Personal Information
With the Law API's revision history retrieval, you can list a law's amendments
Pitfalls and tips
Pitfalls
- Law API Version 1 (XML-centric) and Version 2 (JSON-centric) coexist. Version 2's data coverage and asof point-in-time queries start from April 1, 2017; text as of earlier dates cannot be retrieved with Version 2
- No numeric official rate limit could be confirmed in the specification (unverified). Avoid large numbers of requests in a short time
- Do not confuse the Law API with e-Gov's Electronic Application API, a different API that requires an API key, OAuth and registration
- Rights in the law data involve both the site terms (Public Data License (v1.0)) and Article 13 of the Copyright Act (laws are not subject to copyright). As no official explanation on the site could be confirmed, the safe course is to follow the site terms and give attribution
- All of the unofficial MCP servers run third-party npm packages on your own machine. Even though the API itself is read-only and needs no authentication, the package code runs in your local environment, so check the repository and its dependencies before adopting one
Tips
- For reliability, call the official API directly (no key needed, and the specification is in the Swagger UI)
- If you want to use it from an MCP client, the unofficial MCP servers are a good fit (all wrap the official API, so the data is the same as from the official API. The providers are third parties, so check the repository before adopting one)
Test environment and change history
| How it was checked | Checked against official documentation |
|---|---|
| Clients tried | Not yet tried with a real client |
Checked against the Law API guide page and Version 1 specification, the Version 2 Swagger UI, the law data documentation, the site terms and the Public Data License (v1.0), the unofficial MCP servers' GitHub and npm pages, and each platform's official directory. The absence of llms.txt was confirmed on December 5, 2026. Unverified items: numeric official rate limits, an official explanation of the relationship with Article 13 of the Copyright Act, and listings in some directories (ChatGPT, Gemini, IFTTT, Pipedream, Composio). Only public information requiring no login was used; no live API call was made
Change history
- First edition
Sources
Official and primary sources
Pages published by the service provider, the integration provider or the MCP author about their own product.
- Law API (e-Gov Law Search)Guide to the Law API (entry points for Versions 1 and 2), checked 2026.12.05
- Law API Version 1 SpecificationVersion 1 specification (law name list, law retrieval, provision retrieval and updated law list APIs), checked 2026.12.05
- Law API Version 2 Swagger UIVersion 2 endpoints (/laws, /law_data/{id}, /law_revisions/{id}, /keyword) and the no-authentication design, checked 2026.12.05
- Law Data Documentation (alpha)Documentation explaining law data and Law API Version 1, checked 2026.12.05
- e-Gov Law Search Terms of UseApplication of the Public Data License (v1.0), mandatory attribution, and marking of adaptations, checked 2026.12.05
- Public Data License (v1.0) (Digital Agency)The text of PDL1.0 (free reproduction, public transmission and adaptation, commercial use allowed, with conditions such as attribution), checked 2026.12.05
- hourei-mcp-server (unofficial MCP)The unofficial MCP (using the Law API): repository and npm package (hourei-mcp-server 1.0.6), checked 2026.12.05
- japan-legislation-mcp-server (unofficial MCP)The unofficial MCP (using Law API Version 2): repository and npm package (@cyanheads/japan-legislation-mcp-server 0.3.0), checked 2026.12.05
- houki-egov-mcp (unofficial MCP)The unofficial MCP (using Law API Version 2): repository and npm package (@shuji-bonji/houki-egov-mcp 0.21.0), checked 2026.12.05
- Claude ConnectorsWhere Claude's official connectors were checked, checked 2026.12.05
- e-Gov API Terms of Use (Electronic Application API)Terms for e-Gov's Electronic Application API (a different API from the Law API), showing that it requires an API key, OAuth and registration, checked 2026.12.05
- Administrative Procedures MCP (Digital Agency, official)An official Digital Agency MCP server, but for administrative procedure survey data, not for law search, checked 2026.12.05
