e-gov-law-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@e-gov-law-mcp 民法の改正履歴を調べて"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
e-gov-law-mcp
e-Gov法令API v2 をラップした Model Context Protocol (MCP) サーバーです。日本の法令データ(法令一覧・改正履歴・法令本文・添付ファイルなど)をMCP対応クライアント(Claude Codeなど)から検索・取得できるようにします。
セットアップ
Claude Code プラグインとして
このリポジトリ自体が Claude Code のマーケットプレイスを兼ねています。
/plugin marketplace add kannkyo/e-gov-law-mcp
/plugin install e-gov-law-mcpMCPサーバー(e-gov-law-mcp)と、法令調査の手順をまとめたスキル(legal-e-gov-law)が一緒にインストールされます。
MCPサーバー単体として
Node.js が必要です。
npx github:kannkyo/e-gov-law-mcpMCPクライアントの設定ファイル(例: Claude Codeの mcp.json 等)に以下のように登録します。
{
"mcpServers": {
"e-gov-law": {
"command": "npx",
"args": ["github:kannkyo/e-gov-law-mcp"]
}
}
}ソースからのビルド
git clone https://github.com/kannkyo/e-gov-law-mcp.git
cd e-gov-law-mcp
npm install
npm run build
npm startRelated MCP server: houan-mcp
提供ツール
ツール名 | 概要 | 対応API |
| 法令名・法令種別・時点(asof)を指定して法令一覧を検索する |
|
| 指定した法令の改正履歴一覧を取得する |
|
| 法令ID・法令番号・改正IDを指定して法令本文をJSONで取得する |
|
| 法令改正IDを指定して添付ファイル(画像・PDF・Zipなど)を取得し、一時ファイルに保存してそのパスを返す |
|
| 法令本文内に指定したキーワードを含む法令を検索する |
|
| 法令本文をファイル形式(xml/json/html/rtf/docx)でダウンロードし、一時ファイルに保存してそのパスを返す |
|
get_attachment / download_law_file はバイナリデータをOSの一時ディレクトリに保存し、保存先パス・サイズ・Content-Typeを返します。
開発
npm run typecheck # 型チェック
npm test # テスト実行(vitest)
npm run build # 型チェック + esbuildでdist/index.jsにバンドルライセンス
Available Tools
6 toolsdownload_law_file法令本文ファイルダウンロードA
法令ID・法令番号・改正IDを指定して法令本文をファイル形式(xml/json/html/rtf/docx)でダウンロードし、一時ファイルに保存してそのパスを返す(e-Gov法令API v2 GET /law_file/{file_type}/{law_id_or_num_or_revision_id})
Inputs: file_type (required), law_id_or_num_or_revision_id (required), asof.
get_attachment添付ファイル取得A
法令改正IDを指定して法令本文の添付ファイル(画像・PDF・Zipなど)を取得し、一時ファイルに保存してそのパスを返す(e-Gov法令API v2 GET /attachment/{law_revision_id})
Inputs: law_revision_id (required), src.
get_law_data法令本文取得A
法令ID・法令番号・改正IDを指定して法令本文をJSONで取得する(e-Gov法令API v2 GET /law_data/{law_id_or_num_or_revision_id})
Inputs: law_id_or_num_or_revision_id (required), elm, law_full_text_format.
get_law_revisions法令改正履歴取得B
指定した法令の改正履歴一覧を取得する(e-Gov法令API v2 GET /law_revisions/{law_id_or_num})
Inputs: law_id_or_num (required), amendment_type, amendment_date_to, amendment_date_from.
search_keyword法令キーワード検索C
法令本文内に指定したキーワードを含む法令を検索する(e-Gov法令API v2 GET /keyword)
Inputs: keyword (required), limit, offset, law_type.
search_laws法令一覧検索A
法令名・法令種別・時点(asof)を指定して法令一覧を検索する(e-Gov法令API v2 GET /laws)
Inputs: asof, limit, offset, law_type, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a distinct resource and action: searching by metadata, searching by text keyword, retrieving revision history, retrieving law data, fetching attachments, and downloading law files. Even get_law_data and download_law_file are clearly differentiated by return type (structured JSON vs. saved file path).
All tool names follow a consistent verb_noun pattern in snake_case (search_laws, get_law_revisions, get_law_data, get_attachment, search_keyword, download_law_file). The verb choices are simple and predictable, with no mixed conventions.
Six tools is well-scoped for a legal information API, covering search, revisions, data retrieval, attachments, keyword search, and file download without redundancy or bloat. The count feels appropriate for the domain.
The tool surface covers the main operations of the e-Gov law API: law list searches, keyword text searches, revision history, law data retrieval, attachments, and file downloads. As a read-only API, there are no obvious dead ends or missing core workflows.
Maintenance
Related MCP Connectors
Japan Law MCP — Japanese national laws & ordinances via the e-Gov Law API.
Search Japanese statutes via the e-Gov Law API. Free law_search tool.
MCP server for Chinese law lookup: statutes, regulations and articles by keyword or law name.
대한민국 법령·조문·별표·연혁·판례·해석례를 법제처 국가법령정보 OPEN API 로 찾아보는 읽기 전용 MCP 서버. 코어 12 + 보조 12 도구.
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.34,033 npm49MIT
- AlicenseAqualityCmaintenanceMCP server for searching Japanese Diet bills and committee Q\&A records via the NDL Kokkai API.460 npm1MIT
- -licenseNot gradedqualityCmaintenanceEnables access to Japanese labor and social insurance law data via e-Gov API and official notices from MHLW and JAISH, running as a local MCP server on Windows.-
- AlicenseAqualityDmaintenanceMCP server for searching and retrieving Japanese laws from the e-Gov API, enabling natural language queries for legal information.39 npmMIT