1. Conduid
  2. Data
  3. Law7
MCP server · Data

Law7

Law7 MCP Server and Core Engine -- Open up-to-date legal database for AI assistants

56Fair

Scored 3 days ago · breakdown

About Law7

Law7 is an MCP server published by mikhashev in the Data category: law7 MCP Server and Core Engine -- Open up-to-date legal database for AI assistants.

The repository has 18 stars and 5 forks, with the last commit 4 days ago. Recent commit activity is the strongest signal that reported issues will get attention.

Install

From source
git clone https://github.com/mikhashev/law7

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Tools (7)

get-article-versionGet article version at specific date

Parameters not published.

get-code-structureGet structure of consolidated legal codes

Parameters not published.

get-lawRetrieve specific document by eo_number

Parameters not published.

get-statisticsGet database statistics

Parameters not published.

list-countriesList supported countries (currently Russia)

Parameters not published.

query-lawsSearch legal documents by semantic/keyword search

Parameters not published.

trace-amendment-historyTrack amendment history of articles

Parameters not published.

Ask AI

✦

Ask AI about Law7

Powered by Claude · Grounded in docs

I know everything about Law7. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository 4 days ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository ships documentation.
  • ✓License declaredUsable under a stated license.
  • ✓Tests presentA test suite exists in the repository.
  • ✓Dependencies pinnedA lockfile pins dependency versions.
  • ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

Releases

v0.1.1v0.1.1
v0.1.0v0.1.0

README

Law7 Logo

Law7 MCP - Up-to-date Legal Documents For AI Assistants

Version

Current state and vocabulary. What this repository actually contains today, measured against the live database, is in docs/SCOPE.md; the words the project uses in a specific sense are in docs/GLOSSARY.md. Numbers elsewhere in this README are updated by re-measuring, and SCOPE.md wins if they disagree.

Without Law7

AI assistants rely on outdated training data for laws:

  • LLMs use training data from years ago
  • Hallucinated legal articles that don't exist
  • Generic answers without specific legal citations
  • Unable to track legal changes or amendments

With Law7

Law7 MCP pulls up-to-date, version-specific legal documents directly from official government sources and places them into your AI conversation.

Ask questions like:

What are the notice periods for terminating an employment contract in Russia?
What changes were made to the Russian Labor Code in 2025?

Law7 fetches current legal documents right into your AI's context. No tab-switching, no hallucinated articles, no outdated legal information.

Legal Disclaimer

IMPORTANT: This project provides text information from open sources only. See DISCLAIMER.md for full details.

  • NOT for official use in court or government bodies
  • NO guarantee of accuracy, completeness, or timeliness
  • Always consult qualified lawyers for legal matters
  • AGPL-3.0 licensed - modifications must be shared

Installation

Claude Desktop

# Build the server
npm run build

# Add to Claude Desktop
claude mcp add law7 --node \path\to\folder\law7\dist\index.js

Step 1: Build and Test the Server

npm run build
npm start

Step 2: Add to Claude Desktop

Option A - Via config file (C:\Users\<user>\AppData\Roaming\Claude\claude_desktop_config.json):

{
  "mcpServers": {
    "law7": {
      "command": "node",
      "args": ["/path/to/folder/law7/dist/index.js"],
      "env": {}
    }
  }
}

Important: The mcpServers is an object, not an array. Each server is a key with command and args properties.

Step 3: Test with Claude Desktop

Once added, the law7 MCP server appears in your chat with these tools:

  • list-countries - List available countries
  • get-statistics - Get database statistics
  • query-laws - Search legal documents by text
  • get-law - Get specific document by eo_number

Example query:

Can you search for documents about "трудовой договор" in Russia and show me the results?

Important Tips

Add a Rule

To automatically invoke Law7 for legal questions, add a rule to your CLAUDE.md file:

Always use Law7 MCP when I need legal information, document lookup, or legal analysis without me having to explicitly ask.

Specify Country

Currently only Russia is supported, but you can specify for clarity:

What are the labor laws in Russia regarding overtime?

Query Historical Versions

Ask for specific dates to get historical legal versions:

What was the Russian Labor Code article 80 text on January 1, 2024?

Available Tools

Law7 MCP provides the following 13 tools that AI assistants can use (as of the 2026-02-11 snapshot, measured 2026-09-14):

Tool Description
query-laws Search legal documents by semantic/keyword search
get-law Retrieve specific document by eo_number
list-countries List supported countries (currently Russia)
get-statistics Get database statistics
get-code-structure Get structure of consolidated legal codes
get-article-version Get article version at specific date
trace-amendment-history Track amendment history of articles
search-regional-law Search regional Russian legislation (laws, decrees, resolutions, regional codes)
get-regional-koap-article Get a specific article from a regional Administrative Code (KoAP)
search-court-decisions Search Supreme Court and Constitutional Court decisions
get-supreme-court-resolution Get a specific Supreme Court plenary resolution
search-interpretations Search official ministry interpretations (letters, guidance)
fetch-and-ingest Fetch legal documents from external sources (kremlin.ru) and ingest into the database

Architecture

This project uses a hybrid architecture with two separate components:

  • Data Pipeline (Python): Crawls, parses, and indexes legal documents into local database
  • MCP Server (TypeScript): Queries the local database and serves results to AI assistants
Python Pipeline → PostgreSQL + Qdrant → TypeScript MCP Server → AI

Components

Component Language Location
Data Pipeline Python /scripts
MCP Server TypeScript /src
Docker Compose /docker

Phase 1: Current Implementation (Russia)

Status: Operational

As of the 2026-02-11 snapshot (measured 2026-09-14):

  • Documents: 1,136,605 Russian legal documents (2019-2026)
  • Content Coverage: 47,871 documents with full text (4.2%)
  • Code Articles: 6,232 articles across 22 of 23 consolidated legal codes
  • Embeddings: 265 semantic vectors (test data - full embeddings pending)
  • Database Backup: Download (218 MB) - SHA256: 70a1d8fc6b27b67ad7f12f03f017d02b5f68a0c895447159039800965895f8b2
  • Sources:
  • Codes: 22 of 23 consolidated Russian legal codes imported:
    • Constitution (KONST_RF)
    • Civil Code (4 parts: GK_RF, GK_RF_2/3/4)
    • Criminal Code (UK_RF)
    • Labor Code (TK_RF)
    • Tax Code (2 parts: NK_RF, NK_RF_2)
    • Family, Housing, Land codes (SK_RF, ZhK_RF, ZK_RF)
    • Administrative Code (KoAP_RF)
    • Procedure Codes (GPK_RF, APK_RF, UPK_RF)
    • Budget, Urban Planning, Criminal Executive codes (BK_RF, GRK_RF, UIK_RF)
    • Environmental codes (VZK_RF - Air, VDK_RF - Water, LK_RF - Forest)
    • Pending: Administrative Procedure Code (KAS_RF) - not yet imported

Quick Start Pipeline:

  1. Import Base Codes (~6 hours) - 22 of 23 core legal codes (6,232 articles) - Civil, Labor, Criminal, etc.
  2. Document Sync (partial: ~6h, full: 100+h) - Amendment documents from official sources (optional)
  3. Content + Embeddings (~2-3 hours) - Extract text and generate vectors (optional)

For most users: Step 1 gives you the essential legal codes. Steps 2-3 add amendment coverage.

See docs/DATA_PIPELINE.md for complete data pipeline documentation.

Phase 2: Future Vision (Global)

Status: Planned - See docs/VISION.md

  • Multi-country support
  • Decentralized data distribution (IPFS, libp2p)
  • Community verification system
  • Country adapter pattern for adding new jurisdictions
  • Delta updates and change tracking

Quick Start (Development)

Note: Default ports are PostgreSQL 5433, Qdrant 6333 (to avoid conflicts with other projects). Redis was removed 2026-09-14; add back when a cache is actually implemented.

Option A: Restore from Backup (Recommended - ~5 minutes)

Skip the data sync and use the pre-built database:

# 1. Download backup (218 MB)
#    https://drive.google.com/file/d/1DPLpFpuwUZbLZEGo2TxnCAcLRdb2V1aD/view?usp=sharing

# 2. Start Docker services
cd docker
docker-compose up -d

# 3. Restore backup (place .tar.gz in docker/backups/ directory)
./restore.sh law7_backup_20260211_014519

# 4. Start MCP server
npm install && npm run build && npm start

Option B: Fresh Installation (from official sources)

1. Start Docker Services

cd docker
docker-compose up -d

2. Run Initial Data Sync (Python)

# Using uv
uv run python scripts/sync/initial_sync.py

3. Start MCP Server (TypeScript)

npm install
npm run build
npm start

4. Test with MCP Inspector

npx @modelcontextprotocol/inspector node dist/index.js

Dependencies

TypeScript (MCP Server)

  • @modelcontextprotocol/sdk - MCP protocol
  • pg - PostgreSQL client
  • @qdrant/js-client-rest - Qdrant vector DB client

Python (Data Pipeline)

  • pandas - Data processing
  • sqlalchemy - Database ORM
  • beautifulsoup4 - HTML parsing
  • pdfplumber - PDF text extraction
  • sentence-transformers - Embeddings (multilingual models)
  • qdrant-client - Vector DB client
  • torch - PyTorch with CUDA support (for GPU acceleration)

Hardware Requirements for GPU Acceleration:

  • NVIDIA GPU with CUDA support (tested on RTX 3060 12GB)
  • CUDA 12.x compatible drivers

More Documentation

License

AGPL-3.0 with an additional permission under section 7 - see LICENSE for the full license text and LICENSE-EXCEPTION.md for the additional permission (linking exception).

This means:

  • Source code is freely available
  • Any modifications must be shared under the same license
  • If you run a modified version on a server and provide services to users, you must make the source code available to those users

README fetched from the repository 4 days ago. The original is authoritative.

Questions

About Law7

How do I install Law7?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Law7 safe to use with an AI agent?

Its trust score is 56 out of 100 (fair). It passes 5 of the 6 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Law7 still maintained?

Yes — the last commit was 4 days ago. The repository has 18 stars and 5 forks and 26 open issues.