nepal-law-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@nepal-law-mcpsearch the Nepal Civil Code"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
nepal-law-mcp
🌐 Live Demo
https://nepal-law-mcp.vercel.app/
नेपाल कानून आयोगबाट प्रकाशित ३२८ वटा ऐनहरू र ३,४२४ वटा धाराहरू खोज्न मिल्ने tool।
An MCP (Model Context Protocol) server with a web interface that provides search access to Nepali statutes scraped from lawcommission.gov.np. Includes a full PDF parsing pipeline with OCR fallback for section-level text extraction.
Related MCP server: Icelandic Law MCP
Features
search_statute: Full-text search across all statute titles and provisions using SQLite FTS5 + LIKE fallback
get_provision: Retrieve the full text of a specific section by act name and section number
list_acts: List all 328 acts in the database with Nepali/English titles, year, and status
check_status: Check whether an act is in force or repealed, with text quality and provision count
Web interface: Nepali-language SPA at
http://localhost:3001with search (debounced), browse, and provision viewerPDF pipeline: Download PDFs from CDN, extract sections via pdfjs-dist + tesseract OCR, quality-check
Setup
# Install dependencies
npm install
# Build TypeScript
npm run buildIngest Data
# Ingest all acts from the alphabetical index
npm run ingest
# Ingest a single act by name
npm run ingest -- --single "अख्तियार"Parse PDFs (extract section-level text)
# Process acts with PDF URLs (default: 5)
npm run parse-pdfs
# Process more acts
MAX_ACTS=100 npm run parse-pdfs
# Retry only previously-failed acts
FAILED_ONLY=1 npm run parse-pdfs
# Enable OCR-based title validation
OCR_TITLE_VALIDATE=1 npm run parse-pdfsWeb Interface
# Start the web server on port 3001
npm run web
# Or development mode (hot-reload)
npm run web:devOpen http://localhost:3001 to search and browse all acts.
Usage with Roo Code / Claude Desktop
{
"mcpServers": {
"nepal-law": {
"command": "node",
"args": ["path/to/nepal-law-mcp/dist/index.js"]
}
}
}Project Structure
nepal-law-mcp/
├── src/
│ ├── index.ts # MCP server (stdio transport)
│ ├── db.ts # SQLite database with FTS5
│ ├── scraper.ts # Web scraper module
│ └── types.ts # TypeScript types
├── scripts/
│ ├── ingest.ts # Standalone ingest runner
│ └── parse-pdfs.ts # PDF download + section extraction pipeline
├── web/
│ ├── server.ts # Express.js REST API
│ ├── public/
│ │ └── index.html # Nepali-language SPA
│ └── README.md
├── data/ # SQLite database location
├── package.json
├── tsconfig.json
├── README.md
└── SUMMARY.mdDevelopment
npm run dev # Watch mode for TypeScript compilation
npm run build # Compile TypeScript
npm run start # Run the MCP server
npm run web # Run the web interfaceDB State
Metric | Value |
Statutes in DB | 328 |
Provisions extracted | 3,408 from 94 acts |
Verified quality | 80 |
Low confidence | 14 |
Unprocessed (no source_url) | 233 |
This server cannot be deployed
Maintenance
Related MCP Connectors
Search US and Indian statutes, regulations, constitutions, and court rules.
Resolve, search and verify legal citations against the official sources, with provenance.
Search UK Acts, Statutory Instruments, and legislation with full text retrieval
Search U.S. case law, fetch opinions, and ask matter-aware legal questions over your documents.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceEnables users to search, retrieve, and validate over 11,000 Philippine statutes and nearly 100,000 provisions through AI-powered legal research tools. It supports full-text search across Republic Acts, the Constitution, and various codes while providing cross-referencing and international law alignment capabilities.1 npm-
- AlicenseAqualityFmaintenanceProvides access to 1,709 Icelandic statutes and 19,026 provisions with full-text search, citation validation, and EU/EEA law integration, enabling legal research and compliance checks through natural language queries.1147 npm1Apache 2.0
- AlicenseNot gradedqualityFmaintenanceEnables querying 40 Slovenian statutes with full-text search, provision retrieval, and EU law integration, providing verified references from official PISRS sources.33 npmApache 2.0
- AlicenseNot gradedqualityFmaintenanceProvides search, retrieval, and validation of Lithuanian statutes and provisions, including EU law cross-references, enabling legal research and compliance checks through natural language.25 npm1Apache 2.0