法律智能检索平台

Themis是一个基于MCP的RAG服务器,帮助东南亚初创企业自动检索法律知识,适用于金融科技、游戏合规、电子商务等领域。

  • by Duke0503
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 Duke0503/themis-mcp

使用说明

忒弥斯⚖️

面向东南亚初创企业的人工智能法律情报平台 通过MCP将您的整个法律知识库带入Claude、Cursor和每个AI代理。


Themis是什么?

Themis是一个 MCP本地RAG服务器 这让人工智能代理在需要时自动检索法律知识,而无需任何手动提示。

Google Drive ──┐
Local docs    ─┼──► Themis ──► Claude / Cursor / Copilot
Notion        ─┘   (MCP)      auto-cites legal sources on every answer

专为越南和东南亚的初创公司打造:

  • 金融科技/加密货币法规
  • 游戏和数字产品合规性
  • 电子商务和托管法
  • 数据隐私(越南PDPD、GDPR)
  • 纳税义务

为什么是忒弥斯?

问题 当前解决方案 忒弥斯
分散在Drive、Notion上的法律文档 手动搜索 自动索引,始终可搜索
人工智能特工在法律问题上产生幻觉 没有根据 每个答案都引用了来源+文章
RAG工具不能本地连接到AI代理 Chatbot UI MCP——代理会自动调用它
多语言法律文本(越南语+英语) 仅限英语的工具 多语言-5,支持两者

快速开始

git clone https://github.com/yourname/themis
cd themis

# Start full stack
docker compose up

# Index your documents
python pipeline/cli.py index ./knowledge

# Test search
python pipeline/cli.py search "quy định AML cho sàn crypto Việt Nam"

# Connect to Claude Code
# Add to ~/.claude/claude_desktop_config.json:
{
  "mcpServers": {
    "themis": {
      "command": "node",
      "args": ["/path/to/themis/mcp/server.js"],
      "env": { "THEMIS_API": "http://localhost:8000" }
    }
  }
}

建筑

┌─────────────────────────────────────────────┐
│              MCP Server            │
│   search · list_sources · get_document       │
└──────────────────┬──────────────────────────┘
                   │ HTTP
┌──────────────────▼──────────────────────────┐
│           AI Pipeline (Python)               │
│  LangChain · HuggingFace · Qdrant           │
│  Hybrid Search · Cross-encoder Reranking     │
└──────┬──────────────────────────────┬────────┘
       │                              │
┌──────▼──────┐              ┌───────▼────────┐
│   Qdrant    │              │  Google Drive  │
│ Vector DB   │              │  Notion / Local│
└─────────────┘              └────────────────┘

技术栈

层 技术 为什么
AI编排 链浪 行业标准,MultiQueryRetriever,上下文压缩
嵌入件 多语言e5-small (HuggingFace) 本地,免费,越南语+英语
矢量数据库 Qdrant 生产级,内置混合搜索
重新排名 交叉编码器/ms-marco-MiniLM +15–30%精度,本地
MCP服务器 Node.js+@modelcontextprotocol/sdk 原生MCP支持
连接器 Google Drive API、Notion API 法律文件实际居住的地方
基础设施 Docker Compose 一个命令设置

MCP工具

search

跨整个知识库的语义+关键字混合搜索。

list_sources

列出所有具有块计数的索引文档。

get_document

检索特定文档的完整内容。

refresh

触发连接器的重新同步(Google Drive、Notion)。


支持的文档格式

.pdf · .docx · .md · .html · .txt · .png · .jpg (OCR)· .json · .yaml


知识库结构

knowledge/
  vietnam/        # Luật Việt Nam (PCRT, PDPD, thuế, TMĐT)
  international/  # FATF, GDPR, MiCA, FinCEN
  gaming-tos/     # Steam, Blizzard, Epic ToS
  escrow-regs/    # Quy định escrow, chuyển tiền
  tax/            # Thuế TNCN, TNDN, VAT

许可证

麻省理工学院——免费自助。云版本即将推出。