← Blog
Article

A Guide to Using MCP with API Indonesia

Learn how to integrate the Model Context Protocol (MCP) with API Indonesia so AI assistants can pull Indonesian public data directly.

Model Context Protocol (MCP) has changed the way AI interacts with external data. With MCP, AI assistants such as Claude Desktop can directly access and analyze data from many sources. In this article, we will look at how to use MCP to connect with API Indonesia, a platform that provides Indonesian public data.

What is MCP?

MCP is a protocol that lets large language models (LLMs) connect safely with external tools and data sources. Instead of copy-pasting data, you can ask the AI to call an API directly and fetch current information, such as weather data, news, or statistics in Indonesia.

Prerequisites

Before you start, make sure you have:

  1. An MCP client app (such as Claude Desktop).
  2. An API key from API Indonesia.
  3. An MCP server that supports HTTP REST requests (such as mcp-server-fetch or a custom wrapper).

Configuring MCP with API Indonesia

To connect Claude Desktop or another MCP client with API Indonesia, you need to configure the MCP config file (usually claude_desktop_config.json). Here is an example configuration if you use an MCP server that supports REST API calls:

{
  "mcpServers": {
    "api-indonesia": {
      "command": "npx",
      "args": ["-y", "mcp-server-rest"],
      "env": {
        "API_BASE_URL": "https://use.apiindonesia.id/api/v1",
        "API_KEY": "API_KEY_ANDA_DI_SINI"
      }
    }
  }
}

With this configuration, your AI assistant will be able to make GET requests to API Indonesia endpoints.

Example Use Cases

1. Fetching Current Weather Data

You can ask the AI to call the weather endpoint. The endpoint used is https://use.apiindonesia.id/api/v1/cuaca.

Prompt to the AI:

"Please fetch the current weather data for Jakarta using API Indonesia and give me a summary."

The AI will call the following endpoint:

GET https://use.apiindonesia.id/api/v1/cuaca?kota=jakarta
Authorization: Bearer API_KEY_ANDA

2. Searching for the Latest News

To get the latest national news, the AI can call the news endpoint at https://use.apiindonesia.id/api/v1/berita.

Prompt to the AI:

"Find 5 recent news items about technology in Indonesia from API Indonesia and show me the titles."

The AI will execute the API call:

GET https://use.apiindonesia.id/api/v1/berita?kategori=teknologi&limit=5
Authorization: Bearer API_KEY_ANDA

Conclusion

Integrating MCP with API Indonesia opens up endless possibilities for automating data retrieval. You can build AI assistants that are highly contextual and always kept up to date with local Indonesian data. Try setting it up today and start experimenting with the available endpoints!

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