Ask your AI

Copy this and paste it into ChatGPT, Claude or another assistant to get an answer based on this site.

How do I connect e-Gov法令検索 to an AI agent? Please use this URL as a reference:
https://agentok.jp/en/services/e-gov-laws.md
Government

How to connect e-Gov法令検索 to AI agents

TL;DR

The short answer
VerdictOfficial, individuals OK Individuals can connect through an official route (MCP, connector or API) without a business contract or review
Who can use itAnyone. The Law API needs no API key and no registration, and can be called directly from a personal agent
MethodOfficial API (REST)
PricingFree (no additional charge for using the Law API)
RiskAttribution 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.

AuthenticationNone (no API key or registration required)
Checked by the operator2026.12.05
How the operator checkedChecked against official documentation

For AI agents: Markdown ・ JSON

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.

  • houki-egov-mcp(shuji-bonji)

    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 requiredRead only

No credentials required (the Law API itself needs no key)

Terms of serviceConditional

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 pathRuns 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 requiredRead only

No credentials required (the Law API itself needs no key)

Terms of serviceConditional

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 pathWith 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 requiredRead only

No credentials required (the Law API itself needs no key)

Terms of serviceConditional

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

Source: relevant section of the terms of service

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

  1. In the Law API Version 2 Swagger UI, check the endpoints you need
  2. 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)
  3. When displaying or sharing retrieved law data, give attribution (e-Gov Law Search). If you adapted it, state that as well

Retrieve provisions

Instruction to the agent

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

Instruction to the agent

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 checkedChecked against official documentation
Clients triedNot 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.

Related articles

How to connect e-Tax to AI agents

Business or paid only

How to connect 気象庁の天気予報 to AI agents

Official, individuals OK

How to connect Amazon to AI agents

Business or paid only

How to connect Instagram to AI agents

Business or paid only