Hourei MCP Server
Enables 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.
README
法令MCP Server
e-Gov法令APIを使用して日本の法令情報を検索・取得するMCPサーバーです。
機能
このMCPサーバーは以下のツールを提供します:
1. search_law
法令名や法令番号で法令を検索します。
パラメータ:
keyword(必須): 検索キーワード(法令名の一部や法令番号)category(オプション): 法令の種別1: 法律2: 政令3: 省令4: 規則5: その他
limit(オプション): 取得する最大件数(デフォルト: 100)
2. get_law_data
法令番号を指定して法令の詳細データを取得します。
パラメータ:
lawNum(必須): 法令番号(例: 平成十七年法律第百十七号)
3. get_law_revision
法令の改正履歴を取得します。
パラメータ:
lawNum(必須): 法令番号
インストール
npm経由でインストール(推奨)
npx hourei-mcp-server
ローカル開発
git clone <repository-url>
cd hourei-mcp-server
npm install
使用方法
MCPクライアントでの設定
Claude Desktopなどのクライアントの設定ファイル(~/Library/Application Support/Claude/claude_desktop_config.json)に以下を追加:
{
"mcpServers": {
"hourei": {
"command": "npx",
"args": ["-y", "hourei-mcp-server"]
}
}
}
設定後、Claude Desktopを再起動してください。
Cursor AI での設定
Cursorの設定ファイル(.cursor/mcp_config.json または設定画面)に以下を追加:
{
"mcpServers": {
"hourei": {
"command": "npx",
"args": ["-y", "hourei-mcp-server"]
}
}
}
ChatGPT Desktop での設定
ChatGPTでは、MCPサーバーのURLを指定する形式で設定します。
オプション1: npxコマンドで実行(他のクライアントと同じ)
{
"mcpServers": {
"hourei": {
"command": "npx",
"args": ["-y", "hourei-mcp-server"]
}
}
}
オプション2: URL形式で指定(SSEサーバー経由)
SSE対応サーバーを別途立ち上げた場合:
{
"mcpServers": {
"hourei": {
"url": "http://localhost:3000/sse"
}
}
}
または、リモートサーバーにデプロイした場合:
{
"mcpServers": {
"hourei": {
"url": "https://your-server.com/sse"
}
}
}
注意: 現在のバージョン(v1.0.5)はstdio接続のみ対応しています。URL形式で使用する場合は、別途SSE対応のラッパーサーバーが必要です。
Manus での設定
Manusの設定ファイルに以下を追加:
{
"mcpServers": {
"hourei": {
"command": "npx",
"args": ["-y", "hourei-mcp-server"]
}
}
}
Dify での設定
DifyのエージェントでMCPツールを使用する場合:
- Difyの設定ファイルに追加
環境変数またはDifyの設定で以下を指定:
{
"mcpServers": {
"hourei": {
"command": "npx",
"args": ["-y", "hourei-mcp-server"]
}
}
}
- エージェントブロックでの使用
Difyのワークフロー内で「ツール」ブロックを追加し、以下のMCPツールを選択:
search_law- 法令検索get_law_data- 法令詳細取得get_law_revision- 改正履歴取得
- 使用例:法令検索エージェント
入力ブロック → LLMブロック → ツールブロック(search_law) → 出力ブロック
ツールブロックのパラメータ設定例:
{
"keyword": "{{user_input}}",
"category": "1",
"limit": 100
}
ローカルパスで実行(開発用)
{
"mcpServers": {
"hourei": {
"command": "node",
"args": ["/path/to/hourei-mcp-server/index.js"]
}
}
}
使用例
このMCPサーバーでできることの具体例です。
1. 法令のキーワード検索
個人情報保護関連の法律を検索:
{
"keyword": "個人情報保護",
"category": "1" // 法律のみ
}
労働基準法を検索:
{
"keyword": "労働基準法"
}
消費税に関する政令を検索:
{
"keyword": "消費税",
"category": "2", // 政令
"limit": 50
}
2. 法令の詳細データ取得
個人情報保護法の全文を取得:
{
"lawNum": "平成十五年法律第五十七号"
}
民法の全文を取得:
{
"lawNum": "明治二十九年法律第八十九号"
}
刑法の全文を取得:
{
"lawNum": "明治四十年法律第四十五号"
}
3. 法令の改正履歴を確認
個人情報保護法の改正履歴:
{
"lawNum": "平成十五年法律第五十七号"
}
できること
✅ 法令の検索
- キーワードで法令を検索
- 法律、政令、省令など種別で絞り込み
- 最大100件まで一度に取得可能
✅ 法令データの取得
- 法令番号を指定して全文取得
- XML形式で構造化されたデータ
- 条文、項、号などの階層構造を含む
✅ 改正履歴の確認
- いつ、どのように法令が改正されたか
- 改正法令の情報を取得
- 施行日の確認
✅ 活用例
- 法的調査・リサーチ
- コンプライアンスチェック
- 契約書作成時の参照
- 法令遵守の確認
- 法律相談の補助
- 法改正の追跡
- Difyエージェントでの法令検索自動化
- チャットボットへの法令知識統合
対応クライアント
- ✅ Claude Desktop(npx経由)
- ✅ Cursor AI(npx経由)
- ✅ ChatGPT Desktop(npxまたはURL形式)
- ✅ Manus(npx経由)
- ✅ Dify(エージェントワークフロー)
- ✅ その他MCP対応クライアント(stdio接続対応)
技術仕様
- Node.js ESM形式
- MCP SDK v0.5.0
- e-Gov法令API v2を使用
- 対応フォーマット: XML
開発
リポジトリのクローン
git clone https://github.com/yourusername/hourei-mcp-server.git
cd hourei-mcp-server
npm install
ローカルでテスト
node index.js
ライセンス
MIT
貢献
Pull Requestsを歓迎します!
サポート
問題が発生した場合は、Issuesで報告してください。
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.