Japan Law Search MCP
Japan Law Search MCP — 日本の法令検索
Give your AI agent authoritative access to all ~10,000 Japanese laws and regulations.
This MCP server searches and retrieves the full text of current Japanese legislation — acts, cabinet orders, and ministerial ordinances — from the official e-Gov Laws API (Government of Japan). Built for legal-tech, compliance, HR, and contract-review AI agents working with Japanese law.
Why this server?
Japanese statutes are published as deeply nested XML with kanji numerals, era-based dates, and no convenient full-text API surface for LLMs. This server turns that into three clean, token-efficient tools.
Related MCP server: e-Gov Law MCP Server
Tools
search_laws
Full-text search across the body text of every current law (or search by law title). Returns matched snippets, law categories, promulgation dates, and official links.
get_law_structure
Table of contents for any law: chapters, sections, and article headings. Long statutes (e.g. the Civil Code with 1,000+ articles) are automatically compressed to chapter level to save tokens.
get_law_article
Retrieve the exact text of any article. Accepts flexible references — 3, 第3条, 第三条の二, 3の2 — and normalizes kanji numerals automatically. Output preserves paragraph and item numbering as clean plain text.
Example queries your agent can now answer
「電子署名法で電子署名が有効とされる条件は?」→ finds Article 3 and quotes it verbatim
"What does the Labor Standards Act say about overtime limits? Quote the exact article."
「個人情報保護法の目次を見せて、第三者提供に関する条文を特定して」
Data source & freshness
Official e-Gov Laws API v2 (Government of Japan), fetched live on every call — always the currently enforced revision, including amendments enforced this month.
Pricing
Pay per tool call. One search, one table of contents, or one article retrieval = one event. No subscription, no minimum.
日本語
日本の現行法令(約1万件)を全文検索し、条文を取得できるMCPサーバーです。巨大な法令XMLをAIが読みやすいテキストに整形し、「第三条の二」等の表記ゆらぎも自動吸収します。リーガルテック・コンプライアンス・労務系AIに最適です。
Get started
This is a hosted (remote) MCP server, available on Apify Store:
👉 https://apify.com/e-asakura/japan-law-search-mcp
The store page includes setup instructions for Claude, ChatGPT, Cursor, and any MCP-compatible client. Pay-as-you-go: $0.02 per tool call, no subscription.
Built by Edward Asakura — Japanese data infrastructure for AI agents. Part of the SEKISHO series: subsidies / laws / parliament.
Available Tools
3 toolsget_law_article法令の条文本文を取得A
law_idと条番号を指定して条文の本文を取得する。条番号は「3」「第3条」「第三条の二」「3の2」のいずれの形式でもよい。
| Name | Required | Description | Default |
|---|---|---|---|
| law_id | Yes | 法令ID(例: 412AC0000000102) | |
| article | Yes | 条番号(例: 3 / 第3条 / 第三条の二) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description must cover behavioral traits. It only states the function and accepted formats, but does not disclose error handling, required permissions, or whether law_id must exist.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, front-loaded with key information, no wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with 2 parameters and no output schema, the description is adequate. However, it lacks details on return values or error conditions, leaving gaps for the agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%. The description adds value by noting the accepted formats for article number (e.g., '3', '第3条', '第三条の二', '3の2'), which is not in the schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves the text of a law article using law_id and article number. It distinguishes from siblings: get_law_structure (structure) and search_laws (search).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use (to get article text) but does not explicitly state when not to use or provide alternatives. It lacks guidance on comparing with sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_law_structure法令の目次(章・条の一覧)を取得A
law_idを指定して法令の構造(章・節・条の見出し一覧)を取得する。どの条文を読むべきか当たりを付けるのに使う。law_idはsearch_lawsの結果に含まれる。
| Name | Required | Description | Default |
|---|---|---|---|
| law_id | Yes | 法令ID(例: 412AC0000000102) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description bears full responsibility. It clearly describes what the tool does (retrieve structure) and implies it is a read-only operation. It does not discuss side effects, errors, or permissions, but for a simple retrieval tool this is likely adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise: two sentences. The first states the core action, the second gives usage context. No unnecessary words, every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one parameter and no output schema, the description covers everything needed: what it does, the input, and the use case. The sibling tools provide context. No gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% (one parameter: law_id). The description adds value by noting that law_id comes from search_laws results, which helps users obtain the correct value. This goes beyond the schema's basic description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves the structural outline (chapters, sections, articles) of a law given its ID, and explicitly mentions its use for browsing which articles to read. It distinguishes itself from sibling tools: search_laws (to find law IDs) and get_law_article (to retrieve a specific article).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implicitly guides when to use: 'どの条文を読むべきか当たりを付けるのに使う' indicates it's for initial orientation. Although it does not explicitly state when not to use or list alternatives, the sibling context and the distinct purpose provide sufficient guidance for an AI agent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_laws日本の法令を検索A
日本の現行法令(法律・政令・省令など約1万件)を政府公式データベース(e-Gov)から検索する。search_in=full_text(既定)は条文本文の全文検索、search_in=titleは法令名検索。結果のlaw_idをget_law_structure / get_law_articleに渡すと条文を参照できる。
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | 最大件数(1〜20) | |
| query | Yes | 検索語(例: 電子署名 / 個人情報 / 解雇) | |
| search_in | No | full_text=条文本文を全文検索(既定) / title=法令名で検索 | full_text |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses the data source (e-Gov, government database), implies a read-only operation, and explains the two search behaviors. It does not mention rate limits or response format, but for a search tool this is adequate. No contradiction with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise: four sentences, front-loaded with purpose, no wasted words. Each sentence adds value—source, modes, post-processing steps.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description could explain the result fields more, but it does mention law_id and ties to sibling tools. The search modes are clearly explained. Slightly incomplete for a complex search tool, but still adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so baseline is 3. The description reiterates the search_in enum values but adds no new meaning beyond what the schema already provides. It does not elaborate on query or limit beyond schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool searches Japanese current laws from the e-Gov database, distinguishes two search modes (full-text and title), and explicitly connects to sibling tools (get_law_structure/get_law_article) via the law_id. This is a specific verb+resource with sibling differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains when to use each search mode via the search_in parameter and tells the user how to proceed (pass law_id to siblings). However, it lacks explicit exclusions or alternatives beyond the siblings, so it stops short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v0.1.0- First observed
get_law_article - First observed
get_law_structure - First observed
search_laws
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: search_laws for finding laws, get_law_structure for browsing structural headings, and get_law_article for retrieving specific article text. There is no functional overlap.
All tool names follow a consistent verb_noun snake_case pattern (search_laws, get_law_structure, get_law_article), making them predictable and easy to remember.
Three tools is minimal but sufficient for a focused law search server. The core workflow (search, browse structure, retrieve article) is covered, though additional tools like listing all laws or checking amendments could be justified.
The tool set covers the essential lifecycle: searching for laws, exploring their structure, and retrieving specific articles. While no major gaps exist, a tool to get law metadata or list recent updates would improve completeness.
Maintenance
Related MCP Connectors
Japan Law MCP — Japanese national laws & ordinances via the e-Gov Law API.
Semantic search across Japan's government white papers, in English or Japanese. Free beta.
Search UK Acts, Statutory Instruments, and legislation with full text retrieval
Search Japanese subsidies and public company data using J-Grants, gBizINFO, and EDINET.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables searching and retrieving Japanese legal information from the e-Gov Law API, including law searches by keyword, detailed law data retrieval, and revision history tracking.396548MIT
- AlicenseAqualityDmaintenanceEnables intelligent search and retrieval of Japanese legal statutes through the e-Gov API. Supports smart lookup of laws and articles with abbreviation recognition, batch processing, and multi-tier caching for high-performance legal research.813MIT
- AlicenseAqualityDmaintenanceProvides access to Japanese labor and social insurance laws and administrative circulars from sources like the e-Gov API and the Ministry of Health, Labour and Welfare. It enables users to search for and retrieve legal texts and notices to ensure accuracy in labor-related inquiries.61,43761MIT
- AlicenseAqualityAmaintenanceEnables LLMs to search and retrieve Japanese laws from the e-Gov API v2, including keyword search, article fetching, table of contents, and revision history.7402MIT