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

# MCP Setup

> Connect any AI app to your Machines account using MCP for balances, cards, deposits, and agentic payments.

MCP (Model Context Protocol) connects AI apps like Claude, ChatGPT, and Copilot to your Machines account. Once connected, your AI can check balances, manage cards, handle deposits, and place purchases directly.

There is no separate setup for agentic payments. Once Machines MCP is connected, the shopping flow is available too.

<Tip>Using Claude? The <a href="/claude-plugin">Machines plugin for Claude</a> is the fastest setup. Use this page for other AI apps or as a manual fallback.</Tip>

## Prerequisites

* A Machines account with identity verification complete
* An AI app that supports remote MCP servers (Claude, ChatGPT, Copilot, Clawdbot, etc.)

## Connect with OAuth

<Steps>
  <Step title="Add a remote MCP server">
    Open your AI app's settings and add a new remote MCP server (sometimes called a connector or integration).
  </Step>

  <Step title="Paste the MCP URL">
    ```text theme={null}
    https://mcp.machines.cash/mcp
    ```
  </Step>

  <Step title="Authorize">
    Click connect, sign in on the Machines page, and approve access.
  </Step>

  <Step title="Verify it works">
    Ask your AI: `list my cards`
  </Step>
</Steps>

## Connect with API key

Use this if your app does not support OAuth and asks for manual credentials instead.

<Steps>
  <Step title="Create an API key">
    Go to your Machines dashboard, open Identity, and click <b>Create API Key</b>.
  </Step>

  <Step title="Add the key to your AI app">
    Paste your API key where your app asks for a token, API key, or credential.
  </Step>

  <Step title="Use the correct header format">
    Your app needs one of these headers:

    ```text theme={null}
    Authorization: Bearer <YOUR_USER_API_KEY>
    ```

    ```text theme={null}
    X-Consumer-Key: <YOUR_USER_API_KEY>
    ```
  </Step>
</Steps>

## Transport type

Use **remote Streamable HTTP** as the connection type with the URL above. Do not use localhost or stdio -- this is a hosted server.

## Example prompts

Once connected, try these:

* "list my cards"
* "show my balances"
* "start a USDC deposit on Base"
* "check my active deposits"
* "reveal full details for my newest card"
* "search apple airpods pro on amazon"
* "buy these apple airpods pro on amazon using my default card"
* "check the status of my latest purchase"

<Tip>
  For agentic payments, the same purchase flow works everywhere. You can start a purchase in MCP and continue it later through API or CLI with the same `actionId`.
</Tip>

## Troubleshooting

| Problem                       | Fix                                                                  |
| ----------------------------- | -------------------------------------------------------------------- |
| Connection fails              | Verify you're using exactly `https://mcp.machines.cash/mcp`          |
| "Missing bearer token" error  | Reconnect with OAuth, or add your API key manually                   |
| Labels look raw or unfriendly | Ask for `machines.user.cards.list` or set `presentation: "end_user"` |
| Card numbers refused by host  | Ask the AI to use `reveal_card_details` instead                      |
| Still not working             | Remove the Machines MCP connection and add it again                  |

## Keep your account safe

<Warning>Never share API keys in chats, screenshots, or support tickets. If a key is exposed, revoke it immediately and create a new one.</Warning>

* Only approve access on trusted Machines pages (`machines.cash` domain)
* Reveal full card details only when you explicitly need them
* Do not paste keys into shared documents or public channels

## Next steps

* <a href="/cli">Machines CLI</a> -- terminal commands for login, cards, and deposits
* <a href="/agentic-payments">Agentic Payments</a> -- one shared search, buy, status, confirm, and 3DS flow
* <a href="/raw-knowledge-file">Raw Knowledge File</a> -- paste context into your AI for better responses
