Pkulaw Mcp Legal Research logo

Pkulaw Mcp Legal Research

Community
NEU-ZHA
pkulaw-mcp-legal-research

北大法宝 10 项原生 MCP 的成本感知总路由。Use when:用户要查法规、法条、案例、核验引用、识别法条/案号、补法宝链接或做跨库法律研究。统一积分模式下优先调用约 25 积分的关键词/精准检索,只有结果不足或任务明确需要专门能力时才调用约 125 积分服务;禁止无检索依据编造法条、案号、裁判要点或引用结论。

Overview

PublisherNEU-ZHA
Repositorylegal-ai-skills
Skill namepkulaw-mcp-legal-research
Stars
70
Forks
7
Bundled files
3
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by NEU-ZHA on GitHub. Read the source before you install it.

Installation

Install the Pkulaw Mcp Legal Research AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/NEU-ZHA/legal-ai-skills/tree/main/skills/pkulaw-mcp-legal-research
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/NEU-ZHA/legal-ai-skills.git /tmp/legal-ai-skills
mkdir -p .claude/skills
cp -r /tmp/legal-ai-skills/skills/pkulaw-mcp-legal-research .claude/skills/pkulaw-mcp-legal-research
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Pkulaw Mcp Legal Research in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Pkulaw Mcp Legal Research on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Pkulaw Mcp Legal Research is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

北大法宝 MCP:有据法律研究(总路由)

这个 Skill 不负责把所有事情都做完,它主要负责一件事:先把用户问题正确分流到合适的法宝原生 MCP 能力或更窄的 Skill。

它和 pkulaw-legal-search 不重复:本 Skill 管原生 MCP 路由;pkulaw-legal-search 管网页/Computer Use 兜底、详情页核验和登录态操作。

如果用户已经明确是“只查法规”或“只查案例”,不要继续停留在总路由层,直接转到更窄的 Skill:

先看边界

  • 这是总路由 Skill,不是最终交付 Skill。
  • 默认任务是“判断走哪条能力链”,不是“自己把所有能力都跑一遍”。
  • 如果某个窄 Skill 已经足够,就应立即转交,不要在这里继续泛化处理。
  • 如果 MCP 不通、当前会话没加载对应工具、返回 401/403/超时/无结果、结果不足、需要详情页链接或需要网页登录态,不要在这里硬撑,立即转 pkulaw-legal-search 的网页/Computer Use 流程。

必须遵守的规则

  1. 具体法规、条号、案号、法院和裁判要点必须来自实际取得的可靠原文;用户材料或网页原文可作依据,但不得冒充法宝 MCP 返回。
  2. 工具名 <toolName> 必须以 pkulaw-mcp tools 或 MCP tools/list 为准,不得在正文中写死。
  3. 出现认证错误、超时或工具缺失时,停止该接口路径,通过用户材料、官方网页或其他已授权来源继续研究;仅测试接口时报告失败即可。不得为了绕过认证错误调用更贵接口。
  4. 每次先选择完成任务所需的最少服务;禁止为了“全面”而并发或顺序调用全部 10 项。
  5. 这是研究辅助与能力路由,不构成正式法律意见。
  6. MCP 路由失败时,默认后备不是空答,而是转 pkulaw-legal-search 用网页/Computer Use 继续查。
  7. 控制台显示的积分是约数,调用前应以用户当时的控制台为准;本 Skill 的关键约束是相对成本顺序。

10 项服务分层

层级serverId任务约积分/次
经济型fatiao已知法规名和条号,精准取法条25
经济型law-keyword按标题词/正文词检索法规25
经济型case-keyword按案由词/争点词检索案例25
升级型law-semantic自然语言法规语义检索125
升级型case-semantic案情相似性案例语义检索125
专门型law-recognition从非结构化文本识别并溯源法条125
专门型citation-validator核验和纠正法条引用125
专门型doc-link给已核验依据补法宝链接125
专门型case-number从文本识别案号并溯源125
综合型semantic-nlsql无法可靠拆分的跨库综合检索125

成本感知总路由

用户真正要做的事首次调用何时升级
只查法规依据转 pkulaw-mcp-law-retrieval,先 law-keyword两轮有理由的关键词仍漏掉相关规范时,用一次 law-semantic
已知法规名 + 条号取全文fatiao不自动升级;先核对法规名和条号
只查类案样本转 pkulaw-mcp-case-retrieval,先 case-keyword两轮关键词仍找不到事实相似样本时,用一次 case-semantic
已知完整案号找案例先将完整案号交给 case-keyword没有精确匹配或要从长文本批量识别时,用 case-number
核验文稿里的法条引用引用已结构化时直接 citation-validator不额外调用其他 125 积分服务,除非需要先从长文本抽取引用
从长文本提取法条law-recognition提取后只有用户要求核验时,才继续 citation-validator
给已核验引用补链接doc-link不用它做法规发现或引用核验
同时研究法规和案例分别用 law-keyword + case-keyword,预计 50 积分任务无法可靠拆分或仍有关键缺口时,才用一次 semantic-nlsql

默认分流步骤

  1. 先识别任务意图,只选择一条首选路径。
  2. 明确法规词、法条、案由或完整案号时,优先 25 积分服务。
  3. 首次关键词无结果时,先换一次有理由的关键词;第二次仍不足,才考虑相应语义服务。
  4. 任务本身就是引用核验、法条识别、案号识别或补链接时,可直接使用对应专门服务,但不要附带调用其他服务。
  5. 拿到返回后,只根据实际结果决定是否升级;每次升级都要能说明尚缺什么。

需要确定性路由时运行:

bash
python3 scripts/recommend_route.py --intent law-topic
python3 scripts/recommend_route.py --intent article
python3 scripts/recommend_route.py --intent case-topic
python3 scripts/recommend_route.py --intent citation-check

可选意图还包括 exact-case-number、law-recognition、add-links、cross-domain。

允许的失败输出

markdown
当前未拿到法宝 MCP 的有效检索结果。

失败原因:
- [未认证 / 无订阅 / 无结果 / 配置缺失 / 工具不存在 / 命令报错]

建议动作:
- 检查 `pkulaw-mcp` 配置与 Token
- 检查对应服务是否已订阅
- 把任务改写成更明确的法规检索、案例检索或精准查询问题

终端复现与排障

如需在终端复现,请先安装 @pkulaw/mcp-cli;安装后命令为 pkulaw-mcp。

bash
pkulaw-mcp tools
pkulaw-mcp tools law-keyword
pkulaw-mcp tools case-keyword
pkulaw-mcp <serverId> <toolName> ... --json
pkulaw-mcp check
pkulaw-mcp docs

输出结构

总路由层最稳的输出结构是:

  1. 任务类型判断
  2. 推荐走向
  3. 当前是否已完成检索
  4. 下一步建议

补充材料

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Pkulaw Mcp Legal Research AI skill do?

北大法宝 10 项原生 MCP 的成本感知总路由。Use when:用户要查法规、法条、案例、核验引用、识别法条/案号、补法宝链接或做跨库法律研究。统一积分模式下优先调用约 25 积分的关键词/精准检索,只有结果不足或任务明确需要专门能力时才调用约 125 积分服务;禁止无检索依据编造法条、案号、裁判要点或引用结论。

Why use Pkulaw Mcp Legal Research on TypingMind?

Because you install it once and use it with any model. Pkulaw Mcp Legal Research is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Pkulaw Mcp Legal Research in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/NEU-ZHA/legal-ai-skills/tree/main/skills/pkulaw-mcp-legal-research. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Pkulaw Mcp Legal Research?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Pkulaw Mcp Legal Research?

As many as you like. As long as a model supports skills, you can use Pkulaw Mcp Legal Research with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Pkulaw Mcp Legal Research AI skill free?

Yes. It is published on GitHub by NEU-ZHA under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇