vn-luat-mcp

vn-luat-mcp

MCP server to query Vietnamese law (legal code and case law) with full-text search supporting diacriticless input, enabling retrieval of articles, chapters, subjects, and precedents via Claude.

Category
Visit Server

README

vn-luat-mcp

MCP server tra cứu pháp luật Việt Nam trên PostgreSQL — gộp Bộ Pháp Điển (luật thành văn, 64k điều) và Án lệ / bản án (toaan.gov.vn). Dùng full-text search tiếng Việt (tìm cả khi gõ không dấu); Claude tự mở rộng từ khóa và xếp hạng để đạt hiệu quả gần ngữ nghĩa.

Chạy được trên Claude Desktop và Claude Code CLI. Kết nối tới PostgreSQL bằng user chỉ-đọc (an toàn).

Công cụ (tools)

Luật thành văn: tra_luat, xem_dieu_luat, tra_luat_theo_chu_de, liet_ke_chu_de, tra_thuat_ngu Án lệ: tra_an_le, xem_an_le, an_le_theo_dieu_luat (bắc cầu án lệ ↔ điều luật), tra_cau_an_le

Yêu cầu database

PostgreSQL với extension unaccent, và các bảng: articles, chapters, subjects, ontology_topics, ontology_glossary (pháp điển); anle_documents, anle_sentences (án lệ). Mỗi bảng văn bản có cột search_vector tsvector + chỉ mục GIN.

Tạo user chỉ-đọc:

CREATE USER mcp_ro WITH PASSWORD 'mat_khau_chi_doc';
GRANT CONNECT ON DATABASE appdb TO mcp_ro;
GRANT USAGE ON SCHEMA public TO mcp_ro;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO mcp_ro;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO mcp_ro;

Cấu hình kết nối (biến môi trường)

PGHOST (mặc định 127.0.0.1), PGPORT (5432), PGDATABASE (appdb), PGUSER (mcp_ro), PGPASSWORD.

Chạy từ GitHub (không cần cài vào máy)

Cần uv (brew install uv). Lệnh chạy server:

uvx --from git+https://github.com/USER/vn-luat-mcp vn-luat-mcp

uvx tự tải và tạo môi trường tạm — không lưu bản sao trong dự án của bạn.

Claude Desktop

Sửa ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "luat": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/USER/vn-luat-mcp", "vn-luat-mcp"],
      "env": {
        "PGHOST": "100.85.147.69",
        "PGDATABASE": "appdb",
        "PGUSER": "mcp_ro",
        "PGPASSWORD": "mat_khau_chi_doc"
      }
    }
  }
}

Khởi động lại Claude Desktop, rồi thử: "tra luật về an toàn thực phẩm".

Claude Code CLI

Đăng ký nhanh (phạm vi user):

claude mcp add-json luat '{
  "command": "uvx",
  "args": ["--from", "git+https://github.com/USER/vn-luat-mcp", "vn-luat-mcp"],
  "env": {"PGHOST":"100.85.147.69","PGDATABASE":"appdb","PGUSER":"mcp_ro","PGPASSWORD":"mat_khau_chi_doc"}
}'

Hoặc dùng theo dự án: sao chép .mcp.json.example thành .mcp.json trong thư mục dự án (đã được .gitignore).

Bảo mật

Chỉ kết nối bằng user chỉ-đọc. Nên đặt PostgreSQL sau mạng riêng (vd Tailscale), không mở ra Internet. Không commit mật khẩu — dùng .env / cấu hình client (đã .gitignore).

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured