# When to use API vs MCP

In short

* using the API is for human developers who need to integrate MadKudu with a service
* using the MCP is for LLMs and AI Agents

## What is the difference between API and MCP

MCP is a new protocol to connect to AI tools like ChatGPT, Claude, Cursor, Dust, or your own GPT agents.

* Your AI agent sends a natural language query like: *“Give me a brief about Walmart"*
* The **MCP server translates** that into API calls to MadKudu
* We send back structured responses the AI can use to take action or reply

In short, the MCP is just a AI-tool-friendly way to interact with the API.

## When to use API and MCP

**API Integration**

Perfect for developers or systems that want to call specific endpoints (like "get account info") using standard REST calls.

* You authenticate with API credentials
* You get a structured JSON response from your request to the API endpoint

**MCP  (Model Context Protocol) Integration**

Perfect for AI Agents and users of AI tools like ChatGPT, Claude, Cursor, Dust, or your own GPT agents.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.madkudu.com/getting-started/when-to-use-api-vs-mcp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
