Pakistani legislation via MCP — full-text search across statutes and provisions
Pakistani legislation via MCP — full-text search across statutes and provisions
Valid MCP server (3 strong, 2 medium validity signals). 2 known CVEs in dependencies (1 critical, 1 high severity) Package registry verified. Imported from the Official MCP Registry. Trust signals: trusted author (127/127 approved).
5 files analyzed · 3 issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
This plugin requests these system permissions. Most are normal for its category.
Add this to your MCP configuration file:
{
"mcpServers": {
"eu-ansvar-pakistani-law-mcp": {
"args": [
"-y",
"@ansvar/pakistani-law-mcp"
],
"command": "npx"
}
}
}From the project's GitHub README.
The PLJLCCI alternative for the AI age.
Query 1,030 Pakistani statutes -- from PECA and the Pakistan Penal Code to the Data Protection Act, Companies Act, and more -- directly from Claude, Cursor, or any MCP-compatible client.
If you're building legal tech, compliance tools, or doing Pakistani legal research, this is your verified reference database.
Built by Ansvar Systems -- Stockholm, Sweden
Pakistani legal research means navigating pakistancode.gov.pk, na.gov.pk, and the National Assembly's scattered PDF repositories. Whether you're:
...you shouldn't need dozens of browser tabs and manual PDF cross-referencing. Ask Claude. Get the exact provision. With context.
This MCP server makes Pakistani law searchable, cross-referenceable, and AI-readable.
Connect directly to the hosted version -- zero dependencies, nothing to install.
Endpoint: https://mcp.ansvar.eu/law-pk/mcp
| Client | How to Connect |
|---|---|
| Claude.ai | Settings > Connectors > Add Integration > paste URL |
| Claude Code | claude mcp add pakistani-law --transport http https://mcp.ansvar.eu/law-pk/mcp |
| Claude Desktop | Add to config (see below) |
| GitHub Copilot | Add to VS Code settings (see below) |
Claude Desktop -- add to claude_desktop_config.json:
{
"mcpServers": {
"pakistani-law": {
"type": "url",
"url": "https://mcp.ansvar.eu/law-pk/mcp"
}
}
}
GitHub Copilot -- add to VS Code settings.json:
{
"github.copilot.chat.mcp.servers": {
"pakistani-law": {
"type": "http",
"url": "https://mcp.ansvar.eu/law-pk/mcp"
}
}
}
npx @ansvar/pakistani-law-mcp
Claude Desktop -- add to claude_desktop_config.json:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"pakistani-law": {
"command": "npx",
"args": ["-y", "@ansvar/pakistani-law-mcp"]
}
}
}
Cursor / VS Code:
{
"mcp.servers": {
"pakistani-law": {
"command": "npx",
"args": ["-y", "@ansvar/pakistani-law-mcp"]
}
}
}
Once connected, just ask naturally:
| Category | Count | Details |
|---|---|---|
| Statutes | 1,030 statutes | Legislation sourced from pakistancode.gov.pk and na.gov.pk |
| Provisions | 28,249 sections | Full-text searchable with FTS5 |
| Database Size | Pre-built SQLite | Optimized, portable |
| Freshness Checks | Automated | Drift detection against official sources |
Verified data only -- every citation is validated against official sources (National Assembly, pakistancode.gov.pk). Zero LLM-generated content.
Verbatim Source Text (No LLM Processing):
Smart Context Management:
Technical Architecture:
pakistancode.gov.pk / na.gov.pk --> Parse --> SQLite --> FTS5 snippet() --> MCP response
^ ^
Provision parser Verbatim database query
| Traditional Approach | This MCP Server |
|---|---|
| Search pakistancode.gov.pk by statute name | Search by plain language: "cybercrime unauthorised access" |
| Navigate multi-chapter statutes manually | Get the exact provision with context |
| Manual cross-referencing between statutes | build_legal_stance aggregates across sources |
| "Is this statute still in force?" -- check manually | check_currency tool -- answer in seconds |
| Find international alignment -- dig through external sources | get_eu_basis -- linked frameworks instantly |
| No API, no integration | MCP protocol -- AI-native |
Traditional: Search pakistancode.gov.pk --> Download PDF --> Ctrl+F --> Cross-reference between statutes --> Repeat
This MCP: "What are the data protection obligations under PDPA and how do they compare with GDPR?" --> Done.
| Tool | Description |
|---|---|
search_legislation | FTS5 full-text search across 28,249 provisions with BM25 ranking. Supports quoted phrases, boolean operators, prefix wildcards |
get_provision | Retrieve specific provision by statute identifier + section (e.g., "PECA 2016" + "9") |
check_currency | Check if a statute is in force, amended, or repealed |
validate_citation | Validate citation against database -- zero-hallucination check |
build_legal_stance | Aggregate citations from multiple statutes for a legal topic |
format_citation | Format citations per Pakistani conventions (full/short/pinpoint) |
list_sources | List all available statutes with metadata, coverage scope, and data provenance |
about | Server info, capabilities, dataset statistics, and coverage summary |
| Tool | Description |
|---|---|
get_eu_basis | Get EU or international frameworks that a Pakistani statute aligns with |
get_pakistani_implementations | Find Pakistani laws aligning with an international framework or treaty |
search_eu_implementations | Search international instruments with Pakistani alignment counts |
get_provision_eu_basis | Get international law references for a specific provision |
validate_eu_compliance | Check alignment status of Pakistani statutes against international standards |
Pakistan is not an EU member state, but certain Pakistani laws have significant international alignment:
Pakistan participates in OIC (Organisation of Islamic Cooperation) legal frameworks, SAARC (South Asian Association for Regional Cooperation) treaties, and bilateral trade agreements that shape domestic law.
The international alignment tools allow you to explore these relationships -- checking which Pakistani provisions correspond to international requirements, and vice versa.
Note: Cross-references reflect alignment and treaty relationships, not transposition. Pakistan adopts its own legislative approach shaped by its federal structure, common law heritage, and constitutional framework.
All content is sourced from authoritative Pakistani legal databases:
| Field | Value |
|---|---|
| Authority | Federal Ministry of Law and Justice, National Assembly of Pakistan |
| Languages | English (primary legislative language); Urdu translations where available |
| Coverage | Federal statutes -- provincial legislation not included in this release |
| Source | pakistancode.gov.pk, na.gov.pk |
A GitHub Actions workflow monitors official sources for changes:
| Check | Method |
|---|---|
| Statute amendments | Drift detection against known provision anchors |
| New statutes | Comparison against official statute index |
| Repealed statutes | Status change detection |
Verified data only -- every citation is validated against official sources. Zero LLM-generated content.
This project uses multiple layers of automated security scanning:
| Scanner | What It Does | Schedule |
|---|---|---|
| CodeQL | Static analysis for security vulnerabilities | Weekly + PRs |
| Semgrep | SAST scanning (OWASP top 10, secrets, TypeScript) | Every push |
| Gitleaks | Secret detection across git history | Every push |
| Trivy | CVE scanning on filesystem and npm dependencies | Daily |
| Socket.dev | Supply chain attack detection | PRs |
| Dependabot | Automated dependency updates | Weekly |
See SECURITY.md for the full policy and vulnerability reporting.
THIS TOOL IS NOT LEGAL ADVICE
Statute text is sourced from official Pakistani government sources. However:
- This is a research tool, not a substitute for professional legal counsel
- Court case coverage is not included -- do not rely solely on this for case law research; consult PLD, SCMR, and other official reporters
- Verify critical citations against primary sources before court filings
- Provincial legislation is not included -- this covers federal statutes only; Sindh, Punjab, Balochistan, and KPK provincial laws require separate consultation
- Bilingual system -- Pakistan's official language is Urdu but legislation is enacted in English; both are constitutionally valid
Before using professionally, read: DISCLAIMER.md | SECURITY.md
Queries go through the Claude API. For privileged or confidential matters, use on-premise deployment. Consult Pakistan Bar Council (PBC) guidelines on use of AI tools in legal practice.
git clone https://github.com/Ansvar-Systems/Pakistani-law-mcp
cd Pakistani-law-mcp
npm install
npm run build
npm test
npm run dev # Start MCP server
npx @anthropic/mcp-inspector node dist/index.js # Test with MCP Inspector
npm run ingest # Ingest statutes from official sources
npm run build:db # Rebuild SQLite database
npm run drift:detect # Run drift detection against anchors
npm run check-updates # Check for source updates
This server is part of Ansvar's Compliance Suite -- MCP servers that work together for end-to-end compliance coverage:
Query 49 EU regulations directly from Claude -- GDPR, AI Act, DORA, NIS2, MiFID II, eIDAS, and more. npx @ansvar/eu-regulations-mcp
Query US federal and state compliance laws -- HIPAA, CCPA, SOX, GLBA, FERPA, and more. npx @ansvar/us-regulations-mcp
Query 261 security frameworks -- ISO 27001, NIST CSF, SOC 2, CIS Controls, SCF, and more. npx @ansvar/security-controls-mcp
70+ national law MCPs covering Australia, Brazil, Canada, Croatia, Denmark, Finland, France, Germany, India, Ireland, Italy, Japan, Kenya, Latvia, Netherlands, Norway, Romania, Saudi Arabia, Singapore, Sweden, Switzerland, UAE, UK, and more.
Contributions welcome! See CONTRIBUTING.md for guidelines.
Priority areas:
If you use this MCP server in academic research:
@software{pakistani_law_mcp_2026,
author = {Ansvar Systems AB},
title = {Pakistani Law MCP Server: AI-Powered Legal Research Tool},
year = {2026},
url = {https://github.com/Ansvar-Systems/Pakistani-law-mcp},
note = {1,030 Pakistani federal statutes with 28,249 provisions}
}
Apache License 2.0. See LICENSE for details.
We build AI-accelerated compliance and legal research tools for the global market. This MCP server started as our internal reference tool -- turns out everyone building compliance tools has the same research frustrations.
So we're open-sourcing it. Navigating 1,030 federal statutes shouldn't require a law degree.
ansvar.eu -- Stockholm, Sweden
Be the first to review this server!
by Modelcontextprotocol · Developer Tools
Read, search, and manipulate Git repositories programmatically
by Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
by mcp-marketplace · Developer Tools
Create, build, and publish Python MCP servers to PyPI — conversationally.
by Microsoft · Content & Media
Convert files (PDF, Word, Excel, images, audio) to Markdown for LLM consumption
by mcp-marketplace · Developer Tools
Scaffold, build, and publish TypeScript MCP servers to npm — conversationally
by mcp-marketplace · Finance
Free stock data and market news for any MCP-compatible AI assistant.