> ## 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.

# Claude Code plugin

> Install the Chargefy plugin for Claude Code and Cowork: integration skills, secret-key protection and the MCP server configured in one step.

The [MCP server](/en/mcp/installation) gives the assistant access to your data. The
**plugin** gives it the rest: integration instructions it loads on its own when
the subject comes up, a guard against committing a secret key, and the MCP
server already configured — no manual `claude mcp add`.

```bash theme={"theme":"css-variables"}
claude plugin marketplace add chargefy-io/claude-plugin
```

```bash theme={"theme":"css-variables"}
claude plugin install chargefy@chargefy
```

<Info>
  The plugin works in **Claude Code** and **Cowork**. In other clients (Claude,
  ChatGPT, Codex), use the [MCP server](/en/mcp/installation) directly — it is
  the same server.
</Info>

## What is inside

| Skill               | Comes in when the subject is                                                     |
| ------------------- | -------------------------------------------------------------------------------- |
| `setup`             | Test key, environment variables and the first call that returns `200`            |
| `escolher-checkout` | Choosing between payment link, hosted checkout, white-label or Payment Intents   |
| `webhooks`          | Building or reviewing an endpoint: signature, deduplication, retries             |
| `convencoes-da-api` | Errors, retry, idempotency, pagination, amounts in cents and dates with timezone |
| `testar-pagamentos` | Simulating approval, decline, pending capture or processing in the sandbox       |

Skills load on their own when the conversation calls for them — you do not need
to name them, though `/chargefy:setup` and the others also work as commands.

<Tip>
  The test-card table in the `testar-pagamentos` skill is generated from the
  same code that decides the outcome in the sandbox. A new card shows up in the
  plugin without anyone transcribing anything.
</Tip>

## Integration reviewer

The plugin ships a subagent, `integration-reviewer`, that reviews integration
code looking for what usually passes human review and fails in production:

* a webhook processed without verifying the signature, or with the body already
  reserialized by a parser;
* a charge created without an `Idempotency-Key`, or with a fresh key on every
  retry;
* a secret key in code that reaches the browser;
* the buyer's redirect treated as payment confirmation;
* a retry on `502 payment_result_unconfirmed`, which charges twice.

Ask it to "review this Chargefy integration" before you ship, or invoke it
directly with `@chargefy:integration-reviewer`. It only reads and reports — it
never writes or edits a file.

## Secret-key protection

The plugin installs an automatic warning: when a production secret key
(`ch_live_...`) is written to a file tracked by Git, the assistant is told
immediately and fixes it.

A file ignored by Git — your local `.env` — does **not** trigger the warning,
because that is exactly where the key belongs. The key is never printed in full.

<Warning>
  If a secret key ever made it into a commit, revoke it under **Developers → API
  keys** before anything else. Rewriting history does not undo the exposure.
</Warning>

## Connecting to MCP

The plugin ships with `https://mcp.chargefy.io` already configured. After
installing, open `/mcp`, select **chargefy** and choose **Authenticate** to
authorize an organization and set test and/or live.

If you had already added the server manually, Claude Code recognizes it is the
same address and does not duplicate the tools.

The skills work without authorizing MCP; what depends on it is reading data from
your account.

## Keeping it current

<Steps>
  <Step title="Update the marketplace">
    `claude plugin marketplace update chargefy` fetches the latest published
    version.
  </Step>

  <Step title="Update the plugin">
    `claude plugin update chargefy` applies the new version.
  </Step>

  <Step title="Remove it whenever you want">
    `claude plugin uninstall chargefy` uninstalls it. The authorized MCP
    connector stays valid until you revoke it under **Developers →
    Connections**.
  </Step>
</Steps>

## Open source

The plugin is MIT and lives at
[chargefy-io/claude-plugin](https://github.com/chargefy-io/claude-plugin). Its
content is generated from the code running in production, so fixes go in at the
source: open an issue in the repository or talk to support.

## Keep going

<CardGroup cols={2}>
  <Card title="Chargefy MCP" icon="plug" href="/en/mcp/installation">
    Connect other assistants to the same server.
  </Card>

  <Card title="Access and permissions" icon="key" href="/en/mcp/authentication">
    Organization, environments, read, write and revocation.
  </Card>

  <Card title="Tools and operations" icon="screwdriver-wrench" href="/en/mcp/tools">
    What the assistant can execute on each connection.
  </Card>

  <Card title="Sandbox" icon="flask" href="/api-reference/sandbox">
    Deterministic test cards and scenarios.
  </Card>
</CardGroup>
