# MCP server and AI agents

> Documentation index for AI agents: [/llms.txt](https://docs.apiindonesia.id/llms.txt). Every page is also available as markdown: add `.md` to the URL.

Connect Claude Code, Cursor, Codex and other MCP clients to the remote MCP server.

API Indonesia runs a remote MCP server so AI agents can call the API as tools.

- Transport: streamable HTTP at `https://mcp.apiindonesia.id/mcp`
- Auth: `Authorization: Bearer aip_live_xxx` (your API key, see [Authentication](https://docs.apiindonesia.id/authentication.md))
- Official MCP Registry name: `id.apiindonesia/api-indonesia`
- Tool calls cost the same credits as REST requests (see [Pricing](https://docs.apiindonesia.id/pricing.md)).

## One-line installer (local coding agents)

For Claude Code, Cursor, Codex, opencode, VS Code, Windsurf, Gemini CLI and similar agents on your machine:

```bash
curl -fsSL https://apiindonesia.id/install.sh | sh -s -- --key aip_live_xxx
```

It needs Node.js 18+ and runs on macOS and Linux (on Windows, use the manual config below). It checks the key without spending credits, adds the MCP server to every agent it detects, keeps their other MCP servers and is safe to re-run. `--agent <name>` (repeatable) limits it to specific agents; `--project` writes the current repo's config instead. Reload the agent afterwards so it picks up the new server.

## Manual MCP config

Any MCP client that takes JSON:

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

For hosted assistants (ChatGPT, claude.ai connectors) and sandboxed agents, follow the current setup notes in [apiindonesia.id/llms.txt](https://apiindonesia.id/llms.txt).

## Other integrations

- Skill, plugin, MCP config and examples (MIT): [github.com/khmuhtadin/api-indonesia-examples](https://github.com/khmuhtadin/api-indonesia-examples)
- n8n community node: `n8n-nodes-api-indonesia` ([n8n.io/integrations/api-indonesia](https://n8n.io/integrations/api-indonesia))
- RapidAPI: [rapidapi.com/contactmuhtadin/api/api-indonesia](https://rapidapi.com/contactmuhtadin/api/api-indonesia)
- Postman: [postman.com/contactmuhtadin-185774/api-indonesia](https://www.postman.com/contactmuhtadin-185774/api-indonesia)

## Without MCP

Scripts and backends can call `https://use.apiindonesia.id/api/v1/...` directly with the `x-api-key` header. Every endpoint is in the [OpenAPI spec](https://apiindonesia.id/openapi.json) and the [endpoint index](https://docs.apiindonesia.id/endpoints.md).
