New:Socket for Asana Is Now Available.Learn more
Get Started

@ansvar/indonesian-law-mcp

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ansvar/indonesian-law-mcp

Complete Indonesian Undang-Undang (law) database with census-first full corpus ingestion from BPK RI and JDIH Nasional. Full-text search across all provisions with FTS5.

latest
Source
npmnpm
Version
2.0.0
Version published
Maintainers
1
Created
Source

Indonesian Law MCP Server

The peraturan.go.id alternative for the AI age.

npm version MCP Registry License GitHub stars Database Provisions

Query 1,924 Indonesian Undang-Undang (laws) -- from the PDP Law and ITE Law to the Constitution and Company Law -- directly from Claude, Cursor, or any MCP-compatible client.

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

Built by Ansvar Systems -- Stockholm, Sweden

Why This Exists

Indonesian legal research is scattered across peraturan.go.id, peraturan.bpk.go.id, JDIH Nasional, and individual ministry databases. Whether you're:

  • A compliance officer checking PDP Law (data protection) obligations
  • A legal tech developer building tools on Indonesian law
  • A lawyer validating ITE Law provisions for e-commerce compliance
  • A researcher analysing ASEAN data protection frameworks

...you shouldn't need to parse government PDFs and navigate fragmented databases. Ask Claude. Get the exact provision. With context.

This MCP server makes Indonesian 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://indonesian-law-mcp.vercel.app/mcp

ClientHow to Connect
Claude.aiSettings > Connectors > Add Integration > paste URL
Claude Codeclaude mcp add indonesian-law --transport http https://indonesian-law-mcp.vercel.app/mcp
Claude DesktopAdd to config (see below)
GitHub CopilotAdd to VS Code settings (see below)

Claude Desktop -- add to claude_desktop_config.json:

{
  "mcpServers": {
    "indonesian-law": {
      "type": "url",
      "url": "https://indonesian-law-mcp.vercel.app/mcp"
    }
  }
}

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

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

Use Locally (npm)

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

Cursor / VS Code:

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

Example Queries

Once connected, just ask naturally:

  • "What does Pasal 1 of UU PDP (UU 27/2022) define as personal data?"
  • "Find provisions about transaksi elektronik in Indonesian law"
  • "What are the data controller obligations in the PDP Law?"
  • "Is UU 11/2008 (ITE Law) still in force?"
  • "Find consumer protection provisions in Indonesian law"
  • "What does UU 36/1999 say about telecommunications?"
  • "Search for 'transfer dana' in Indonesian legislation"

What's Included

CategoryCountDetails
Laws (Undang-Undang)1,924Full census of Indonesian national legislation
Provisions (Pasal)2,225Full-text searchable with FTS5
Legal Definitions65Extracted from Pasal 1 (Ketentuan Umum)
Full-text Laws8PDP, ITE, Company, Consumer Protection, Telecom, Trade, Fund Transfer
Metadata-only Laws1,916Title, year, number, status, source URL
Database Size~2.1 MBOptimized SQLite, portable
Coverage Period1946--202680 years of Indonesian legislation

Verified data only -- every law is enumerated from peraturan.go.id (JDIH Nasional), with full text sourced from peraturan.bpk.go.id (BPK RI). Zero LLM-generated content.

Key Laws with Full Article Text

LawArticlesDescription
UU 27/2022 (PDP Law)76Personal Data Protection -- Indonesia's GDPR equivalent
UU 11/2008 (ITE Law)54Electronic Information and Transactions
UU 36/1999 (Telecom)37Telecommunications
UU 8/1999 (Consumer)36Consumer Protection
UU 3/2011 (Fund Transfer)35Fund Transfer
UU 7/2014 (Trade)32Trade
UU 40/2007 (Company)26Limited Liability Companies (PT)
UU 19/2016 (ITE Amdt)13ITE Law Amendment

Available Tools (8)

ToolDescription
search_legislationFTS5 search on 2,225 provisions with BM25 ranking
get_provisionRetrieve specific provision by law identifier + Pasal number
list_documentsList all 1,924 laws with status and metadata
validate_citationValidate citation against database (zero-hallucination check)
check_currencyCheck if statute is in force, amended, or repealed
get_definitionsGet legal term definitions from Pasal 1 (Ketentuan Umum)
format_citationFormat citations per Indonesian conventions
build_legal_stanceAggregate citations across multiple statutes

EU Law Integration Tools (5)

ToolDescription
get_eu_basisGet EU directives/regulations referenced in Indonesian law
get_indonesian_implementationsFind Indonesian laws implementing EU acts
search_eu_implementationsSearch EU documents with Indonesian implementation counts
get_provision_eu_basisGet EU references for specific provision
validate_eu_complianceCheck implementation status

Data Sources & Architecture

Census-First Full Corpus Ingestion

This MCP uses a census-first approach:

  • Census (scripts/census.ts): Enumerates all 1,924 Undang-Undang from peraturan.go.id paginated listing
  • Ingest (scripts/ingest.ts): For each law, fetches full text from BPK RI (when accessible), falls back to metadata-only seed
  • Build (scripts/build-db.ts): Compiles all seeds into optimized SQLite with FTS5
peraturan.go.id (census) --> peraturan.bpk.go.id (full text) --> SQLite + FTS5 --> MCP response
                                    |
                         geo-blocked? --> metadata-only seed

Sources

  • peraturan.go.id -- JDIH Nasional (Ministry of Law and Human Rights). Canonical listing of all Indonesian legislation.
  • peraturan.bpk.go.id -- BPK RI (Audit Board of the Republic of Indonesia). Full-text HTML of legislation with Pasal/Bab structure.

Data Coverage by Decade

DecadeLaws
1940s113
1950s421
1960s191
1970s82
1980s101
1990s185
2000s367
2010s216
2020s248

Security

This project uses multiple layers of automated security scanning:

ScannerWhat It DoesSchedule
CodeQLStatic analysis for security vulnerabilitiesWeekly + PRs
SemgrepSAST scanning (OWASP top 10, secrets, TypeScript)Every push
GitleaksSecret detection across git historyEvery push
TrivyCVE scanning on filesystem and npm dependenciesDaily

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

Important Disclaimers

THIS TOOL IS NOT LEGAL ADVICE

Statute text is sourced from official Indonesian government databases. However:

  • This is a research tool, not a substitute for professional legal counsel
  • Full article text is available for 8 key laws only -- most laws have metadata only
  • Verify critical citations against primary sources (peraturan.go.id or peraturan.bpk.go.id)
  • Bahasa Indonesia is the legally binding language -- no English translations are official

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. See PRIVACY.md for guidance.

Development

Setup

git clone https://github.com/Ansvar-Systems/indonesian-law-mcp
cd indonesian-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 Pipeline

npm run census                           # Enumerate all 1,924 laws from peraturan.go.id
npm run ingest                           # Fetch full text from BPK RI + generate seeds
npm run ingest -- --resume               # Resume (skip existing seed files)
npm run ingest -- --limit 10             # Test with first 10 laws
npm run build:db                         # Rebuild SQLite database from seeds
npm run check-updates                    # Check for new legislation

Pipeline Details

StepScriptOutput
Censusscripts/census.tsdata/census.json (1,924 laws)
Ingestscripts/ingest.tsdata/seed/*.json (per-law JSON)
Buildscripts/build-db.tsdata/database.db (2.1 MB SQLite)

Performance

  • Search Speed: <100ms for most FTS5 queries
  • Database Size: ~2.1 MB (efficient, portable)
  • Census: ~50 seconds for full corpus enumeration
  • Ingestion: ~6 seconds with metadata-only fallback

This server is part of Ansvar's Compliance Suite:

@ansvar/eu-regulations-mcp

Query 49 EU regulations directly from Claude -- GDPR, AI Act, DORA, NIS2, and more. npx @ansvar/eu-regulations-mcp

@ansvar/us-regulations-mcp

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

@ansvar/swedish-law-mcp

Query 2,415 Swedish statutes -- DSL, BrB, ABL, MB, and more. npx @ansvar/swedish-law-mcp

@ansvar/security-controls-mcp

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

Contributing

Contributions welcome! Priority areas:

  • Full-text expansion -- Additional BPK RI Detail IDs for more laws
  • Peraturan Pemerintah (PP) -- Government regulations (implementing legislation)
  • Peraturan Presiden (Perpres) -- Presidential regulations
  • English translation alignment for key statutes
  • Historical amendment tracking

Roadmap

  • Census-first full corpus -- 1,924 Undang-Undang enumerated from peraturan.go.id
  • Full text for key laws -- PDP, ITE, Company, Consumer, Telecom, Trade, Fund Transfer
  • Full text expansion via BPK RI (from Indonesian IP access)
  • Peraturan Pemerintah (PP) coverage
  • Case law integration
  • Daily freshness checks
  • Premium tier with version tracking

Citation

If you use this MCP server in academic research:

@software{indonesian_law_mcp_2026,
  author = {Ansvar Systems AB},
  title = {Indonesian Law MCP Server: Census-First Legal Research Tool},
  year = {2026},
  url = {https://github.com/Ansvar-Systems/indonesian-law-mcp},
  note = {1,924 Indonesian Undang-Undang with full-text search}
}

License

Apache License 2.0. See LICENSE for details.

Data Licenses

  • Legislation: Government Open Data (Republic of Indonesia)
  • Source: peraturan.go.id (JDIH Nasional) + peraturan.bpk.go.id (BPK RI)

About Ansvar Systems

We build AI-accelerated compliance and legal research tools. This MCP server covers the Indonesian legal system -- the largest economy in ASEAN with 270M+ people and a rapidly evolving regulatory landscape.

ansvar.eu -- Stockholm, Sweden

Built with care in Stockholm, Sweden

Keywords

mcp

FAQs

Package last updated on 26 Feb 2026

Related posts