{"_id":"@ansvar/philippine-law-mcp","_rev":"3-6d511629e1942686a2df02f531ea4bee","name":"@ansvar/philippine-law-mcp","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.1":{"name":"@ansvar/philippine-law-mcp","version":"1.0.1","keywords":["mcp","model-context-protocol","philippine-law","data-privacy-act","cybercrime-prevention","sim-registration","e-commerce","corporation-code","consumer-act","legislation","legal","compliance","asean","ansvar"],"author":{"name":"Ansvar Systems","email":"hello@ansvar.eu"},"license":"Apache-2.0","_id":"@ansvar/philippine-law-mcp@1.0.1","maintainers":[{"name":"ansvar","email":"jeffrey.von.rotz@ansvar.eu"}],"homepage":"https://ansvar.eu","bugs":{"url":"https://github.com/Ansvar-Systems/philippine-law-mcp/issues"},"bin":{"philippine-law-mcp":"dist/index.js"},"dist":{"shasum":"39a529c5d09b92352fb04b1859220cf253ef08ae","tarball":"https://registry.npmjs.org/@ansvar/philippine-law-mcp/-/philippine-law-mcp-1.0.1.tgz","fileCount":117,"integrity":"sha512-R4IVrD9XB7Hc303Sb0J743lollfyyjUFQulUlJnbtyYdmEp2TvyPflMMDt8OGYNP1rNvFBM963TVi12bsyw5JQ==","signatures":[{"sig":"MEYCIQDWvm2z6TmH3U7nxdVrLETt13Msd0hAQb98iONVHwRVAAIhAPALs6R0TkJZmhT0pWW4WgRpqFtPmue+i+wvsHYDKO88","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ansvar%2fphilippine-law-mcp@1.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":2091730},"main":"dist/index.js","type":"module","engines":{"node":">=18"},"gitHead":"d84617509d051420321e70b9591078ec4839fe0c","mcpName":"eu.ansvar/philippine-law-mcp","scripts":{"dev":"node --import tsx src/index.ts","lint":"tsc --noEmit","test":"vitest run","build":"tsc","start":"node dist/index.js","ingest":"node --import tsx scripts/ingest.ts","build:db":"node --import tsx scripts/build-db.ts","validate":"npm run lint && npm test && npm run test:contract","test:watch":"vitest","postinstall":"test -d dist || npm run build || true","drift:detect":"node --import tsx scripts/drift-detect.ts","test:contract":"vitest run __tests__/contract/","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"ansvar","email":"jeffrey.von.rotz@ansvar.eu"},"overrides":{"ajv":"^8.18.0","undici":"^7.0.0","path-to-regexp":"^8.0.0"},"repository":{"url":"git+https://github.com/Ansvar-Systems/philippine-law-mcp.git","type":"git"},"_npmVersion":"10.8.2","description":"Philippine law database covering the Data Privacy Act, Cybercrime Prevention Act, SIM Registration Act, E-Commerce Act, Revised Corporation Code, and Consumer Act with full-text search","directories":{},"_nodeVersion":"20.20.0","dependencies":{"@ansvar/mcp-sqlite":"^1.0.3","@modelcontextprotocol/sdk":"^1.25.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","vitest":"^3.0.0","typescript":"^5.9.3","@types/node":"^22.15.29","@vercel/node":"^5.6.4","better-sqlite3":"^12.6.2","@types/better-sqlite3":"^7.6.13"},"_npmOperationalInternal":{"tmp":"tmp/philippine-law-mcp_1.0.1_1771781997987_0.07671112115362089","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Ansvar MCP servers are now distributed as source from github.com/Ansvar-Systems/philippine-law-mcp under Apache 2.0. Self-hosting instructions: see the repo README. Hosted gateway: ansvar.eu"},"2.0.0":{"name":"@ansvar/philippine-law-mcp","version":"2.0.0","keywords":["mcp","model-context-protocol","philippine-law","republic-acts","data-privacy-act","cybercrime-prevention","corporation-code","consumer-act","legislation","legal","compliance","asean","southeast-asia","ansvar"],"author":{"name":"Ansvar Systems","email":"hello@ansvar.eu"},"license":"Apache-2.0","_id":"@ansvar/philippine-law-mcp@2.0.0","maintainers":[{"name":"ansvar","email":"jeffrey.von.rotz@ansvar.eu"}],"homepage":"https://ansvar.eu","bugs":{"url":"https://github.com/Ansvar-Systems/philippine-law-mcp/issues"},"bin":{"philippine-law-mcp":"dist/index.js"},"dist":{"shasum":"eb363f379ee94baab2a31cf1af236d7a2355eb15","tarball":"https://registry.npmjs.org/@ansvar/philippine-law-mcp/-/philippine-law-mcp-2.0.0.tgz","fileCount":125,"integrity":"sha512-bEhOxQ9gsSxy2eTfk/nJzylxoxFtInvkeZRTn+0L5fs4KUuAx7OLsEnjrfwYBxJyQ5Db29YoxuTSEg/9nK27CA==","signatures":[{"sig":"MEUCIQCHMF8pvsWCXdDKo6l4bIhXB9mTksSM8irJAnCioAjQrwIgV4GLlD+G0tzYFMmWbWCXtVwrerZMaQiJinoy8dvz86k=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ansvar%2fphilippine-law-mcp@2.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":276496},"main":"dist/index.js","type":"module","engines":{"node":">=18"},"gitHead":"a9d331ece6c7677bd61f71c4801531faa8e9b4ce","mcpName":"eu.ansvar/philippine-law-mcp","scripts":{"dev":"node --import tsx src/index.ts","lint":"tsc --noEmit","test":"vitest run","build":"tsc","start":"node dist/index.js","census":"node --import tsx scripts/census.ts","ingest":"node --import tsx scripts/ingest.ts","build:db":"node --import tsx scripts/build-db.ts","validate":"npm run lint && npm test && npm run test:contract","test:watch":"vitest","postinstall":"test -d dist || npm run build || true","drift:detect":"node --import tsx scripts/drift-detect.ts","check-updates":"node --import tsx scripts/check-updates.ts","test:contract":"vitest run __tests__/contract/","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"ansvar","email":"jeffrey.von.rotz@ansvar.eu"},"overrides":{"ajv":"^8.18.0","undici":"^7.0.0","path-to-regexp":"^8.0.0"},"repository":{"url":"git+https://github.com/Ansvar-Systems/philippine-law-mcp.git","type":"git"},"_npmVersion":"10.8.2","description":"Philippine law database covering 11,600+ Republic Acts (1946-2024), the 1987 Constitution, and the Revised Penal Code with full-text search","directories":{},"_nodeVersion":"20.20.0","dependencies":{"@ansvar/mcp-sqlite":"^1.0.3","@modelcontextprotocol/sdk":"^1.25.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","vitest":"^3.0.0","typescript":"^5.9.3","@types/node":"^22.15.29","@vercel/node":"^5.6.4","better-sqlite3":"^12.6.2","@types/better-sqlite3":"^7.6.13"},"_npmOperationalInternal":{"tmp":"tmp/philippine-law-mcp_2.0.0_1772104468149_0.18045608567076266","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Ansvar MCP servers are now distributed as source from github.com/Ansvar-Systems/philippine-law-mcp under Apache 2.0. Self-hosting instructions: see the repo README. Hosted gateway: ansvar.eu"}},"time":{"created":"2026-02-22T17:39:57.917Z","modified":"2026-05-02T05:48:13.577Z","1.0.1":"2026-02-22T17:39:58.226Z","2.0.0":"2026-02-26T11:14:28.382Z"},"bugs":{"url":"https://github.com/Ansvar-Systems/philippine-law-mcp/issues"},"author":{"name":"Ansvar Systems","email":"hello@ansvar.eu"},"license":"Apache-2.0","homepage":"https://ansvar.eu","keywords":["mcp","model-context-protocol","philippine-law","republic-acts","data-privacy-act","cybercrime-prevention","corporation-code","consumer-act","legislation","legal","compliance","asean","southeast-asia","ansvar"],"repository":{"url":"git+https://github.com/Ansvar-Systems/philippine-law-mcp.git","type":"git"},"description":"Philippine law database covering 11,600+ Republic Acts (1946-2024), the 1987 Constitution, and the Revised Penal Code with full-text search","maintainers":[{"name":"ansvar","email":"jeffrey.von.rotz@ansvar.eu"}],"readme":"# Philippine Law MCP Server\n\n**The LawPhil alternative for the AI age.**\n\n[![npm version](https://badge.fury.io/js/@ansvar%2Fphilippine-law-mcp.svg)](https://www.npmjs.com/package/@ansvar/philippine-law-mcp)\n[![MCP Registry](https://img.shields.io/badge/MCP-Registry-blue)](https://registry.modelcontextprotocol.io)\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![GitHub stars](https://img.shields.io/github/stars/Ansvar-Systems/philippine-law-mcp?style=social)](https://github.com/Ansvar-Systems/philippine-law-mcp)\n[![CI](https://github.com/Ansvar-Systems/philippine-law-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/Ansvar-Systems/philippine-law-mcp/actions/workflows/ci.yml)\n[![Daily Data Check](https://github.com/Ansvar-Systems/philippine-law-mcp/actions/workflows/check-updates.yml/badge.svg)](https://github.com/Ansvar-Systems/philippine-law-mcp/actions/workflows/check-updates.yml)\n\nQuery **11,600+ Philippine laws** -- from the Data Privacy Act and Cybercrime Prevention Act to the Revised Corporation Code, Consumer Act, and the 1987 Constitution -- directly from Claude, Cursor, or any MCP-compatible client.\n\nIf you're building legal tech, compliance tools, or doing Philippine legal research, this is your verified reference database.\n\nBuilt by [Ansvar Systems](https://ansvar.eu) -- Stockholm, Sweden\n\n---\n\n## Why This Exists\n\nPhilippine legal research is scattered across LawPhil, the Official Gazette, and various government agency sites. Whether you're:\n- A **lawyer** validating citations in a brief or contract\n- A **compliance officer** checking data privacy requirements under RA 10173\n- A **legal tech developer** building tools on Philippine law\n- A **researcher** analyzing regulatory trends across 78 years of Republic Acts\n\n...you shouldn't need dozens of browser tabs and manual cross-referencing. Ask Claude. Get the exact provision. With context.\n\nThis MCP server makes Philippine law **searchable, cross-referenceable, and AI-readable**.\n\n---\n\n## Quick Start\n\n### Use Remotely (No Install Needed)\n\n> Connect directly to the hosted version -- zero dependencies, nothing to install.\n\n**Endpoint:** `https://philippine-law-mcp.vercel.app/mcp`\n\n| Client | How to Connect |\n|--------|---------------|\n| **Claude.ai** | Settings > Connectors > Add Integration > paste URL |\n| **Claude Code** | `claude mcp add philippine-law --transport http https://philippine-law-mcp.vercel.app/mcp` |\n| **Claude Desktop** | Add to config (see below) |\n| **GitHub Copilot** | Add to VS Code settings (see below) |\n\n**Claude Desktop** -- add to `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"philippine-law\": {\n      \"type\": \"url\",\n      \"url\": \"https://philippine-law-mcp.vercel.app/mcp\"\n    }\n  }\n}\n```\n\n**GitHub Copilot** -- add to VS Code `settings.json`:\n\n```json\n{\n  \"github.copilot.chat.mcp.servers\": {\n    \"philippine-law\": {\n      \"type\": \"http\",\n      \"url\": \"https://philippine-law-mcp.vercel.app/mcp\"\n    }\n  }\n}\n```\n\n### Use Locally (npm)\n\n```bash\nnpx @ansvar/philippine-law-mcp\n```\n\n**Claude Desktop** -- add to `claude_desktop_config.json`:\n\n**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`\n**Windows:** `%APPDATA%\\Claude\\claude_desktop_config.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"philippine-law\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@ansvar/philippine-law-mcp\"]\n    }\n  }\n}\n```\n\n**Cursor / VS Code:**\n\n```json\n{\n  \"mcp.servers\": {\n    \"philippine-law\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@ansvar/philippine-law-mcp\"]\n    }\n  }\n}\n```\n\n## Example Queries\n\nOnce connected, just ask naturally:\n\n- *\"What does Section 3 of the Data Privacy Act say about personal information?\"*\n- *\"Find all Republic Acts about cybercrime and penalties\"*\n- *\"Is the Consumer Act (RA 7394) still in force?\"*\n- *\"What are the privacy provisions in the 1987 Constitution?\"*\n- *\"Search for provisions about electronic commerce and digital signatures\"*\n- *\"What penalties does RA 10175 prescribe for identity theft?\"*\n- *\"Find laws about SIM registration requirements\"*\n- *\"Compare data protection provisions across Philippine privacy laws\"*\n\n---\n\n## What's Included\n\n| Category | Count | Details |\n|----------|-------|---------|\n| **Laws** | 11,600+ statutes | Republic Acts (1946-2024), Constitution, Revised Penal Code |\n| **Provisions** | 80,000+ sections | Full-text searchable with FTS5 |\n| **EU Cross-References** | Auto-extracted | References to EU directives/regulations found in statute text |\n| **Database Size** | ~80 MB | Optimized SQLite, portable |\n| **Daily Updates** | Automated | Freshness checks against LawPhil |\n\n**Verified data only** -- every provision is sourced from LawPhil (Arellano Law Foundation). Zero LLM-generated content.\n\n---\n\n## Available Tools (15)\n\n### Core Legal Research Tools (8)\n\n| Tool | Description |\n|------|-------------|\n| `search_legislation` | FTS5 search across all provisions with BM25 ranking |\n| `get_provision` | Retrieve specific provision by document ID + section |\n| `validate_citation` | Validate citation against database (zero-hallucination check) |\n| `build_legal_stance` | Aggregate citations from multiple statutes for a legal question |\n| `format_citation` | Format citations per Philippine conventions (full/short/pinpoint) |\n| `check_currency` | Check if statute is in force, amended, or repealed |\n| `list_sources` | Data provenance, coverage scope, and limitations |\n| `about` | Server metadata, dataset statistics, and freshness |\n\n### EU Law Cross-Reference Tools (5)\n\n| Tool | Description |\n|------|-------------|\n| `get_eu_basis` | Get EU directives/regulations referenced by a Philippine statute |\n| `get_philippine_implementations` | Find Philippine laws referencing a specific EU act |\n| `search_eu_implementations` | Search EU documents with Philippine reference counts |\n| `get_provision_eu_basis` | Get EU law references for a specific provision |\n| `validate_eu_compliance` | Check alignment status with EU frameworks |\n\n---\n\n## Data Sources & Freshness\n\nAll content is sourced from authoritative Philippine legal databases:\n\n- **[LawPhil (lawphil.net)](https://lawphil.net)** -- The most comprehensive free Philippine law database, maintained by the Arellano Law Foundation\n- **[Official Gazette](https://www.officialgazette.gov.ph)** -- Official publication of the Republic of the Philippines\n\n### Automated Freshness Checks (Weekly)\n\nA [weekly GitHub Actions workflow](.github/workflows/check-updates.yml) monitors all data sources for new legislation and amendments.\n\n> Full provenance metadata: [`sources.yml`](./sources.yml)\n\n---\n\n## Philippine Legal System Context\n\n- **Mixed legal system:** Civil law (Spanish heritage) + common law (American heritage) + customary/Islamic law (Bangsamoro)\n- **Supreme law:** 1987 Constitution -- Article III Section 3 protects privacy of communication\n- **Data Protection Authority:** National Privacy Commission (NPC) -- one of the most active DPAs in Asia\n- **Primary language:** English (one of two official languages, alongside Filipino); all legislation in English\n- **Numbering:** Republic Acts (RA) for legislation passed by Congress (RA 1 in 1946 through RA 12000+ in 2024)\n- **Other statute types:** Presidential Decrees (PD), Executive Orders (EO), Batas Pambansa (BP), Commonwealth Acts (CA)\n- **ASEAN member** with 110M+ people and rapidly growing digital economy\n- **Seeking EU GDPR adequacy** for the Data Privacy Act (RA 10173)\n\n---\n\n## Security\n\nThis project uses multiple layers of automated security scanning:\n\n| Scanner | What It Does | Schedule |\n|---------|-------------|----------|\n| **CodeQL** | Static analysis for security vulnerabilities | Weekly + PRs |\n| **Semgrep** | SAST scanning (OWASP top 10, secrets, TypeScript) | Every push |\n| **Gitleaks** | Secret detection across git history | Every push |\n| **Trivy** | CVE scanning on filesystem and npm dependencies | Daily |\n| **Socket.dev** | Supply chain attack detection | PRs |\n| **OSSF Scorecard** | OpenSSF best practices scoring | Weekly |\n| **Dependabot** | Automated dependency updates | Weekly |\n\nSee [SECURITY.md](SECURITY.md) for the full policy and vulnerability reporting.\n\n---\n\n## Important Disclaimers\n\n### Legal Advice\n\n> **THIS TOOL IS NOT LEGAL ADVICE**\n>\n> Statute text is sourced from LawPhil (Arellano Law Foundation). However:\n> - This is a **research tool**, not a substitute for professional legal counsel\n> - **Verify critical citations** against primary sources for court filings\n> - **Implementing Rules and Regulations (IRR)** may not be included for all laws\n> - **EU cross-references** are extracted from statute text, not EUR-Lex full text\n\n**Before using professionally, read:** [DISCLAIMER.md](DISCLAIMER.md) | [PRIVACY.md](PRIVACY.md)\n\n---\n\n## Development\n\n### Setup\n\n```bash\ngit clone https://github.com/Ansvar-Systems/philippine-law-mcp\ncd philippine-law-mcp\nnpm install\nnpm run build\nnpm test\n```\n\n### Running Locally\n\n```bash\nnpm run dev                                       # Start MCP server\nnpx @anthropic/mcp-inspector node dist/index.js   # Test with MCP Inspector\n```\n\n### Data Management\n\n```bash\nnpm run census                    # Enumerate all Philippine laws from LawPhil\nnpm run ingest                    # Ingest full corpus (census-driven)\nnpm run ingest -- --limit 5       # Test with 5 acts\nnpm run ingest -- --resume        # Resume from where you left off\nnpm run ingest -- --skip-fetch    # Reuse cached HTML\nnpm run build:db                  # Rebuild SQLite database from seed files\nnpm run check-updates             # Check for new legislation\n```\n\n### Contract Tests\n\n12 golden contract tests covering:\n- 4 article retrieval tests (DPA s3, Cybercrime Act s3, Corporation Code s1, E-Commerce Act s1)\n- 3 search tests (personal information, cybercrime, electronic commerce)\n- 2 citation roundtrip tests (official lawphil.net URL patterns)\n- 1 cross-reference test (DPA to GDPR -- Philippines seeking EU adequacy)\n- 2 negative tests (non-existent RA, malformed section)\n\nRun with: `npm run test:contract`\n\n---\n\n## Related Projects: Complete Compliance Suite\n\nThis server is part of **Ansvar's Compliance Suite** -- MCP servers that work together for end-to-end compliance coverage:\n\n### [@ansvar/eu-regulations-mcp](https://github.com/Ansvar-Systems/EU_compliance_MCP)\n**Query 49 EU regulations directly from Claude** -- GDPR, AI Act, DORA, NIS2, MiFID II, eIDAS, and more. `npx @ansvar/eu-regulations-mcp`\n\n### [@ansvar/us-regulations-mcp](https://github.com/Ansvar-Systems/US_Compliance_MCP)\n**Query US federal and state compliance laws** -- HIPAA, CCPA, SOX, GLBA, FERPA, and more. `npx @ansvar/us-regulations-mcp`\n\n### [@ansvar/swedish-law-mcp](https://github.com/Ansvar-Systems/swedish-law-mcp)\n**Query 2,415 Swedish statutes** -- DSL, BrB, ABL, MB, and more. `npx @ansvar/swedish-law-mcp`\n\n### [@ansvar/sanctions-mcp](https://github.com/Ansvar-Systems/Sanctions-MCP)\n**Offline-capable sanctions screening** -- OFAC, EU, UN sanctions lists. `pip install ansvar-sanctions-mcp`\n\n---\n\n## Contributing\n\nContributions welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n\nPriority areas:\n- Presidential Decrees (PD) and Executive Orders (EO) coverage\n- Implementing Rules and Regulations (IRR) for major laws\n- Case law integration (Supreme Court decisions)\n- Historical statute amendments tracking\n\n---\n\n## Citation\n\nIf you use this MCP server in academic research:\n\n```bibtex\n@software{philippine_law_mcp_2026,\n  author = {Ansvar Systems AB},\n  title = {Philippine Law MCP Server: Production-Grade Legal Research Tool},\n  year = {2026},\n  url = {https://github.com/Ansvar-Systems/philippine-law-mcp},\n  note = {Comprehensive Philippine legal database with 11,600+ Republic Acts and full-text search}\n}\n```\n\n---\n\n## License\n\nApache License 2.0. See [LICENSE](./LICENSE) for details.\n\n### Data Licenses\n\n- **Legislation:** Open Access (LawPhil / Arellano Law Foundation)\n- **Government publications:** Government Open Data (Official Gazette)\n- **EU Metadata:** EUR-Lex (EU public domain)\n\n---\n\n## About Ansvar Systems\n\nWe build AI-accelerated compliance and legal research tools. This MCP server makes Philippine law searchable and AI-readable -- because navigating 11,600+ Republic Acts shouldn't require opening LawPhil in 47 tabs.\n\n**[ansvar.eu](https://ansvar.eu)** -- Stockholm, Sweden\n\n---\n\n<p align=\"center\">\n  <sub>Built with care in Stockholm, Sweden</sub>\n</p>\n","readmeFilename":"README.md"}