Skip to content
MCP server

Lokal

Indonesia-ready agent tools: NIK, NPWP, phone, QRIS, Rupiah, regions and PII masking

Runs locally

Lokal is an open-source MCP server for security. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
CLI, Self-hosted
Runs
Locally
What it can do
Can change data (2 tools)
Version
0.18.2

Similar MCP servers

Install

Add with the CLI

Run in a terminal

claude mcp add lokal -- npx -y @lokal-id/mcp

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

Or share it with your project

Add to .mcp.json

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

Claude Code setup guide

Add to claude_desktop_config.json

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

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

Claude Desktop setup guide

Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

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

Use .cursor/mcp.json in a project to share it with the project.

Cursor setup guide

Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to ~/.copilot/mcp-config.json

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

Or put the same entry in .mcp.json at your workspace root to share it.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add lokal -- npx -y @lokal-id/mcp

Or add to config.toml

Add to ~/.codex/config.toml

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

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "lokal": {
      "command": "npx",
      "args": [
        "-y",
        "@lokal-id/mcp"
      ]
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

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

    Or run: gemini mcp add -s user lokal npx -- -y @lokal-id/mcp

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

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

    Use .agents/mcp_config.json to add it to one workspace only.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.json

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

    On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

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

    Open it from the MCP Servers icon → Configure → Configure MCP Servers.

    Cline setup guide

  • Zed

    Add to Zed settings.json

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

    Open it with zed: open settings file. Merge context_servers into the settings you already have.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

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

    Junie

    Add to ~/.junie/mcp/mcp.json

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

    Use .junie/mcp/mcp.json to share it with a project.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

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

    Use .kiro/settings/mcp.json to add it to one workspace only.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

Configuration

  • LOKAL_ROOTFolder the file tools (scan_pii, read_file_masked, write_file_unmasked) may access. Defaults to the working directory.

About Lokal

Indonesian data has quirks a general model gets wrong, and this server encodes them. parse_nik decodes region, birth date and sex; validate_npwp handles 15- and 16-digit numbers; parse_qris checks a payment payload including its CRC, and set_qris_amount makes a merchant code dynamic. Rupiah tools write terbilang and read slang like "2jtan" or "goceng". Kemendagri region and postal code data back search_wilayah, lookup_kode_pos and parse_alamat, and list_holidays and working_days know national holidays and cuti bersama for 2026 and 2027.

The larger part is Samaran. read_file_masked opens CSV, Excel, logs, DOCX or text PDFs with personal data swapped for stable placeholders, and write_file_unmasked restores the real values locally. File tools are confined to LOKAL_ROOT. A guard hook blocks prompts and commands that would print personal files, a proxy masks LLM requests, and Kembaran produces realistic stand-ins for staging data.

The code is MIT licensed. An optional NER model catches names without cues.

Tools this server provides (18)

Taken from the project documentation; the running server may differ.

From the tool list in its README, going by the names, 2 of 18 tools change data; 10 names don't say.

From the server's own tool labels and tool names; not verified by us.

parse_nik
Validate and decode a NIK
validate_npwpName suggests: reads
Validate a 15- or 16-digit NPWP
parse_phone
Normalise phone numbers
parse_qris
Read and check a QRIS payload
set_qris_amountName suggests: changes
Make a merchant QRIS dynamic for an amount
format_rupiah
Format Rupiah amounts
parse_rupiah
Parse Rupiah expressions into numbers
search_wilayahName suggests: reads
Search Indonesian regions
list_wilayahName suggests: reads
List regions
lookup_kode_posName suggests: reads
Postal code to villages
parse_alamat
Free-text address to structured parts
list_holidaysName suggests: reads
National holidays and cuti bersama
working_days
Working-day and SLA date calculations
scan_pii
Scan files for personal data
read_file_maskedName suggests: reads
Read a file with personal data masked
write_file_unmaskedName suggests: changes
Write results with placeholders restored
anonymize_file
Copy files with realistic stand-ins
clear_vault
Forget real values behind placeholders

What it does

Identity validation
parse_nik, validate_npwp and parse_phone check and decode Indonesian identifiers.
QRIS payloads
Read and verify a payload, or set an amount with a new CRC.
Regions and postcodes
Provinces down to villages with codes and postal codes.
Masked file reading
Personal data becomes placeholders, restored on write, locally.
Samaran Guard
Hook that holds prompts and commands that would expose personal data.
Staging data
anonymize_file makes realistic stand-ins for every person.

Good for

  • Validate a customer's NIK and NPWP in a workflow
  • Let an agent analyse a production CSV without seeing real personal data
  • Compute SLA due dates around Indonesian holidays
  • Parse a free-text Indonesian address into regions and postal code

Pricing

Open source

MIT licence

Lokal FAQ

Where is the data masked?

On your machine; the vault of real values stays local.

Is there a hosted mode?

lokal-mcp serve --http offers the data tools over HTTP, without file tools.

What licence?

MIT.

Which files can Lokal read masked?

Text, CSV, JSON, logs, xlsx, docx and text-based PDF.

How do I clear Lokal?

clear_vault forgets every real value behind the session's placeholders.

Is Lokal free?

Yes. Lokal is open source, so you can use and self-host it for free.

How do I add Lokal to Claude Code?

Run this command in your terminal: claude mcp add lokal -- npx -y @lokal-id/mcp

What are the best alternatives to Lokal?

The closest alternatives to Lokal are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

Where this comes from

  • Description: written from the project's README.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers