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

# Code with AI agents

> Install the Chargefy skills in Claude Code, Codex, or Cursor and connect MCP to develop with your account's data.

Teach your agent how to integrate Chargefy, then connect your account when needed. For example:

> Use the Chargefy skill to implement a R\$ 99.90 checkout in this project, in test mode, with payment confirmation through a webhook.

| Resource               | What it does                                                                      | Example                                               |
| ---------------------- | --------------------------------------------------------------------------------- | ----------------------------------------------------- |
| **Skills**             | Guides the agent through the API, payment flows, and integration requirements.    | Write a checkout using the correct fields and events. |
| **MCP**                | Connects the agent to an organization's data with the permissions you authorize.  | Look up customers and inspect a test invoice.         |
| **Claude Code plugin** | Bundles the same four skills, an integration reviewer, and the MCP configuration. | Review an integration before going live.              |

You can use the skills without connecting an account. To look up or create resources in your organization, also configure MCP.

## 1. Install the skills

With [Node.js](https://nodejs.org/) installed, open a terminal in your project directory and run:

```bash theme={"theme":"css-variables"}
npx skills add https://docs.chargefy.io --skill chargefy
```

The command above installs the setup, concepts, and best practices skill. Install other skills as needed using their commands in the table below.

Select your agent in the installer, or choose it directly:

<Tabs>
  <Tab title="Claude Code">
    ```bash theme={"theme":"css-variables"}
    npx skills add https://docs.chargefy.io --skill chargefy --agent claude-code
    ```
  </Tab>

  <Tab title="Codex">
    ```bash theme={"theme":"css-variables"}
    npx skills add https://docs.chargefy.io --skill chargefy --agent codex
    ```

    The skills are available when Codex works in this project, through the app,
    terminal, or editor extension.
  </Tab>

  <Tab title="Cursor">
    ```bash theme={"theme":"css-variables"}
    npx skills add https://docs.chargefy.io --skill chargefy --agent cursor
    ```
  </Tab>
</Tabs>

By default, installation applies to this project. Add `--global` to install for your user across projects. Open a conversation in the project after installation; restart the agent if the skill does not appear.

**Using another IDE or agent?** The skills follow the open Agent Skills standard. Run the same command and select your tool from the installer's options. Compatibility requires the IDE's agent to support skills; installing a skill does not add that capability to an editor. See the [agents supported by the installer](https://skills.sh/docs/cli).

To verify, ask:

> Read the chargefy skill and explain which flow to use to sell a course through a payment link.

Each command installs the selected skill. The agent uses the relevant instructions for each task; MCP is optional.

## Included skills

| Skill                | What it covers                                     | Install command                                                      |
| -------------------- | -------------------------------------------------- | -------------------------------------------------------------------- |
| `chargefy`           | Setup, concepts, modeling, and best practices.     | `npx skills add https://docs.chargefy.io --skill chargefy`           |
| `chargefy-payments`  | Checkout, webhooks, and sandbox testing.           | `npx skills add https://docs.chargefy.io --skill chargefy-payments`  |
| `chargefy-billing`   | Invoices, trials, proration, usage, and recovery.  | `npx skills add https://docs.chargefy.io --skill chargefy-billing`   |
| `chargefy-platforms` | Connected organizations, activation, and branding. | `npx skills add https://docs.chargefy.io --skill chargefy-platforms` |

The commands above let you choose an agent in the installer. Add `--agent claude-code`, `--agent codex`, or `--agent cursor` to target your tool directly.

For example: “Use chargefy to model a R\$ 99/month Pro plan, then chargefy-billing to implement a 14-day trial.” To review existing code: “Use chargefy to check this integration for duplicate charges.”

<Tip>
  **Using Claude Code?** The [Chargefy plugin](/en/mcp/plugin) is an alternative
  with the same four skills, an integration reviewer, and MCP configured.
  If you choose the plugin, follow its guide: you do not need to install the
  skills separately or add the same MCP server again. Account authorization is
  still required.
</Tip>

## 2. Connect MCP

In the dashboard, open **Developers → MCP and Skills** and check that test access is enabled. Then configure your agent:

<Tabs>
  <Tab title="Claude Code">
    ```bash theme={"theme":"css-variables"}
    claude mcp add --transport http chargefy https://mcp.chargefy.io
    ```

    In Claude Code, type `/mcp`, select **chargefy**, and choose **Authenticate**
    to sign in with your Chargefy account.
  </Tab>

  <Tab title="Codex">
    With the Codex CLI installed, run:

    ```bash theme={"theme":"css-variables"}
    codex mcp add chargefy --url https://mcp.chargefy.io
    codex mcp login chargefy
    ```

    Complete sign-in in your browser. Run `codex mcp list` to check the
    configuration. The app and extension use this configuration on the same
    computer too.
  </Tab>

  <Tab title="Cursor">
    Add the server to `.cursor/mcp.json` in your project directory. If the file
    already exists, add `chargefy` inside `mcpServers`, preserving other servers:

    ```json theme={"theme":"css-variables"}
    {
      "mcpServers": {
        "chargefy": {
          "url": "https://mcp.chargefy.io"
        }
      }
    }
    ```

    Open Cursor's MCP settings, find **chargefy**, and complete browser
    authentication when prompted.
  </Tab>
</Tabs>

On the Chargefy authorization screen, choose your organization and authorize **test** with **read-only** access to start. To create test customers, products, or links, choose **read and write** for that environment. You can revoke access from the dashboard at any time.

You do not need to paste a secret key into the agent: these connections use your account sign-in. For other clients and API-key automations, see the [full MCP guide](/en/mcp/installation).

## 3. Check the connection

Ask:

> Use the Chargefy connection for reading only. Show the organization, environments, and access level. Then list up to 5 test customers. Do not change anything.

The agent should report the authorized organization and test customers. An empty list also confirms the query when no customers exist.

With test write access authorized, you can ask:

> Create a R\$ 99.90 payment link for the Introduction to Photography course, in the test environment.

MCP supports queries and creating or editing customers, catalog items, discounts, and links. Captures, refunds, and subscription cancellation are outside its scope. The skill can guide API code for those integrations; see the [available tools](/en/mcp/tools).

## Keep the skills updated

Run the installation command again to get the current content. Keep `--global` if you used it initially. For the Claude Code plugin, follow its [update instructions](/en/mcp/plugin).

If the skill cannot be found, check that your agent opened the directory where you installed it. If MCP connects but denies a query, check the organization, environment, and permissions in [Access and permissions](/en/mcp/authentication).
