- Home
- MCP servers
- e-Gov Law
e-Gov Law
- python
4
GitHub Stars
python
Language
4 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"ryoooo-e-gov-law-mcp": {
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/e-gov-law-mcp",
"python",
"run_server.py"
],
"env": {
"EGOV_API_URL": "https://laws.e-gov.go.jp/api/2",
"EGOV_API_TOKEN": "<EGOV_API_TOKEN>"
}
}
}
}You can run and use the e-Gov Law MCP Server v2 to search and retrieve Japanese legal texts and related content with fast, secure, and scalable MCP tooling. This server combines intelligent law lookup, high performance caching, and enterprise-ready security to help you build compliant legal search and analysis workflows.
How to use
You interact with the MCP server through a client that can call the available tools. Use the find_law_article tool to query specific provisions, the batch_find_articles tool for bulk searches, and other tools to retrieve full law content or search results with filters, highlighting, and pagination. The system is designed to handle complex article patterns, abbreviations, and multi-part references, returning structured results you can display or analyze in your application.
How to install
Prerequisites you need before installing include the Python runtime and the MCP client tooling environment. You also require a command-line interface capable of starting and managing the MCP server workflow.
# Prerequisites
# Install the MCP client wrapper (example helper may be uv-based)
# Install Python runtime if not present
# Ensure you have network access to fetch dependencies
Install and run steps you should follow exactly as shown here to start the server locally.
# Quick start for the MCP server
# 1) Clone the MCP server repository
# 2) Change into the directory
# 3) Synchronize dependencies
uv sync
# 4) Optionally enable performance monitoring
uv add psutil
Additional sections
Configuration and runtime are designed to be flexible. You can customize the MCP behavior using environment variables and external configuration files. A practical way to wire up Claude Desktop or another MCP client is to point it at the local MCP process via a standard I/O channel. The following example shows how you can run the local server through the MCP runtime and connect via a client.
{
"mcpServers": {
"e_gov_law": {
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/e-gov-law-mcp",
"python",
"run_server.py"
]
}
}
}
Claude Desktop configuration is supported to manage how you start and monitor the MCP server locally. You can place the following settings in your Claude Desktop config to run the server from a local directory.
{
"mcpServers": {
"e-gov-law": {
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/e-gov-law-mcp",
"python",
"run_server.py"
]
}
}
}
Available tools
find_law_article
Search for a specific article by law name and article number with support for complex patterns and numbering formats.
search_laws
Perform a law search with filtering and pagination to locate relevant statutes.
search_laws_by_keyword
Full-text keyword search with highlighting for matching terms in laws.
get_law_content
Retrieve the full content of a law article, with size limits and multiple formats (XML/JSON).
batch_find_articles
Execute up to 200 article lookups in a single batch, with performance statistics included.
prefetch_common_laws
Preload frequently accessed laws into the cache to reduce latency.
get_cache_stats
Provide real-time cache statistics and health monitoring.
clear_cache
Manage and clear cache at a granular level to recover memory.