## What is MCP?

The [Model Context Protocol](https://modelcontextprotocol.io/) is an open standard for connecting AI assistants to external tools and data. Once you wire up the Flex MCP, your AI assistant gets a set of typed tools — `create_product`, `list_payment_intents`, `refund_capture`, and so on — that mirror the Flex API. The assistant chooses which to call based on your prompt; you stay in control through tool-use approval prompts in the client.

## What you can do with the Flex MCP

- **Customer support** — Look up an order or payment intent by ID in plain English, with the full context the API returns.
- **Reconciliation** — Pull yesterday’s captured payments, group by product, and compare against your fulfillment system.
- **Refunds & disputes** — Draft a dispute response from order details, or issue a refund after a customer support conversation.
- **Subscription ops** — Query active subscriptions, find upcoming renewals, or update billing details on a customer.
- **Reporting** — Ask for weekly capture volume, top products by revenue, or a list of new customers in a date range.

See the [Tools & sample prompts](https://docs.withflex.com/developer-guides/integration/mcp/tools) page for concrete examples you can copy into your assistant.

## Authentication

The Flex MCP supports two ways to authenticate, and you should pick based on which client you’re using:

| Auth mode        | Best for                                           | How it works                                                                                       |
|------------------|---------------------------------------------------|-----------------------------------------------------------------------------------------------------|
| **OAuth**        | Claude.ai, Claude Desktop, any client with a browser | Click “Connect”, sign in with your Flex account, approve access. No API key to manage.            |
| **API key**      | Claude Code and other headless agents              | Paste an `fsk_…` (live) or `fsk_test_…` (test) API key in the client’s MCP config.                |

Both modes scope access to your partner — you only ever see your own data. See [Authentication](https://docs.withflex.com/developer-guides/integration/mcp/authentication) for details on how test mode works in each.

An MCP client connected to your Flex account has the **same level of access as the credentials you provide**. With OAuth, that’s the same access as the signed-in user; with an API key, it’s whatever scopes that key was issued. AI assistants can make mistakes — read the [Security best practices](https://docs.withflex.com/developer-guides/integration/mcp/security) before connecting a live (non-test) account.

## Get started

[**Quick start**](https://docs.withflex.com/developer-guides/integration/mcp/quick-start)\
Connect Claude.ai, Claude Code, or another MCP client in under five minutes.

[**Tools & sample prompts**](https://docs.withflex.com/developer-guides/integration/mcp/tools)\
See the tools the Flex MCP exposes, with copy-paste prompts you can try.

[**Authentication**](https://docs.withflex.com/developer-guides/integration/mcp/authentication)\
OAuth vs. API key, plus how test mode behaves in each.

[**Security best practices**](https://docs.withflex.com/developer-guides/integration/mcp/security)\
Scope your keys, stay in test mode while experimenting, and rotate credentials.
