← Blog
Article

Connect API Indonesia to Claude Code, Cursor and Codex in One Line

One command adds the API Indonesia MCP server to every AI agent on your machine. Or give your agent a single sentence and let it do the setup.

API Indonesia runs an MCP server at https://mcp.apiindonesia.id/mcp with 84 tools: administrative regions down to villages, postal codes, public holidays and joint leave, prayer times, BMKG earthquakes and weather, exchange rates, minimum wage, NIK/NPWP format checks, halal, BPOM, KBBI and more. With MCP, agents such as Claude Code, Cursor or Codex can pull this data while you work.

Setting it up used to mean editing each agent's config file by hand, and every agent uses a different format. There are now two shorter ways.

Option 1: give your agent one sentence

Paste this into Claude Code, Codex, Cursor or any agent that can run terminal commands:

set up API Indonesia - https://apiindonesia.id/llms.txt

The agent reads llms.txt, asks you for an API key, runs the installer and tells you how to reload your agents. It cannot create a key for you, so have one ready (steps 1 and 2 below).

Option 2: run the installer yourself

  1. Sign up at dashboard.apiindonesia.id/register. New accounts get a one-time 3,000 credit bonus after email verification, no card required.
  2. Open API Keys and create a key. Keys start with aip_live_.
  3. Run:
curl -fsSL https://apiindonesia.id/install.sh | sh -s -- --key aip_live_xxx

The output looks like this:

Checking the API key...
Preparing the installer...

  ✓ Claude Code  ~/.claude.json
  ✓ Codex  ~/.codex/config.toml
  ✓ Cursor  ~/.cursor/mcp.json

API Indonesia is connected to 3 agents: 80+ tools for Indonesian public data

The installer only touches agents it finds on your machine. If it finds none, it stops without writing any file.

Supported agents

Claude Code, Codex, Cursor, VS Code (Copilot agent mode), opencode, Gemini CLI, Windsurf, Zed, Claude Desktop, and the other agents supported by add-mcp, such as Kiro, Goose, Cline and GitHub Copilot CLI.

Claude Desktop only reads local (stdio) servers from its config file, so for Claude Desktop the installer sets up an mcp-remote bridge that forwards to our remote server.

Last step: reload your agent

Agent What to do
Claude Code Restart it, then run /mcp to see api-indonesia
Claude Desktop Quit completely (Cmd+Q) and open it again
Codex Start a new session
Cursor Restart, then check that api-indonesia is enabled in Settings > MCP
VS Code Developer: Reload Window

Then try:

  • "When is the next public holiday in Indonesia?"
  • "Prayer times today in Pontianak."
  • "Latest BMKG earthquake."
  • "List the districts in Bandung with their codes."
  • "Is NIK 3171xxxxxxxxxxxx well-formed?"

Each successful request costs 2 credits (Rp2). Failed requests, for example from invalid input, are free.

Installer options

  • --agent <name>: install for specific agents only, repeatable, e.g. --agent claude-code --agent cursor.
  • --project: write config into the current project (such as .mcp.json and .cursor/mcp.json) instead of your user config. Those files contain your API key, so the installer adds them to .gitignore when the folder is a git repo.
  • Pass the key through an environment variable to keep it out of the command arguments:
curl -fsSL https://apiindonesia.id/install.sh | API_INDONESIA_API_KEY=aip_live_xxx sh

It is safe to run again, for example after rotating your key. The old entry is replaced rather than duplicated, and your other MCP servers are left alone.

What the installer does

You can read the script at apiindonesia.id/install.sh before running it. In order, it:

  1. Checks the API key against an endpoint that returns 404, so the check spends no credits.
  2. Checks that the MCP server is reachable.
  3. Detects installed agents and writes each one's config through the add-mcp library.
  4. Reads every config back to confirm the server is in it, then prints ✓ or ✗ per agent.

It needs Node.js 18+ and runs on macOS and Linux.

Windows and other MCP clients

On Windows, or in any client that takes a JSON config, add the server by hand:

{
  "mcpServers": {
    "api-indonesia": {
      "url": "https://mcp.apiindonesia.id/mcp",
      "headers": { "Authorization": "Bearer aip_live_xxx" }
    }
  }
}

The full tool list and per-client config examples are in the MCP documentation.

Not supported yet

Custom connectors in ChatGPT and claude.ai (web) require OAuth, and the API Indonesia MCP server uses API keys. For now, use an agent on your own machine (Claude Code, Codex, Cursor, Claude Desktop) or call the REST API directly at https://use.apiindonesia.id/api/v1/... with the x-api-key header.

Get Started

Start Integrating
Today

Sign up for free and get a 3,000 credit bonus (Rp3,000) once your email is verified, grab an API key, and call your first endpoint right away. No credit card, no tedious approval process.

Dot wave visualization