> For the complete documentation index, see [llms.txt](https://developers.madkudu.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.madkudu.com/getting-started/when-to-use-api-vs-mcp.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
