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

# Local Agent quickstart

> Install the Clink Skill, connect MCP, and authorize your wallet in an Agent Host.

This path is for connecting Clink from a local Agent Host, such as Codex. The Host must support remote MCP and OAuth. If you serve multiple users, start with [How to integrate MCP](https://docs.clinkbill.com/guides/agent/platform_integration/mcp_integration.md).

## 1. Install with a prompt

In the Host you want to configure, send the following prompt to the Agent:

```text theme={null}
Read and install https://www.clinkbill.com/SKILL.md in the current Agent Host.
Follow the Skill to complete Clink MCP registration and user OAuth authorization.
Reuse an existing connection for the same environment and preserve other settings.
When finished, confirm that Clink tools are available and report:
the current Host, Skill installation status, MCP URL, OAuth status, and whether a reload is needed.
Complete setup only; do not initiate a payment.
```

The official [Clink Skill](https://www.clinkbill.com/SKILL.md) is a single-file Skill for installation and connection setup. It connects to the **Production** URL `https://api.clinkbill.com/mcp`. For Sandbox integration, use the UAT URL in [How to integrate MCP](https://docs.clinkbill.com/guides/agent/platform_integration/mcp_integration.md#platform-credentials); keep the selected environment consistent throughout setup and testing.

## 2. Complete the connection

**1. Install the Skill and register MCP**

The Agent uses the current Host's installation mechanism and MCP settings. The connection is named `clink` and uses Streamable HTTP. If the Host cannot modify its own settings, you may need to add the connection manually.

**2. Authorize your wallet**

Complete login and consent in the user-facing authorization flow. The Host must confirm that OAuth succeeded; writing the MCP configuration alone does not mean the connection succeeded.

**3. Check that the tools are visible**

The Host should show tools such as `get_skill_manifest`, `get_account_state`, and `get_credential`. If a reload is required, reload once and check the connection again.

For manual setup, use the configuration format the Host supports and enter the following connection values:

| Setting | Value |
| :- | :- |
| Connection name | `clink` |
| Transport | Streamable HTTP |
| Production MCP URL | `https://api.clinkbill.com/mcp` |
| Authentication | User OAuth, managed by the Host |

The connection configuration does not need an API key or a pasted bearer token. The Host obtains the user's tokens through OAuth.

After connecting, purchases still require a valid authorization. When Passkey verification is required, open the link the Agent provides on your own device to confirm. See [Passkeys and purchase authorization](https://docs.clinkbill.com/guides/agent/wallet_service.md#passkeys-and-purchase-authorization).

## 3. Read the current business rules

After connection, the MCP server publishes tool schemas and business rules. Read the `clink://skill/rules` resource. If the Host cannot read MCP resources, call:

```json theme={null}
{
  "name": "get_skill_manifest",
  "arguments": {
    "include_rules": true
  }
}
```

This is a `tools/call` parameter object, not a separate HTTP endpoint. Follow the returned `rules` for business operations; rule updates do not require reinstalling the connection Skill.

## 4. Check your wallet

You can send the Agent:

```text theme={null}
Show the payment cards currently available in my Clink wallet and tell me which one is the default.
```

The Agent uses `get_account_state` to check. If the card list is empty, the MCP connection may still be working; no payment card has been added yet. To add one, ask the Agent to call `start_payment_method_action` with `action: "add"`, then open the returned setup link on your own device to complete the action. See [Wallet Service](https://docs.clinkbill.com/guides/agent/wallet_service.md).

Checking payment cards is useful for first-time setup or card selection; it is not a required preliminary call for every Browser Pay purchase.

## 5. Make a Browser Pay purchase

Choose an item you want to buy on a merchant website. Your Agent needs browser interaction capability. Replace the placeholder product URL below with the actual URL, and adjust the quantity and budget:

```text theme={null}
Use Browser Pay and my Clink card to buy the item at the following link, quantity 1:
https://shop.example.com/products/item
Keep the final total, including shipping and tax, within USD 25.
If it exceeds that amount, ask me before continuing.
If the address or contact details needed for checkout are incomplete, ask me first.
After payment, tell me the merchant name, the actual amount paid and currency,
and the order number shown on the merchant page, if any.
```

**1. Read the final checkout total**

The Agent proceeds to the merchant's card form and reads the final total, including shipping and tax, before requesting a payment credential. The budget is the maximum you approved, not the actual amount charged.

**2. Complete any required user authorization**

When card setup or purchase authorization is needed, the Agent gives you a Clink action link. Open it on your own device, complete the steps the page requests, including Passkey verification when required, then return to the same conversation. The Agent checks Clink's status before continuing; if an existing authorization covers this purchase, this step may not be needed.

**3. Check the purchase result**

The Agent fills the card fields, submits the payment, reads the merchant's result, and reports it to Clink. After confirming that the merchant payment succeeded, it should show you the merchant name, the actual amount paid and currency, and the order number shown on the merchant page, if any.

After a successful purchase, the result summary should look like this, with each value taken from the actual merchant page:

```text theme={null}
Merchant: <merchant name>
Result: Payment confirmed by the merchant
Paid: <actual amount> <currency>
Merchant order number: <order number shown on the page; if not shown, state "Not shown">
```

The merchant order number comes from the merchant; a Clink payment `orderId` cannot be used in its place. If the payment result cannot be confirmed, the Agent should state clearly that the result is unknown and keep verifying the same purchase; it must not pay again. See [Browser Pay](https://docs.clinkbill.com/guides/agent/browser_pay) for payment steps and recovery.

> [accordion] When you receive encrypted credentials
>
> The default local Agent path returns ready-to-use card fields directly. If the current connection returns `key` and `payload`, first follow the [encrypted credential integration guide](https://docs.clinkbill.com/guides/agent/browser_pay/decryption.md), then fill the merchant form.

## FAQ

> [accordion] The Skill is installed. Why can't I see the Clink tools?
>
> Installing the Skill file alone does not connect MCP. Check whether an MCP connection named `clink` is registered in the Host and whether the Host needs a reload; reload once, then check the tool list again.

> [accordion] What if OAuth authorization stays pending or fails?
>
> Finish the current authorization flow first. If authorization fails, use the Host's reconnect action to start authorization again.

> [accordion] What if a tool reports insufficient permissions?
>
> Have the Host request the OAuth scopes configured for the platform. If the Host cannot handle this automatically, contact Clink to confirm the platform's scope configuration, then reconnect.

> [accordion] What if there is no available card or purchase authorization?
>
> Follow the next action returned by the wallet or payment tool, such as opening the card setup or authorization link the Agent provides. Reinstalling the Skill does not set up a card.

> [accordion] How do I update an outdated Skill?
>
> Read the official Skill again and update the installation in the current Host, preserving the selected environment and existing connection.


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