> ## Documentation Index
> Fetch the complete documentation index at: https://docs.loopreturns.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Connect AI assistants to Loop Returns with the Loop MCP Server.

<Card title="Join our MCP Lunch & Learn — July 7 at 1pm ET" icon="calendar" href="https://www.loopreturns.com/mcp-lunch-and-learn/?utm_source=hubspot&utm_campaign=lunch-and-learn&utm_medium=developer&utm_term=webinar">
  Get a live walkthrough of the Loop MCP Server with our team. Register now to save your spot.
</Card>

## What is the Loop MCP Server?

The Loop MCP Server is a [Model Context Protocol](https://modelcontextprotocol.io) server that lets AI assistants — Claude, Cursor, VS Code Copilot, ChatGPT, and any other MCP-compatible client — interact with the Loop Returns platform on a merchant's behalf.

Once a merchant connects their MCP client to Loop, the assistant can:

* Look up returns, orders, and policies
* Take actions on returns (approve, reject, cancel, close, flag, process, add notes)
* Manage allowlist and blocklist entries
* Read and write workflow rules
* Report fraud and review fraud categories
* Render interactive return cards inside the assistant via Generative UI

All requests are authenticated via OAuth 2.1 (with PKCE) against the merchant's Loop account, and every tool call is gated by the same role-based permissions used in the Loop Admin.

## Why MCP?

The MCP server is the right fit when you want an assistant to **act on Loop data conversationally** — for example, "Show me the last 10 returns flagged for fraud and reject any from this email address." It complements the [REST API](/api-reference/getting-started) and [outgoing webhooks](/webhook-reference/getting-started) rather than replacing them:

| Surface                                        | Best for                                                    |
| ---------------------------------------------- | ----------------------------------------------------------- |
| [REST API](/api-reference/getting-started)     | Server-to-server integrations and bespoke applications      |
| [Webhooks](/webhook-reference/getting-started) | Reacting to events as they happen                           |
| **MCP Server**                                 | Letting an AI assistant operate Loop on a merchant's behalf |

## Available tools

Tools are grouped by domain. Every tool enforces the merchant's existing permissions — if the user can't perform the action in the Loop Admin, the assistant can't either. **22 tools** are available today across six groups:

| Group                 | Tools                                                  | Reference                                   |
| --------------------- | ------------------------------------------------------ | ------------------------------------------- |
| Shop & Policy         | Get shop info, read return policies                    | [Reference](/mcp/tools/shop-and-policy)     |
| Returns — Read        | List returns, get return details, get return timeline  | [Reference](/mcp/tools/returns-read)        |
| Returns — Actions     | Add note, flag, unflag, reject, cancel, close, process | [Reference](/mcp/tools/returns-actions)     |
| Fraud                 | List fraud categories, report fraud                    | [Reference](/mcp/tools/fraud)               |
| Allowlist & Blocklist | List, add, and remove entries on either list           | [Reference](/mcp/tools/allowlist-blocklist) |
| Workflows             | List workflows, get workflow detail                    | [Reference](/mcp/tools/workflows)           |

## Generative UI

When an assistant takes an action on a return — for example, processing or rejecting it — Loop returns a UI **spec** alongside the text response. MCP clients that support [MCP Apps](https://modelcontextprotocol.io/specification/draft/server/apps) render this spec into an interactive card with status badges and action buttons, so merchants can confirm what happened without leaving the chat.

## Built-in skills

To keep responses accurate, the server ships with **skills** — concise guides covering Loop's domain model (return states, outcomes, and the "Loops" vocabulary), how to present tool output, and how to handle fraud. They're surfaced to the client automatically, so a capable assistant pulls in the right guidance on its own before acting. There's nothing to configure — skills work by design.

## Endpoint

The production MCP endpoint is:

```
https://api.loopreturns.com/mcp
```

OAuth discovery metadata is available at:

```
https://api.loopreturns.com/.well-known/oauth-protected-resource
https://api.loopreturns.com/.well-known/openid-configuration
```

## Next steps

<CardGroup cols={2}>
  <Card title="Get Started" icon="play" href="/mcp/getting-started">
    Connect Claude, Cursor, or VS Code Copilot to the Loop MCP Server in a few minutes.
  </Card>

  <Card title="Authentication" icon="lock" href="/mcp/authentication">
    Learn how OAuth 2.1 with PKCE keeps merchant data scoped to the right shop.
  </Card>
</CardGroup>
