e-gov-law-mcp

e-gov-law-mcp

MCP server wrapping the e-Gov law API v2 to search and retrieve Japanese law data, including law lists, revision histories, full text, attachments, and keyword search.

Category
Visit Server

README

e-gov-law-mcp

e-Gov法令API v2 をラップした Model Context Protocol (MCP) サーバーです。日本の法令データ(法令一覧・改正履歴・法令本文・添付ファイルなど)をMCP対応クライアント(Claude Codeなど)から検索・取得できるようにします。

セットアップ

Node.js が必要です。

npx github:kannkyo/e-gov-law-mcp

MCPクライアントの設定ファイル(例: 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 start

提供ツール

ツール名 概要 対応API
search_laws 法令名・法令種別・時点(asof)を指定して法令一覧を検索する GET /laws
get_law_revisions 指定した法令の改正履歴一覧を取得する GET /law_revisions/{law_id_or_num}
get_law_data 法令ID・法令番号・改正IDを指定して法令本文をJSONで取得する GET /law_data/{law_id_or_num_or_revision_id}
get_attachment 法令改正IDを指定して添付ファイル(画像・PDF・Zipなど)を取得し、一時ファイルに保存してそのパスを返す GET /attachment/{law_revision_id}
search_keyword 法令本文内に指定したキーワードを含む法令を検索する GET /keyword
download_law_file 法令本文をファイル形式(xml/json/html/rtf/docx)でダウンロードし、一時ファイルに保存してそのパスを返す GET /law_file/{file_type}/{law_id_or_num_or_revision_id}

get_attachment / download_law_file はバイナリデータをOSの一時ディレクトリに保存し、保存先パス・サイズ・Content-Typeを返します。

開発

npm run typecheck  # 型チェック
npm test           # テスト実行(vitest)
npm run build      # 型チェック + esbuildでdist/index.jsにバンドル

ライセンス

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured