
VibeLawyer
io.github.Jack-miPublished by GitHub account Jack-miv0.1.3Updated Oct 24, 2026
Local MCP for Chinese criminal dossier review; Word notes + Excel catalogs stay on-device.
Overview
A local MCP server that helps an AI assistant review Chinese criminal case dossier PDFs and produce Word review notes and an Excel evidence catalog on-device.
- What you can do
- Create and manage cases from a local PDF folder, list cases and check per-section registration counts, and fetch the standard review playbook and progress notes. Read dossiers: list volumes, get page outlines, read page ranges with local OCR, search across volumes, and render page images. Register findings with mandatory source volume and page: case basics, parties, indictment and charged facts, statements by defendants, co-defendants and witnesses, procedural documents, documentary evidence and transactions, catalog entries, conclusions and funds summaries. Validate citation page numbers and generate the Word review notes and Excel catalog, then download them.
- When to use it
- Useful for legal or paralegal work that needs to turn a folder of Chinese criminal case PDFs into a structured review record with traceable page citations. Fits both a full standard review run and ad-hoc lookups such as reading specific pages or exporting only the Word file.
- Requirements
- Runs locally over stdio via uvx or pip; Python 3.11 or newer. No Claude Code CLI needed and no API keys declared. Optional local docling environment and tesseract with chi_sim improve OCR of scanned pages. Case PDFs are placed in a local data folder and outputs go to an output folder.
Installation
In SourceWeft
- Open VibeLawyer in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
vibelawyer —— 通用化刑事案件阅卷 MCP
本地 FastMCP 阅卷工具箱。给定卷宗 PDF 目录,由 任意 Coding Agent(Cursor / Kimi Code / OpenCode / Codex / Claude Desktop 等)调用工具,产出:
- 阅卷笔录(Word
.docx)—— 七部分结构 + 案件基本信息 + 阅卷结论(结构化数据完整渲染,无截断) - 阅卷目录(Excel
.xlsx)—— 分卷总览 / 阅卷目录 / 案件信息 / 证据索引
不依赖 Claude Code CLI。 LLM 推理由宿主 Agent 提供;PDF 解析、OCR、Word/Excel 生成均在本机完成,卷宗不经过本服务上传。
事实与证据须标注来源卷宗及页码(如 见《主卷》P55-76),并可机器校验,落实「禁止幻觉、结论可回溯」。
对任意刑事案件通用,不假定具体罪名或当事人。本仓库不收录真实卷宗;运行时将 PDF 放入本地
data/(已 gitignore),产物写入output/(已 gitignore)。
两种用法(可穿插)
同一 case_id 下,完整流程与零散按需共用全部工具,工作区状态共享。
可先按 playbook 走完大半,再零散补登;也可先散读若干页,再按 playbook 补齐缺步。服务端不强制锁步;顺序约束写在 Skill / playbook 里,由宿主 Agent 遵守。
架构
start_review 只下发 playbook,不启动后台 LLM job。
可选遗留:pip install 'vibelawyer[legacy-agent]' + python -m vibelawyer.run --legacy(需本机 Claude Code CLI,非默认路径)。
安装
- Python ≥ 3.11
- 无需 Claude Code CLI
- 可选(推荐):本地 docling venv(
~/.local/share/docling-venv)提升扫描件 OCR - 可选:
tesseract+chi_sim作为 OCR 回退
接入宿主 Agent(推荐)
Cursor / 通用 mcp.json
Claude Desktop(claude_desktop_config.json)
Kimi Code / OpenCode / Codex
在各自 MCP 配置中填入同一 command / args。已安装包时可将 command 改为 vibelawyer(或别名 vibelawyer-mcp)、args 留空。本地 CLI 指引用 vibelawyer-cli。
配置完成后,让 Agent 阅读并遵循:
skills/vibelawyer-review/SKILL.md
(或调用 start_review 获取与 Skill 同源的结构化 playbook。)
典型流程
A. 完整阅卷
create_case(case_dir="/绝对路径/到卷宗目录")→case_id
(可选defendant_hint/charge_hint/output_dir)start_review(case_id)→ 拿到 steps / 铁律 / 调用约定- 按步:编目录 → 起诉书/当事人 → 被告供述 → 同案 → 证人 → 程序性文书 → 书证/流水 → 结论
每步用get_case_status或get_workspace_summary核实登记计数(勿信口头「已完成」) validate_citations→write_outputs→download_output(fmt="docx"|"xlsx")
B. 按需单次调用
CLI 辅助
HTTP(可选)
工具一览(约 25 个)
Passthrough 读/写/校验工具签名:tool_name(case_id, args={...})。
生命周期与工作流
读卷
登记(强制带来源卷宗名 + 页码)
校验与导出
标准阅卷步骤(playbook)
与 playbook.py / Skill 一致:
- 编制阅卷目录 —
add_catalog_entry,定位起诉书页 - 起诉书与当事人 —
set_case_basic/record_party/record_indictment/add_charged_fact - 被告人供述 —
record_statement(role=defendant),含逐字full_text - 同案人供述 — 无则跳过;有则
role=codefendant - 证人证言 —
role=witness - 程序性文书 —
record_procedural_doc(尽量含文号) - 书证与流水 —
record_documentary_evidence+ 流水类add_transaction - 阅卷结论 —
record_conclusions/record_funds_summary(不做正式辩护策略) - 校验导出 —
validate_citations→write_outputs→download_output
铁律(摘要)
- 只能依据
read_pages实际读到的内容登记,严禁编造 - 每条记录必须带来源卷宗名与页码
- 交付物 = 工具调用,不是口头报告
- 先
get_volume_outline再精读;用search_volumes防遗漏 - 每步结束用
get_workspace_summary/get_case_status核实计数
阅卷笔录结构
- 当事人基本情况(职务犯罪含任职情况)
- 起诉书、起诉意见书内容
- 被告人的供述和辩解
- 同案人员的供述和辩解
- 证人证言
- 程序性文书
- 书证
附:阅卷目录、阅卷结论(核心事实 / 证据链条 / 矛盾点 / 待核查疑点)。
在新案件上使用
- 新建本地目录,放入卷宗 PDF(文件名即卷宗名;会清理
(2)等后缀) - 宿主 Agent:
create_case(case_dir="<绝对路径>") - 完整流程走 Skill,或按需调工具后
write_outputs
无需改代码即可用于受贿、贪污、诈骗、非法吸收公众存款等;职务犯罪会提取任职情况。
约束与边界
- 仅本地工具面:解析 / OCR / 生成在本机;不把卷宗上传到 vibelawyer 服务(宿主模型调用由其厂商负责)
- 可回溯:事实须带来源页码;
validate_citations防幻觉页码 - 范围:只做阅卷目录与笔录梳理,不生成正式辩护策略或出庭意见
- 仓库不含案卷:
data/、output/、tessdata/已 gitignore,勿提交真实卷宗或当事人信息
目录结构
License
MIT
Source: README.md at commit 0dc102a
Tools
0Version history
1- v0.1.3LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts