nepal-law-mcp
Provides search and retrieval of Nepali statutes from the law commission database, enabling users to search across 328 acts and their provisions, view section details, and check act status via natural language.
README
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.
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 viewer - PDF pipeline: Download PDFs from CDN, extract sections via pdfjs-dist + tesseract OCR, quality-check
Setup
# Install dependencies
npm install
# Build TypeScript
npm run build
Ingest 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-pdfs
Web Interface
# Start the web server on port 3001
npm run web
# Or development mode (hot-reload)
npm run web:dev
Open 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.md
Development
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 interface
DB 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 |
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.