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

# Model Context Protocol (MCP)

> Connect AI assistants to Alguna's API through our MCP server

<Warning>
  **EXPERIMENTAL BETA FEATURE**

  The Alguna MCP server is currently in experimental beta. You may encounter bugs, unexpected behavior, or breaking changes. Use with caution in production environments.

  We highly encourage feedback and bug reports, and will try to address these as quickly as possible.
</Warning>

<Snippet file="mcp-introduction.mdx" />

## Prerequisites

Before using the MCP server, ensure you have:

* An Alguna account with API access enabled
* An API key generated from your dashboard
* A supported AI assistant (Claude Desktop, Claude Code, Cursor, or other MCP-compatible clients)

<Danger>
  **IMPORTANT: Actions Cannot Be Undone**

  The MCP server has full access to your Alguna account through your API key. Any actions taken by the AI assistant (creating customers, subscriptions, invoices, etc.) are permanent and cannot be automatically undone.

  **You are responsible for:**

  * Reviewing and approving all actions before the AI executes them
  * Verifying the accuracy of data being created or modified
  * Understanding the implications of each operation

  We strongly recommend ensuring your tool is using human-in-the-loop flows for every tool being called.
</Danger>

## Installation & Configuration

<Note>
  The configuration below uses `mcp-remote` as a temporary solution while more
  clients add native support for remote MCP servers. This approach is subject to
  change.
</Note>

### Claude Desktop Configuration

<Note>
  This configuration requires Node.js 20 or higher to be installed.
</Note>

Add the following to your Claude Desktop configuration file:

```json theme={null}
{
  "mcpServers": {
    "alguna": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://api.alguna.io/mcp",
        "--header",
        "Authorization:${AUTH_HEADER}"
      ],
      "env": {
        "AUTH_HEADER": "Bearer your-api-key-here"
      }
    }
  }
}
```

Replace `your-api-key-here` with your actual API key from the Alguna dashboard.

### Authentication

The MCP server requires authentication using your Alguna API key. You can find your API key in the Alguna dashboard under **Settings > API Keys**.

<Note>
  OAuth authentication support is coming soon as an alternative to API keys.
</Note>

<Warning>
  Keep your API key secure and never commit it to version control. Use
  environment variables or secure configuration management.
</Warning>

<Snippet file="mcp-available-tools.mdx" />

<Snippet file="mcp-how-to-use.mdx" />

## Support

For support with the MCP server:

* Contact us through Slack (for existing customers)
* Email support at [support@alguna.io](mailto:support@alguna.io)
