ru-legal-skills-mcp
Unified MCP server для
ru-legal. Подключи один пакет — получи 186 skills + 33 tools РФ legal AI.
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:
- Keyword shortlist — keyword search по name + description → top-10 candidates (быстро, бесплатно)
- 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.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ru_legal_skills_mcp-0.3.1.tar.gz | 783.6 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ru_legal_skills_mcp-0.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.9 MB
Release files / ru_legal_skills_mcp-0.3.1.tar.gz
| Download URL | ru_legal_skills_mcp-0.3.1.tar.gz |
|---|---|
| Size | 783.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a1a48970cde77ad9024d571cc4859aadf50f2f18aefae534f86d553f2cb6dc87
|
|
BLAKE2b-256 checksum How to use checksums |
eb91cc9e6c793fae9c83b895ed0bf6a59f8af2049a36aec412ed8a94886f4017
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
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 logRelease files / ru_legal_skills_mcp-0.3.1-py3-none-any.whl
| Download URL | ru_legal_skills_mcp-0.3.1-py3-none-any.whl |
|---|---|
| Size | 1.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c9089f118226cc4247b3a774f7ca3a97419010300d7eec819d8ee3b49a39ec6b
|
|
BLAKE2b-256 checksum How to use checksums |
cd6a7b92bd56b11b69f69918c54c3e4ec39aa2c5980e1a945061437f6c33cb10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
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 logSecurity for ru-legal-skills-mcp 0.3.1
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.
Attestation for ru_legal_skills_mcp-0.3.1.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 logA 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.