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

# Model Context Protocol (MCP)

> Connect AI coding assistants like Claude, Cursor, and VS Code to the Dintero documentation using MCP.

The [Model Context Protocol](https://modelcontextprotocol.io/) (MCP) is an open standard that lets AI assistants search and read documentation directly. Your AI tools can look up API references, integration guides, and code examples without leaving your editor.

## Server URL

The Dintero MCP server is available at:

```http theme={null}
https://docs.dintero.com/mcp
```

## Connect your AI tool

<Tabs>
  <Tab title="Claude Code">
    Run this command in your terminal:

    ```bash theme={null}
    claude mcp add --transport http dintero-docs https://docs.dintero.com/mcp
    ```

    Verify the connection

    ```bash theme={null}
    claude /mcp
    ```

    The server is now available in all Claude Code sessions. Ask Claude to search the Dintero docs when you need API details or integration guidance.
  </Tab>

  <Tab title="Cursor">
    <Steps>
      <Step title="Open MCP settings">
        Open the command palette and select **Cursor Settings** > **MCP**.
      </Step>

      <Step title="Add the server">
        Click **Add new global MCP server** and add the following configuration:

        ```json theme={null}
        {
          "mcpServers": {
            "dintero-docs": {
              "url": "https://docs.dintero.com/mcp"
            }
          }
        }
        ```
      </Step>
    </Steps>
  </Tab>

  <Tab title="VS Code (Copilot)">
    Create or update `.vscode/mcp.json` in your project:

    ```json theme={null}
    {
      "servers": {
        "dintero-docs": {
          "type": "http",
          "url": "https://docs.dintero.com/mcp"
        }
      }
    }
    ```
  </Tab>

  <Tab title="Claude (web)">
    <Steps>
      <Step title="Open connectors">
        Go to **Settings** > **Connectors** and click **Add connector**.
      </Step>

      <Step title="Configure the server">
        Set the name to **Dintero Docs** and the URL to `https://docs.dintero.com/mcp`.
      </Step>

      <Step title="Use it in a conversation">
        When composing a message, click the connector icon and select **Dintero Docs** to give Claude access to the documentation.
      </Step>
    </Steps>
  </Tab>
</Tabs>

## Available tools

The MCP server exposes two tools:

| Tool                 | Description                                                                                                                               |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| **Search**           | Full-text search across all documentation pages. Returns matching snippets with titles and links.                                         |
| **Query filesystem** | Read page content, browse the docs structure, and extract specific sections. Supports batch reads across multiple pages in a single call. |

## Example: Build a checkout integration

With the MCP server connected, your AI assistant can guide you through a full integration by pulling details directly from the Dintero docs. Here's how a typical conversation might look:

<Steps>
  <Step title="Set up authentication">
    **Prompt:** "How do I authenticate with the Dintero API? Show me how to get an access token in Node.js."

    The assistant looks up the [auth service](/docs/checkout/quickstart#step-1-create-api-credentials) docs and returns working code using your account's OAuth 2.0 client credentials flow.
  </Step>

  <Step title="Create a checkout session">
    **Prompt:** "I need to start a payment for a 299 NOK order with one item. How do I set that up with the Dintero API?"

    The assistant reads the [session API reference](/docs/checkout/create-session) and generates a request with the correct endpoint, amount format (smallest currency unit), and required fields.
  </Step>

  <Step title="Display the checkout">
    **Prompt:** "How do I embed the Dintero checkout in my React app?"

    The assistant finds the [Web SDK](/docs/checkout/sdk/checkout-web-sdk) docs and shows you how to install `@dintero/checkout-web-sdk` and use the `embed` function with your session ID.
  </Step>

  <Step title="Handle the payment result">
    **Prompt:** "What happens after the customer pays? How do I verify the transaction?"

    The assistant pulls from [After payment](/docs/checkout/after-payment) to explain the callback and return URL flow, transaction statuses, and how to handle `ON_HOLD` scenarios.
  </Step>

  <Step title="Capture and refund">
    **Prompt:** "Show me how to capture this transaction, and how to do a partial refund later."

    The assistant reads the [transaction management](/docs/checkout/transaction-management) docs and returns the correct capture and refund endpoints with example payloads.
  </Step>
</Steps>

<Tip>
  Be specific in your prompts. Instead of "help me with payments", try "show me the Dintero API request to capture a transaction for 150 NOK". The more context you give, the more accurate the response.
</Tip>

## More example prompts

Beyond the checkout flow, try prompts like:

* "How do I set up webhooks for transaction events in Dintero?"
* "What test card numbers can I use in the Dintero sandbox?"
* "Show me how to configure Express Checkout with shipping options"
* "How does split payout work for marketplace sellers?"
