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

# MCP Overview

> Model Context Protocol integration for AI agents

The Sari Platform exposes its API capabilities through the Model Context Protocol (MCP), enabling AI agents like Claude Desktop to discover and execute APIs dynamically.

## What is MCP?

Model Context Protocol (MCP) is an open protocol that standardizes how AI applications connect to external data sources and tools. It provides:

* **Standardized Communication** - Consistent interface for tools and resources
* **Context Sharing** - Rich context exchange between AI and tools
* **Dynamic Capabilities** - Tools and resources can be added or removed on the fly

## Sari MCP Tools

The Sari MCP Server exposes three tools:

<CardGroup cols={3}>
  <Card title="search_api_collections" icon="magnifying-glass">
    Search for APIs using natural language queries
  </Card>

  <Card title="get_openapi_spec" icon="file-code">
    Retrieve OpenAPI specifications for a collection
  </Card>

  <Card title="execute_api" icon="play">
    Execute API requests against registered collections
  </Card>
</CardGroup>

## How It Works

<Frame caption="MCP Tool Flow">
  <img src="https://mintcdn.com/mobily/wAm_OJ8uuLzVWRxI/arch/tool-flow.png?fit=max&auto=format&n=wAm_OJ8uuLzVWRxI&q=85&s=d2c66111c84b305247704c43b334d541" alt="MCP Tool Flow" width="1067" height="722" data-path="arch/tool-flow.png" />
</Frame>

### Example Workflow

<Steps>
  <Step title="User asks about payments">
    "I need to process a credit card payment"
  </Step>

  <Step title="AI searches for relevant APIs">
    ```
    search_api_collections("payment processing credit card")
    → Stripe Payment API (0.89)
    → PayPal Checkout API (0.82)
    ```
  </Step>

  <Step title="AI retrieves the API spec">
    ```
    get_openapi_spec("Stripe Payment API")
    → Full OpenAPI specification
    ```
  </Step>

  <Step title="AI executes the API call">
    ```
    execute_api(
      collection_name="Stripe Payment API",
      method="POST",
      endpoint="/v1/charges",
      request_data='{"amount": 1000, "currency": "usd"}'
    )
    ```
  </Step>
</Steps>

## Supported AI Clients

<CardGroup cols={2}>
  <Card title="Claude Desktop" icon="desktop">
    Full support via SSE transport or mcp-remote
  </Card>

  <Card title="Other MCP Clients" icon="plug">
    Any MCP-compatible client can connect
  </Card>
</CardGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Setup Guide" icon="gear" href="/mcp/setup">
    Configure your AI client to connect to Sari
  </Card>

  <Card title="Tools Reference" icon="wrench" href="/mcp/tools">
    Detailed documentation for each MCP tool
  </Card>
</CardGroup>
