---
updatedAt: 2026-06-15T23:45:33.000Z
---

Fetch the complete documentation index at: https://developer.benjipays.com/llms.txt. Use this file to discover all available pages before exploring further. Append .md to any documentation page URL to get its markdown version.

# MCP Server

Connect AI clients directly to the Benji Pays API using the Model Context Protocol (MCP).

The Benji Pays MCP server lets compatible AI clients connect directly to the Benji Pays API — all from within your favorite AI-powered editor or assistant.

***

## What the Benji Pays MCP server can do

The Benji Pays MCP server exposes the following capabilities to supported AI clients.

**OpenAPI Tools**

| Tool               | Description                                                                       |
| ------------------ | --------------------------------------------------------------------------------- |
| `list-endpoints`   | List available API paths, methods, and summaries                                  |
| `get-endpoint`     | Inspect a specific endpoint — parameters, descriptions, and security requirements |
| `search-endpoints` | Search API paths, operations, and schemas                                         |
| `execute-request`  | Make a live API call                                                              |

***

## Authentication

> 📘 Required for live API calls

For live API execution via `execute-request`, configure your MCP client to forward the authentication header:

```
x-api-key: YOUR_BENJI_PAYS_API_KEY
```

When configured, this header is automatically forwarded to live API calls. Your `x-api-key` is issued from the merchant app. See [Authentication](./authentication.md) for details.

***

## Benji Pays MCP Server URL

> 📘 MCP Server Endpoint
>
> `https://benjipays.readme.io/mcp`

Use this URL when configuring any of the clients below.

***

## Client setup

Choose your AI client below and follow the setup instructions.

<Tabs>
<Tab title="Cursor">

**Add to `~/.cursor/mcp.json`:**

```json
{
  "mcpServers": {
    "benjipays": {
      "url": "https://benjipays.readme.io/mcp",
      "headers": {
        "x-api-key": "YOUR_BENJI_PAYS_API_KEY"
      }
    }
  }
}
```

</Tab>
<Tab title="Windsurf">

**Add to `~/.codeium/windsurf/mcp_config.json`:**

```json
{
  "mcpServers": {
    "benjipays": {
      "serverUrl": "https://benjipays.readme.io/mcp",
      "headers": {
        "x-api-key": "${env:BENJI_PAYS_API_KEY}"
      }
    }
  }
}
```

</Tab>
<Tab title="GitHub Copilot (VS Code)">

**Create `.vscode/mcp.json` in your workspace:**

```json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "benjipays-api-key",
      "description": "Benji Pays API key",
      "password": true
    }
  ],
  "servers": {
    "benjipays": {
      "type": "http",
      "url": "https://benjipays.readme.io/mcp",
      "headers": {
        "x-api-key": "${input:benjipays-api-key}"
      }
    }
  }
}
```

</Tab>
<Tab title="Claude">

Claude Desktop uses the Developers UI for remote MCP servers.

1. Open **Settings → Developer**
2. Click **Edit Config**
3. Open `claude_desktop_config.json`
4. Enable the connector in the conversation where you want to use it

Local Claude Desktop config for remote MCP server (macOS / Linux):

```json
{
  "mcpServers": {
    "benjipays": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://benjipays.readme.io/mcp",
        "--header",
        "x-api-key: ${API_KEY}"
      ],
      "env": {
        "API_KEY": "YOUR_BENJI_PAYS_API_KEY"
      }
    }
  }
}
```

On Windows, `npx` resolves to `npx.cmd`, which Claude Desktop's process launcher can't execute directly — leaving the command as `"npx"` fails with `spawn npx ENOENT`. Wrap it with `cmd /c`:

```json
{
  "mcpServers": {
    "benjipays": {
      "command": "cmd",
      "args": [
        "/c",
        "npx",
        "mcp-remote",
        "https://benjipays.readme.io/mcp",
        "--header",
        "x-api-key: ${API_KEY}"
      ],
      "env": {
        "API_KEY": "YOUR_BENJI_PAYS_API_KEY"
      }
    }
  }
}
```

</Tab>
<Tab title="Claude Code">

macOS / Linux — run the following command:

```bash
claude mcp add --transport http benjipays https://benjipays.readme.io/mcp \
  --header "x-api-key: YOUR_BENJI_PAYS_API_KEY"
```

On Windows, the trailing `\` line continuation isn't valid in PowerShell or Command Prompt. Run it as a single line instead (this also works in any shell):

```text
claude mcp add --transport http benjipays https://benjipays.readme.io/mcp --header "x-api-key: YOUR_BENJI_PAYS_API_KEY"
```

Verify your `.claude.json` contains:

```json
{
  "mcpServers": {
    "benjipays": {
      "url": "https://benjipays.readme.io/mcp",
      "headers": {
        "x-api-key": "YOUR_BENJI_PAYS_API_KEY"
      }
    }
  }
}
```

</Tab>
<Tab title="Copilot Studio">

Add the Benji Pays MCP server as a tool in Microsoft Copilot Studio.

1. Open Microsoft Copilot Studio
2. In the left navigation, select **Agents**, then choose the agent you want to configure
3. Navigate to the **Tools** page for your agent (from the top nav or by scrolling down)
4. Select **Add a tool → New tool → Model Context Protocol**
5. Fill in the required fields:

- **Server name:** `Benji Pays`
- **Server description:** `Benji Pays API and documentation`
- **Server URL:**

```text
https://benjipays.readme.io/mcp
```

6. For authentication, select **API key**, then configure:

- **Type:** `Header`
- **Header name:** `x-api-key`

7. Select **Create**, then **Add tool**
8. When prompted, enter your Benji Pays API key value
9. The available tools (e.g. `list-endpoints`, `search-endpoints`, `execute-request`) are discovered automatically from the MCP server
10. Test the connection in the **Test your copilot** panel by asking something like "List all available Benji Pays API endpoints"

> For full details, see Microsoft's documentation:
>
> - Connect your agent to an existing MCP server
> - Extend your agent with MCP
> - Add tools to a custom agent

</Tab>
<Tab title="Roo Code">

Configure via the Roo Code sidebar:

1. Open the Roo Code panel in the VS Code sidebar
2. Click the **MCP Servers** icon (server plug icon at the top of the panel)
3. Click **Edit MCP Settings** to open `mcp_settings.json`
4. Add the following configuration:

macOS / Linux:

```json
{
  "mcpServers": {
    "benjipays": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://benjipays.readme.io/mcp",
        "--header",
        "x-api-key: YOUR_BENJI_PAYS_API_KEY"
      ]
    }
  }
}
```

On Windows, `npx` resolves to `npx.cmd`, which can't be spawned directly — leaving the command as `"npx"` fails with `spawn npx ENOENT`. Wrap it with `cmd /c`:

```json
{
  "mcpServers": {
    "benjipays": {
      "command": "cmd",
      "args": [
        "/c",
        "npx",
        "-y",
        "mcp-remote",
        "https://benjipays.readme.io/mcp",
        "--header",
        "x-api-key: YOUR_BENJI_PAYS_API_KEY"
      ]
    }
  }
}
```

</Tab>
<Tab title="Codex">

**Add to `~/.codex/config.toml`:**

```toml
[mcp_servers.benjipays]
enabled = true
url = "https://benjipays.readme.io/mcp"

[mcp_servers.benjipays.env_http_headers]
x-api-key = "YOUR_BENJI_PAYS_API_KEY"
```

</Tab>
</Tabs>

***

## Testing your MCP setup

Once configured, try any of these prompts in your AI client to verify the connection:

> "List all available Benji Pays API endpoints"
>
> Discovers API paths — `list-endpoints`

> "Show me the details for the List Customers endpoint"
>
> Inspects an endpoint — `get-endpoint`

> "Search the Benji Pays API for anything related to invoices"
>
> Searches specs — `search-endpoints`

> "Get me a list of all my customers"
>
> Makes a live API call — `execute-request`

***

## Notes

* For authenticated API execution, make sure your client is forwarding the required `x-api-key` header.
* The MCP server reflects your API key's scopes — if a call returns `403 Forbidden`, check that your key has the required scope (e.g. `organizations:customers:read`). See [Authentication](./authentication.md).
* See [Rate Limits](./rate-limits.md) for request limits that apply to MCP-executed calls just as they do to direct API calls.