mcpField
L
Lokal

Lokal

Local
github.comDeveloper Tools0Updated today

About Lokal

Lokal is an MCP server that adds Indonesian regional, identity, phone, currency, and calendar data to AI agents. It also includes local file tools that mask Indonesian personal data with stable placeholders, enabling agents to process production files while keeping the real values on the machine.

Key features

  1. 01Validate NIK, NPWP, phone, and QRIS
  2. 02Look up regions and postal codes
  3. 03Format and parse Rupiah
  4. 04Check holidays and working days
  5. 05Mask personal data in local files

Use cases

  1. 01Validate Indonesian identity and payment data
  2. 02Find regional details and postal codes
  3. 03Process production exports with personal data masked
  4. 04Restore original values in locally written results

MCP support

Exposes Indonesian data and file-processing tools to MCP clients. File tools are restricted to LOKAL_ROOT and are unavailable in remote HTTP mode.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"lokal-id-lokal": {
"command": "npx",
"args": [
"-y",
"@lokal-id/mcp"
],
"env": {
"LOKAL_ROOT": "<LOKAL_ROOT>"
}
}
}
}
Run commandnpx -y @lokal-id/mcp
Environment variables to set
LOKAL_ROOTFolder the file tools (scan_pii, read_file_masked, write_file_unmasked) may access. Defaults to the working directory.

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@lokal-id/mcp0.8.3

Tools

13

Saved tool list · updated today

ParameterTypeRequiredDescription
nikstringYes16-digit NIK; spaces and dots are ignored

Details

From the project README

@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/[email protected]. 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.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.