
Company News
AWS Security Hub Adds Socket for Supply Chain Security
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.
@ansvar/philippine-law-mcp
Advanced tools
Philippine law database covering 11,600+ Republic Acts (1946-2024), the 1987 Constitution, and the Revised Penal Code with full-text search
The LawPhil alternative for the AI age.
Query 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.
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
Philippine legal research is scattered across LawPhil, the Official Gazette, and various government agency sites. Whether you're:
...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.
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"
}
}
}
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"]
}
}
}
Once connected, just ask naturally:
| Category | Count | Details |
|---|---|---|
| Laws | 11,600+ statutes | Republic Acts (1946-2024), Constitution, Revised Penal Code |
| Provisions | 80,000+ sections | Full-text searchable with FTS5 |
| EU Cross-References | Auto-extracted | References to EU directives/regulations found in statute text |
| Database Size | ~80 MB | Optimized SQLite, portable |
| Daily Updates | Automated | Freshness checks against LawPhil |
Verified data only -- every provision is sourced from LawPhil (Arellano Law Foundation). Zero LLM-generated content.
| Tool | Description |
|---|---|
search_legislation | FTS5 search across all provisions with BM25 ranking |
get_provision | Retrieve specific provision by document ID + section |
validate_citation | Validate citation against database (zero-hallucination check) |
build_legal_stance | Aggregate citations from multiple statutes for a legal question |
format_citation | Format citations per Philippine conventions (full/short/pinpoint) |
check_currency | Check if statute is in force, amended, or repealed |
list_sources | Data provenance, coverage scope, and limitations |
about | Server metadata, dataset statistics, and freshness |
| Tool | Description |
|---|---|
get_eu_basis | Get EU directives/regulations referenced by a Philippine statute |
get_philippine_implementations | Find Philippine laws referencing a specific EU act |
search_eu_implementations | Search EU documents with Philippine reference counts |
get_provision_eu_basis | Get EU law references for a specific provision |
validate_eu_compliance | Check alignment status with EU frameworks |
All content is sourced from authoritative Philippine legal databases:
A weekly GitHub Actions workflow monitors all data sources for new legislation and amendments.
Full provenance metadata:
sources.yml
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 |
| OSSF Scorecard | OpenSSF best practices scoring | Weekly |
| 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 LawPhil (Arellano Law Foundation). However:
- This is a research tool, not a substitute for professional legal counsel
- Verify critical citations against primary sources for court filings
- Implementing Rules and Regulations (IRR) may not be included for all laws
- EU cross-references are extracted from statute text, not EUR-Lex full text
Before using professionally, read: DISCLAIMER.md | PRIVACY.md
git clone https://github.com/Ansvar-Systems/philippine-law-mcp
cd philippine-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 census # Enumerate all Philippine laws from LawPhil
npm run ingest # Ingest full corpus (census-driven)
npm run ingest -- --limit 5 # Test with 5 acts
npm run ingest -- --resume # Resume from where you left off
npm run ingest -- --skip-fetch # Reuse cached HTML
npm run build:db # Rebuild SQLite database from seed files
npm run check-updates # Check for new legislation
12 golden contract tests covering:
Run with: npm run test:contract
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 2,415 Swedish statutes -- DSL, BrB, ABL, MB, and more. npx @ansvar/swedish-law-mcp
Offline-capable sanctions screening -- OFAC, EU, UN sanctions lists. pip install ansvar-sanctions-mcp
Contributions welcome! See CONTRIBUTING.md for guidelines.
Priority areas:
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 = {Comprehensive Philippine legal database with 11,600+ Republic Acts and full-text search}
}
Apache License 2.0. See LICENSE for details.
We 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.
ansvar.eu -- Stockholm, Sweden
Built with care in Stockholm, Sweden
FAQs
Philippine law database covering 11,600+ Republic Acts (1946-2024), the 1987 Constitution, and the Revised Penal Code with full-text search
We found that @ansvar/philippine-law-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.

Research
/Security News
Popular npm packages keyv and cacheable compromised.

Security News
A misconfiguration gave three Anthropic models internet access, and one, believing it was in a simulation, shipped a credential-stealing package to PyPI.