New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@lokal-id/mcp

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lokal-id/mcp

MCP server that makes AI agents Indonesia-ready: NIK/NPWP/phone validation, Rupiah, wilayah Kemendagri, and Samaran — read production data with Indonesian PII masked.

latest
Source
npmnpm
Version
0.6.0
Version published
Maintainers
1
Created
Source

@lokal-id/mcp

npm License: MIT

An MCP server that makes AI agents Indonesia-ready: accurate Kemendagri region and postal code data, holidays and working days, NIK/NPWP/phone validation, Rupiah, and Samaran, which lets an agent read production files (CSV, Excel, logs) with Indonesian personal data replaced by stable placeholders, then write results with the real values restored, locally.

Part of Lokal · Bahasa Indonesia

Install

Claude Code: install the Lokal plugin, which bundles this server with the skills and the Samaran Guard hook:

/plugin marketplace add lokal-id/lokal
/plugin install lokal@lokal

Cursor, Claude Desktop, Windsurf (.cursor/mcp.json, claude_desktop_config.json, ~/.codeium/windsurf/mcp_config.json):

{
  "mcpServers": {
    "lokal": {
      "command": "npx",
      "args": ["-y", "@lokal-id/mcp"],
      "env": { "LOKAL_ROOT": "/path/to/your/project" }
    }
  }
}

VS Code (.vscode/mcp.json):

{ "servers": { "lokal": { "type": "stdio", "command": "npx", "args": ["-y", "@lokal-id/mcp"] } } }

Codex CLI (~/.codex/config.toml):

[mcp_servers.lokal]
command = "npx"
args = ["-y", "@lokal-id/mcp"]

The file tools can only access LOKAL_ROOT, which defaults to CLAUDE_PROJECT_DIR and then to the working directory.

Tools

ToolWhat it does
parse_nikValidate and decode a NIK: region, date of birth, sex
validate_npwp15-digit NPWP, 16-digit NPWP, or NIK as NPWP
parse_phoneNormalize numbers, display format, WhatsApp link, carrier
parse_qrisRead and check a QRIS payload: merchant, NMID, criteria, amount, CRC
set_qris_amountMake a merchant's QRIS dynamic for an amount, with a new CRC
format_rupiah / parse_rupiahRp1.500.000, terbilang; "2jtan", "goceng" → numbers
search_wilayah / list_wilayahProvinces down to villages, with codes and postal codes
lookup_kode_posPostal code → villages, or all postal codes in a region
list_holidays / working_daysNational holidays and cuti bersama (SKB 2026, 2027), SLA due dates
scan_piiScan files and folders for personal data by UU PDP category; reports files it could not scan
read_file_maskedRead a file (text, CSV, JSON, logs, .xlsx, .docx, text-based PDF) with personal data replaced by placeholders
write_file_unmaskedWrite results with placeholders restored, on your machine
anonymize_fileCopy dumps and exports with realistic stand-ins for every person (Kembaran), returning only counts

Samaran Guard

lokal-mcp guard is a hook for Claude Code (UserPromptSubmit, and PreToolUse for Read|Grep|Bash|PowerShell), Codex CLI, Cursor, and Gemini CLI. It holds prompts that contain NIK, bank account, or health data, blocks commands that would print a personal data file into the conversation, pointing the agent to read_file_masked instead, and asks before photos of documents and scanned PDFs are read. The Lokal plugin sets it up for Claude Code; see the Lokal README for the other agents.

Kembaran

lokal-mcp kembaran prod.sql export.csv -o staging/ [--secret <text>] [--keep FINANCIAL] [--keep-birth-date] copies text files with every person replaced by a realistic stand-in, consistent across the files. See the Lokal README.

Lokal Scan

lokal-mcp scan --staged (pre-commit) or lokal-mcp scan --diff origin/main (CI) fails when a commit or pull request adds Indonesian personal data, and shows each value partially masked. lokal-mcp scan [path…] checks whole files. There is a GitHub Action too: uses: lokal-id/lokal@v0.6.0. See the Lokal README.

Remote (HTTP) mode

lokal-mcp serve --http --port 3000 serves the data tools over Streamable HTTP at /mcp, for ChatGPT and Claude.ai connectors. The file tools are not available in this mode.

Samaran Proxy

lokal-mcp proxy is an OpenAI- and Anthropic-compatible endpoint for apps: it masks Indonesian personal data in every request and restores it in the response, streaming and tool calls included.

npx @lokal-id/mcp proxy --port 8787 [--openai <url>] [--anthropic <url>] [--exclude FINANCIAL]

Then use OpenAI(base_url="http://127.0.0.1:8787/v1") or Anthropic(base_url="http://127.0.0.1:8787"). See the Lokal README.

License

MIT. The library is @lokal-id/core.

Keywords

mcp

FAQs

Package last updated on 23 Oct 2026

Related posts