Skip to main content

ru-legal-skills-mcp

Unified MCP server для ru-legal. Подключи один пакет — получи 186 skills + 33 tools РФ legal AI.

PyPI License

Quick start

1. Install

pip install ru-legal-skills-mcp
# или
uvx ru-legal-skills-mcp

2. Configure в Claude Code / Cursor / Cline / любом MCP-клиенте

// .mcp.json (или ~/.claude/mcp.json — depending на клиент)
{
  "mcpServers": {
    "ru-legal-skills": {
      "command": "uvx",
      "args": ["ru-legal-skills-mcp"]
    }
  }
}

3. Проверить, что skills на месте

ru-legal-skills list-packs        # 19 паков и число skills
ru-legal-skills list-skills       # все 186
ru-legal-skills show-skill labor-law/termination-review

packs/ входит в wheel, поэтому RU_LEGAL_SKILLS_PACKS_ROOT не нужен. Переменная остаётся для случая, когда нужен свой набор skills: RU_LEGAL_SKILLS_PACKS_ROOT=/path/to/packs ru-legal-skills-mcp.

4. Готово

Теперь твой LLM-клиент видит:

— 4 skill management tools (list_skills, find_skill, get_skill, get_skill_index) — 186 skills как MCP prompts (slash-commands: /labor_law_termination_review и т.д.) — (coming in Phase 2) 33 tool proxies для гос.реестров РФ

Что внутри

Skill management tools

Tool Purpose
list_skills(pack=None) Все 186 skills с metadata (id, name, description, argument-hint)
find_skill(query, top_k=3) LLM router — подбирает skill под user query на естественном языке
get_skill(skill_id) Полный SKILL.md с workflow / decision tree / citations
get_skill_index() Compact text index — quick scan всех skills

Skills as MCP prompts

Каждый user-invocable skill auto-зарегистрирован как MCP prompt. В Claude Code появляется как slash-command. Например:

/labor_law_termination_review
/corporate_law_diligence_issue_extraction
/tax_law_tax_audit_response

Skill router (Strategy C)

Two-tier:

  1. Keyword shortlist — keyword search по name + description → top-10 candidates (быстро, бесплатно)
  2. LLM picker — small/cheap LLM (Haiku / GPT-4o-mini / Yandex Lite / DeepSeek) picks best 1-3 из shortlist

Fallback на keyword-only если LLM не configured.

Configuration

# Path к packs/ — обычно auto-detected
export RU_LEGAL_SKILLS_PACKS_ROOT=/path/to/ru-legal-skills/packs

# Provider для router LLM (auto-detected from env):
export OPENAI_API_KEY=sk-...           # → uses gpt-4o-mini
# OR
export YC_IAM_TOKEN=...
export YC_FOLDER_ID=...                 # → uses yandexgpt-lite
# OR
export GIGACHAT_API_KEY=...
# OR
export DEEPSEEK_API_KEY=...
# OR (override explicitly):
export RU_LEGAL_ROUTER_LLM=yandexgpt

Если ни одна credential не задана — router работает в keyword-only mode.

Architecture

┌───────────────────────────────────────────┐
│  MCP client (Claude Code / Cursor / ...)  │
└────────────────┬──────────────────────────┘
                 │ MCP protocol (stdio)
                 ▼
┌───────────────────────────────────────────┐
│  ru-legal-skills-mcp (this package)              │
│                                           │
│  ├── server.py — entrypoint               │
│  ├── registry/skills.py — load packs/     │
│  │      • 186 skills indexed at startup   │
│  └── router/                              │
│      ├── router.py — 2-tier router        │
│      └── llm.py — provider-agnostic LLM   │
└────────────────┬──────────────────────────┘
                 │ читает (read-only)
                 ▼
┌───────────────────────────────────────────┐
│  packs/                                   │
│  └── 19 packs × N skills × SKILL.md       │
└───────────────────────────────────────────┘

Использование с LangGraph / LangChain

from langchain_mcp_adapters.client import MultiServerMCPClient
from langgraph.prebuilt import create_react_agent

mcp_client = MultiServerMCPClient({
    "ru-legal-skills": {
        "command": "uvx",
        "args": ["ru-legal-skills-mcp"],
        "transport": "stdio",
    }
})

tools = await mcp_client.get_tools()
agent = create_react_agent(model="...", tools=tools)

result = await agent.ainvoke({"messages": [
    {"role": "user", "content": "проверь контрагента ИНН 7707000001"}
]})

Roadmap

  • Phase 1: skill management + router + skills as prompts
  • Phase 2: re-expose все 33 sub-MCP tools под одним сервером
  • Phase 3: embedding-based router (top-K via vector search)
  • Phase 4: subagent delegation (one skill calls another)

Альтернатива — granular install

Если нужны только конкретные источники:

pip install pravo-mcp efrsb-mcp kad-mcp
# и т.д. — каждый как отдельный package

Тогда configure отдельные entries в .mcp.json. Подходит если ты хочешь только subset.

License

Apache 2.0. См. LICENSE.

Disclaimer

⚠ AI tool, не замена юриста. Material decisions — engage outside-адв ФПА. См. DISCLAIMER.md.

Metadata

Release files for ru-legal-skills-mcp 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ru-legal-skills-mcp 0.3.0
File Size Uploaded Provenance
ru_legal_skills_mcp-0.3.0.tar.gz 782.8 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ru-legal-skills-mcp 0.3.0
File Interpreter ABI Platform
ru_legal_skills_mcp-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.9 MB

Security for ru-legal-skills-mcp 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ru_legal_skills_mcp-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page