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

# Connect an AI

> Work with your organization from Claude, ChatGPT or another AI assistant through Ready for Commerce's MCP server.

Ready for Commerce has an MCP server, the open standard AI assistants use to call other apps' tools. Its address:

```text theme={null}
https://app.readyforcommerce.com/api/mcp
```

Connected to it, an AI assistant such as Claude, ChatGPT, Gemini, Cursor or VS Code reads and works with your
organization's data through the same operations as this API, as you, within what you allow.

## Connect your AI

**1. Open Connect an AI**

In the app, go to **Settings › API and connections** and press **Connect an AI**. Choose your
AI: the window adds the address by a button where your AI has one, gives Claude Code a command
to paste, and otherwise shows the address and where to paste it. Any AI that takes an MCP
server's address can connect, from its own settings.

**2. Sign in and choose what it may do**

Your AI opens Ready for Commerce's sign-in, then one page that asks which organization it works
with, when you belong to more than one, and what it may do there: **Read only**, chosen first,
**Full access** or **Custom**.

**3. Allow access**

Your AI now lists Ready for Commerce's tools. Ask it, for example, how many exports ran this
week.

**Your AI acts as you.** Each of its calls is checked as yours, read live: it never does more than your own role in
that organization allows, even with **Full access**, and its connection ends when you leave the organization or reset
your password.

## Disconnect an AI

**Settings › API and connections › Connected AIs** lists the organization's connections. Each person disconnects their
own, and a person allowed to manage connections disconnects anyone's. A disconnected AI stops at once, until someone
connects it again.

## The tools are the API

Each tool is an operation of this API, with the same checks, permissions and errors: `get_org` is
[Get the organization](https://developers.readyforcommerce.com/api-reference/core-get-org.md), and `start_export` is
[Start an export](https://developers.readyforcommerce.com/api-reference/core-start-export.md). A few reads of one record share a tool, which a `method` argument
chooses: `get_job` reads a job, its messages or a file link. What only a person does in the app is never a tool.

* **A write takes an optional `idempotency_key`,** sent as the [`Idempotency-Key`](https://developers.readyforcommerce.com/rate-limits#retry-a-write-safely)
  of its call, so an AI that retries never does a write twice.
* **An error comes back as the tool's result,** with its `code` and a sentence that tells the AI what to do, such as
  how long to wait or which permission it lacks.

## Limits

* **Calls:** an AI connection makes 300 calls a minute, reads and writes together, and
  60 bulk calls, inside its organization's budget ([Rate limits](https://developers.readyforcommerce.com/rate-limits.md)).
* **Pages:** a tool that lists answers 25 rows unless the AI asks for more, up to 100, and
  `nextCursor` goes on from there. An answer too long for an AI to read is cut to the rows that fit, with
  `truncated: true`.

## No personal data reaches an AI

A field that holds personal data never reaches a tool, and an export an AI starts leaves out the columns that name
people, such as who created or last changed a record.

## Call it from a program

A program may call the MCP server too, with an [API key](https://developers.readyforcommerce.com/authentication.md) as its Bearer token, by sending MCP's
JSON-RPC messages. This one calls `get_org`:

```bash curl theme={null}
curl https://app.readyforcommerce.com/api/mcp \
  --header "Authorization: Bearer $RFC_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Accept: application/json, text/event-stream" \
  --data '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "get_org", "arguments": {}}}'
```

```python Python theme={null}
import os

import requests

response = requests.post(
    "https://app.readyforcommerce.com/api/mcp",
    headers={
        "Authorization": f"Bearer {os.environ['RFC_API_KEY']}",
        "Accept": "application/json, text/event-stream",
    },
    json={
        "jsonrpc": "2.0",
        "id": 1,
        "method": "tools/call",
        "params": {"name": "get_org", "arguments": {}},
    },
)
print(response.text)
```

```php PHP theme={null}
<?php
$curl = curl_init('https://app.readyforcommerce.com/api/mcp');
curl_setopt_array($curl, [
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('RFC_API_KEY'),
        'Content-Type: application/json',
        'Accept: application/json, text/event-stream',
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'jsonrpc' => '2.0',
        'id' => 1,
        'method' => 'tools/call',
        'params' => ['name' => 'get_org', 'arguments' => new stdClass()],
    ]),
    CURLOPT_RETURNTRANSFER => true,
]);
echo curl_exec($curl);
```

```javascript JavaScript theme={null}
const response = await fetch('https://app.readyforcommerce.com/api/mcp', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.RFC_API_KEY}`,
    'Content-Type': 'application/json',
    Accept: 'application/json, text/event-stream',
  },
  body: JSON.stringify({
    jsonrpc: '2.0',
    id: 1,
    method: 'tools/call',
    params: { name: 'get_org', arguments: {} },
  }),
});
console.log(await response.text());
```

The answer is JSON, or one server-sent event whose `data:` line holds it. `"method": "tools/list"` lists the tools
your key may use. An MCP client library does all of this for you: give it the address and the header
`Authorization: Bearer <your key>`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.