---
name: canopy
description: |
  Spend USDC from your org treasury on x402 (Base) and MPP (Tempo) services,
  governed by the policy you set in the Canopy dashboard. Provides
  canopy_pay, canopy_check_url, canopy_discover_services, canopy_approve,
  canopy_deny, canopy_preview, canopy_get_approval_status,
  canopy_wait_for_approval, canopy_ping, canopy_get_budget.
homepage: https://www.trycanopy.ai
docs: https://www.trycanopy.ai/documentation
# Canopy's hosted MCP server. This is informational — most hosts'
# `skills install` flows do not currently parse `mcp:` blocks out of
# skill manifests, so registering the MCP itself is a separate step.
# The simplest path that does it for you on every detected host:
#   npx @canopy-ai/sdk connect
# See https://www.trycanopy.ai/documentation/connect/mcp for the manual
# per-host `mcp set` / config-file equivalents.
mcp:
  url: https://mcp.trycanopy.ai/mcp
  transport: streamable-http
  auth: oauth
mcp-server: https://mcp.trycanopy.ai/mcp
---

# Canopy

Canopy is a financial control plane for AI agents. Connect this skill to
let your agent spend USDC from a policy-gated org treasury.

## When to use

- Paying paywalled APIs on either rail — **x402 on Base** (HTTP 402 challenge,
  one tx per call, ~cents) or **MPP on Tempo** (HTTP 401 `WWW-Authenticate:
  Payment` challenge, sub-cent fees, high frequency). `canopy.fetch(url)`
  auto-detects the rail from the challenge and pays.
- Sending direct USDC transfers to a known address (`canopy_pay`). Today
  this defaults to Base; Tempo direct transfers go through the SDK.
- Discovering paid services the agent is allowed to call
  (`canopy_discover_services`). Returned services are tagged with their
  rail (`x402` and/or `mpp`).
- Quoting a paywalled URL's price + verdict before spending
  (`canopy_check_url`) — works for both x402 and MPP challenges.

## Rails and the treasury

The org has one USDC treasury address that lives on both **Base** (USDC) and
**Tempo** (USDC.e). When a charge needs the other chain and the balance is
empty, Canopy auto-bridges via Across Protocol v3 and retries the call —
relayer-fronted, ~seconds, agents don't need to think about which chain
they're on. Use
`canopy_get_budget` to see the per-rail balance breakdown before a large
batch.

## Setup

1. Run `npx @canopy-ai/sdk connect` on this machine. It walks you through
   browser-based consent, writes credentials to
   `~/.config/canopy/credentials`, and installs the Canopy MCP server in
   every detected agent client.
2. Start a chat. Tools beginning with `canopy_` are available.

## Outcomes

Every spending tool returns one of:

- `status: "allowed"` — payment signed and submitted.
- `status: "pending_approval"` — over the agent's approval threshold;
  call `canopy_approve` only when the user explicitly says yes.
- `status: "denied"` — policy refused (cap, allowlist, or unverified
  recipient). Surface the `reason` to the user.

## Constraints

- Recipients on `pay` must be `0x…` addresses; for paid services use
  `canopy.fetch(serviceUrl)` so the registry resolves the recipient.
- Don't call `canopy_approve` / `canopy_deny` autonomously — only when
  the user explicitly authorizes a pending payment in chat.
