Philippine Law MCP Server

Philippine Law MCP Server

Enables 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.

Category
Visit Server

README

Philippine Law MCP Server

The Chan Robles Virtual Law Library alternative for the AI age.

npm version MCP Registry License GitHub stars CI Daily Data Check Database Provisions

Query 11,663 Philippine statutes -- from the Data Privacy Act of 2012 (RA 10173) and the Cybercrime Prevention Act (RA 10175) to the Revised Penal Code, the Labor Code, the 1987 Constitution, and more -- directly from Claude, Cursor, or any MCP-compatible client.

If you're building legal tech, compliance tools, or doing Philippine legal research, this is your verified reference database.

Built by Ansvar Systems -- Stockholm, Sweden


Why This Exists

Philippine legal research means navigating lawphil.net, the Chan Robles Virtual Law Library, the Official Gazette, and Supreme Court e-Library, then manually cross-referencing between Republic Acts, Presidential Decrees, and implementing rules. Whether you're:

  • A lawyer validating citations in a brief or contract
  • A compliance officer checking Data Privacy Act obligations or NPC advisories
  • A legal tech developer building tools on Philippine law
  • A researcher tracing legislative provisions across 11,663 statutes from 1946 to 2024

...you shouldn't need dozens of browser tabs and manual cross-referencing. Ask Claude. Get the exact provision. With context.

This MCP server makes Philippine law searchable, cross-referenceable, and AI-readable.


Quick Start

Use Remotely (No Install Needed)

Connect directly to the hosted version -- zero dependencies, nothing to install.

Endpoint: https://philippine-law-mcp.vercel.app/mcp

Client How to Connect
Claude.ai Settings > Connectors > Add Integration > paste URL
Claude Code claude mcp add philippine-law --transport http https://philippine-law-mcp.vercel.app/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": {
    "philippine-law": {
      "type": "url",
      "url": "https://philippine-law-mcp.vercel.app/mcp"
    }
  }
}

GitHub Copilot -- add to VS Code settings.json:

{
  "github.copilot.chat.mcp.servers": {
    "philippine-law": {
      "type": "http",
      "url": "https://philippine-law-mcp.vercel.app/mcp"
    }
  }
}

Use Locally (npm)

npx @ansvar/philippine-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": {
    "philippine-law": {
      "command": "npx",
      "args": ["-y", "@ansvar/philippine-law-mcp"]
    }
  }
}

Cursor / VS Code:

{
  "mcp.servers": {
    "philippine-law": {
      "command": "npx",
      "args": ["-y", "@ansvar/philippine-law-mcp"]
    }
  }
}

Example Queries

Once connected, just ask naturally:

  • "What does the Data Privacy Act of 2012 (RA 10173) say about personal information controllers?"
  • "Find provisions in the Revised Penal Code about cybercrime"
  • "What does the Cybercrime Prevention Act (RA 10175) say about online libel?"
  • "Search for labor rights under the Labor Code -- illegal dismissal provisions"
  • "Ano ang sinasabi ng Saligang Batas ng 1987 tungkol sa karapatan ng mga manggagawa?" (What does the 1987 Constitution say about workers' rights?)
  • "What are the penalties under RA 10175 for unauthorized access to computer systems?"
  • "Validate the citation 'Section 16, RA 10173'"
  • "Find provisions about corporate governance in the Revised Corporation Code (RA 11232)"
  • "Search for consumer protection provisions in RA 7394 (Consumer Act of the Philippines)"
  • "Build a legal stance on data breach notification requirements under Philippine law"

What's Included

Category Count Details
Republic Acts 11,663 statutes RA 1 (1946) through RA series 2024
Provisions 96,519 sections Full-text searchable with FTS5
1987 Constitution Included Full text with all articles and sections
Revised Penal Code Included Act No. 3815 with amendments
Case Law 0 (free tier) Reserved for future ingestion
Preparatory Works 0 (free tier) Reserved for future ingestion
Database Size ~146 MB Optimized SQLite, portable
Daily Updates Automated Freshness checks against lawphil.net

Verified data only -- every citation is validated against official sources (lawphil.net, officialgazette.gov.ph). Zero LLM-generated content.


See It In Action

Why This Works

Verbatim Source Text (No LLM Processing):

  • All statute text is ingested from lawphil.net and the Official Gazette of the Philippines
  • Provisions are returned unchanged from SQLite FTS5 database rows
  • Zero LLM summarization or paraphrasing -- the database contains regulation text, not AI interpretations

Smart Context Management:

  • Search returns ranked provisions with BM25 scoring (safe for context)
  • Provision retrieval gives exact text by RA number + section
  • Cross-references help navigate without loading everything at once

Technical Architecture:

lawphil.net / Official Gazette --> Parse --> SQLite --> FTS5 snippet() --> MCP response
                                     ^                        ^
                              Provision parser         Verbatim database query

Traditional Research vs. This MCP

Traditional Approach This MCP Server
Search lawphil.net by RA number Search by plain English: "personal information controller"
Navigate multi-section Acts manually Get the exact provision with context
Manual cross-referencing between Acts and IRRs build_legal_stance aggregates across sources
"Is this Act still in force?" -> check manually check_currency tool -> answer in seconds
Find international alignment -> dig through ASEAN portals get_eu_basis -> linked international frameworks instantly
Check Chan Robles, Official Gazette separately Daily automated freshness checks
No API, no integration MCP protocol -> AI-native

Traditional: Search lawphil.net -> Download HTML -> Ctrl+F -> Cross-reference with IRR -> Check NPC advisory -> Repeat

This MCP: "What are the complete obligations of a personal information controller under RA 10173 and the NPC implementing rules?" -> Done.


Available Tools (13)

Core Legal Research Tools (8)

Tool Description
search_legislation FTS5 full-text search across 96,519 provisions with BM25 ranking
get_provision Retrieve specific provision by RA number + section (e.g., "RA 10173" + "Section 16")
validate_citation Validate citation against database (zero-hallucination check)
build_legal_stance Aggregate citations from statutes across multiple Republic Acts
format_citation Format citations per Philippine conventions (full/short/pinpoint)
check_currency Check if statute is in force, amended, or repealed
list_sources List all available statutes with metadata and data provenance
about Server info, capabilities, dataset statistics, and coverage summary

International Law Alignment Tools (5)

Tool Description
get_eu_basis Get international frameworks aligned with Philippine statutes
get_philippine_implementations Find Philippine laws implementing international frameworks
search_eu_implementations Search international documents with Philippine alignment counts
get_provision_eu_basis Get international law references for a specific provision
validate_eu_compliance Check alignment status against international frameworks

International Law Alignment

The Philippines is not an EU member state. Philippine law draws from US common law traditions (civil procedure, constitutional structure) alongside a civil law heritage. International alignment is primarily through ASEAN frameworks, APEC, and bilateral agreements.

Metric Value
Legal System Mixed civil law and common law (US influence)
Data Protection Data Privacy Act of 2012 (RA 10173) -- NPC oversight, APEC CBPR aligned
Cybercrime Cybercrime Prevention Act (RA 10175) -- Budapest Convention signatory (2018)
ASEAN Framework ASEAN Digital Data Governance Framework, ASEAN Cybersecurity Cooperation Strategy
Trade ASEAN Free Trade Area, bilateral agreements with EU, US, Japan

Key Philippine Statutes with International Alignment

  1. RA 10173 (Data Privacy Act 2012) -- Aligned with APEC CBPR, informed by EU Directive 95/46/EC
  2. RA 10175 (Cybercrime Prevention Act 2012) -- Budapest Convention on Cybercrime principles
  3. RA 11232 (Revised Corporation Code 2019) -- OECD corporate governance principles
  4. RA 8792 (E-Commerce Act 2000) -- UNCITRAL Model Law on Electronic Commerce
  5. RA 7394 (Consumer Act 1992) -- UN Guidelines for Consumer Protection principles

Note: The Philippines does not have an EU adequacy decision. Transfers of personal data from EU to Philippines require Standard Contractual Clauses or other GDPR Art. 46 safeguards. The NPC actively benchmarks RA 10173 against GDPR for adequacy purposes.


Data Sources & Freshness

All content is sourced from authoritative Philippine legal databases:

Data Provenance

Field Value
Authority Official Gazette of the Philippines (Office of the President)
Retrieval method lawphil.net and Official Gazette HTML
Languages English (primary legal language; Filipino for constitutional texts)
License Public domain (Philippine government publications)
Coverage 11,663 Republic Acts (RA 1, 1946 through 2024) + Constitution + Revised Penal Code
Last ingested 2026-02-25

Automated Freshness Checks (Daily)

A daily GitHub Actions workflow monitors all data sources:

Source Check Method
Statute amendments Official Gazette date comparison All 11,663 Acts checked
New statutes Official Gazette publications (90-day window) Diffed against database
Reference staleness Git commit timestamps Flagged if >90 days old

Security

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
Docker Security Container image scanning + SBOM generation Daily
Socket.dev Supply chain attack detection PRs
OSSF Scorecard OpenSSF best practices scoring Weekly
Dependabot Automated dependency updates Weekly

See SECURITY.md for the full policy and vulnerability reporting.


Important Disclaimers

Legal Advice

THIS TOOL IS NOT LEGAL ADVICE

Statute text is sourced from lawphil.net and the Official Gazette. 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 jurisprudence research
  • Verify critical citations against primary sources for court filings
  • Implementing rules and regulations (IRRs) are not included -- check NPC, BSP, SEC issuances
  • International alignment reflects relationship analysis, not direct transposition

Before using professionally, read: DISCLAIMER.md | PRIVACY.md

Client Confidentiality

Queries go through the Claude API. For privileged or confidential matters, use on-premise deployment. For guidance on professional obligations, consult the Integrated Bar of the Philippines (IBP). See PRIVACY.md for compliance guidance.


Documentation


Development

Setup

git clone https://github.com/Ansvar-Systems/philippine-law-mcp
cd philippine-law-mcp
npm install
npm run build
npm test

Running Locally

npm run dev                                       # Start MCP server
npx @anthropic/mcp-inspector node dist/index.js   # Test with MCP Inspector

Data Management

npm run ingest                    # Ingest statutes from lawphil.net / Official Gazette
npm run build:db                  # Rebuild SQLite database
npm run drift:detect              # Run drift detection against anchors
npm run check-updates             # Check for amendments and new statutes
npm run census                    # Generate coverage census report

Performance

  • Search Speed: <100ms for most FTS5 queries
  • Database Size: ~146 MB (efficient, portable)
  • Reliability: 100% ingestion success rate across 11,663 Republic Acts

Related Projects: Complete Compliance Suite

This server is part of Ansvar's Compliance Suite -- MCP servers that work together for end-to-end compliance coverage:

@ansvar/eu-regulations-mcp

Query 49 EU regulations directly from Claude -- GDPR, AI Act, DORA, NIS2, MiFID II, eIDAS, and more. Full regulatory text with article-level search. npx @ansvar/eu-regulations-mcp

@ansvar/philippine-law-mcp (This Project)

Query 11,663 Philippine statutes directly from Claude -- Data Privacy Act, Cybercrime Prevention Act, Revised Penal Code, Labor Code, 1987 Constitution, and more. npx @ansvar/philippine-law-mcp

@ansvar/us-regulations-mcp

Query US federal and state compliance laws -- HIPAA, CCPA, SOX, GLBA, FERPA, and more. npx @ansvar/us-regulations-mcp

@ansvar/security-controls-mcp

Query 261 security frameworks -- ISO 27001, NIST CSF, SOC 2, CIS Controls, SCF, and more. npx @ansvar/security-controls-mcp

@ansvar/sanctions-mcp

Offline-capable sanctions screening -- OFAC, EU, UN sanctions lists. pip install ansvar-sanctions-mcp


Contributing

Contributions welcome! See CONTRIBUTING.md for guidelines.

Priority areas:

  • Supreme Court case law expansion (e-Library)
  • NPC advisory opinions and circular ingestion
  • Implementing rules and regulations (IRRs) coverage
  • Historical statute versions and amendment tracking

Roadmap

  • [x] Core statute database with FTS5 search
  • [x] Full corpus ingestion (11,663 Republic Acts, 96,519 provisions)
  • [x] 1987 Constitution and Revised Penal Code included
  • [x] International law alignment tools
  • [x] Vercel Streamable HTTP deployment
  • [x] npm package publication
  • [ ] Supreme Court case law expansion
  • [ ] NPC advisory opinions and circulars
  • [ ] Implementing rules and regulations (IRRs)
  • [ ] Historical statute versions (amendment tracking)

Citation

If you use this MCP server in academic research:

@software{philippine_law_mcp_2026,
  author = {Ansvar Systems AB},
  title = {Philippine Law MCP Server: Production-Grade Legal Research Tool},
  year = {2026},
  url = {https://github.com/Ansvar-Systems/philippine-law-mcp},
  note = {11,663 Philippine Republic Acts with 96,519 provisions including the 1987 Constitution and Revised Penal Code}
}

License

Apache License 2.0. See LICENSE for details.

Data Licenses

  • Statutes & Legislation: Official Gazette of the Philippines (public domain)
  • Republic Acts: LawPhil Project (public domain -- Philippine government publications)

About Ansvar Systems

We build AI-accelerated compliance and legal research tools for the global market. This MCP server started as our internal reference tool for Philippine law -- turns out everyone building compliance tools for Southeast Asia has the same research frustrations.

So we're open-sourcing it. Navigating 11,663 Republic Acts shouldn't require a law degree.

ansvar.eu -- Stockholm, Sweden


<p align="center"> <sub>Built with care in Stockholm, Sweden</sub> </p>

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
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

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
Philippine Law MCP Server