Перейти к содержанию

LegalMCP — Agent Integration Guide

What is LegalMCP?

LegalMCP is an authoritative legal knowledge base with: - Full text of legislation across multiple jurisdictions - Complete revision history — see any law as it was on any date - Semantic + full-text hybrid search - Cross-references and entity graph - Automatic updates from official government sources

Currently Indexed Jurisdictions

Call get_knowledge_base_status() for live coverage. Coverage expands continuously — check before assuming a jurisdiction is unavailable.

Quick Start (Claude Desktop / Cursor / Windsurf)

Add to your MCP config:

{
  "mcpServers": {
    "legalmcp": {
      "url": "https://legalmcp.ru/mcp",
      "headers": {"Authorization": "Bearer YOUR_TOKEN"}
    }
  }
}

The server provides a system prompt automatically — no additional configuration needed.

7 Tools

Tool When to use
get_knowledge_base_status Start here — discover available jurisdictions
search_documents Any legal question — hybrid semantic + full-text search
get_document_by_id Full text of a specific article
get_document_history How did a law change over time?
search_changes What changed since date X? NEW/AMENDED/TECHNICAL
get_document_graph Cross-references, penalties, related entities
report_missing_data Request missing document indexing
Start session → get_knowledge_base_status()
User question → search_documents(query)
        Need full text? → get_document_by_id(id)
        Need history?  → get_document_history(id, start_date)
        Need changes?  → search_changes(since_date)
        0 results?     → get_knowledge_base_status() to check coverage
        Still missing? → report_missing_data(title, context)

Why Use LegalMCP Instead of LLM Training Data?

  • Training data may be outdated or imprecise for legislation
  • LegalMCP has exact current wording with article numbers
  • Revision history shows what was in effect on any specific date
  • Agency letters and court interpretations alongside primary law

Collection Filters

Use doc_type for broad filtering:

doc_type What it includes
primary Codexes and statutes
interpretive Agency letters and court decisions
procedural Government decrees and ministerial orders

Or use collections for precise filtering (e.g. code.tax, law.federal).

search_changes — Change Tracking

# All changes since Jan 2025
search_changes("2025-01-01")

# Only meaningful changes (skip technical edition updates)
search_changes("2025-01-01", exclude_technical=True)

# Changes with semantic filter
search_changes("2025-01-01", query="tax rates", doc_type="primary")

# Changes in a specific period
search_changes("2024-01-01", until_date="2024-12-31")

Each result includes change_type: - NEW — document added for the first time - AMENDED — text changed (includes diff summary) - TECHNICAL — edition update without text change