diff --git a/src/pages.gen.ts b/src/pages.gen.ts index 0bc6c87d..08eaa170 100644 --- a/src/pages.gen.ts +++ b/src/pages.gen.ts @@ -45,6 +45,7 @@ type Page = | { path: '/overview'; render: 'static' } | { path: '/partner-integrations/cloudflare-agents'; render: 'static' } | { path: '/partner-integrations/mcp-sdk'; render: 'static' } + | { path: '/partner-integrations/openclaw'; render: 'static' } | { path: '/partner-integrations/vercel-ai-sdk'; render: 'static' } | { path: '/payment-methods/card/charge'; render: 'static' } | { path: '/payment-methods/card'; render: 'static' } diff --git a/src/pages/partner-integrations/openclaw.mdx b/src/pages/partner-integrations/openclaw.mdx new file mode 100644 index 00000000..075a3cf4 --- /dev/null +++ b/src/pages/partner-integrations/openclaw.mdx @@ -0,0 +1,46 @@ +--- +description: "Use MPP with OpenClaw." +--- + +# OpenClaw + +Use the official MPP plugin to make OpenClaw HTTP requests payment-aware. Free calls pass through untouched; when a 402-protected request returns an MPP or [x402](/guides/use-mpp-with-x402) Challenge, `mppx` creates a Credential, retries the call, and returns the result. + +```bash [terminal] +$ openclaw plugins install clawhub:@tempoxyz/openclaw-mpp +$ openclaw plugins enable mpp +``` + +## Set up payments + +Set `TEMPO_PRIVATE_KEY` in the OpenClaw gateway environment, then restart the gateway. + +```bash [terminal] +$ TEMPO_PRIVATE_KEY=0x... openclaw gateway run +``` + +By default, the plugin can pay any origin. Add `allowedOrigins` when an OpenClaw runtime should only pay specific origins. + +```json5 [openclaw.json] +{ + plugins: { + entries: { + mpp: { + config: { + allowedOrigins: ["https://mpp.dev"], + }, + }, + }, + }, +} +``` + +## Pay for HTTP requests + +After the plugin loads, OpenClaw code in the gateway process that uses `fetch` can call free and paid HTTP endpoints through the same path. The plugin also exposes an `mpp_fetch` tool for requests that should explicitly use the payment-aware fetch. + +## Manage agent spend + +The example above uses a raw payment key. For long-running apps or agents, use scoped access keys when the runtime should pay in the background with spending limits, call scopes, recipient restrictions, and independent revocation. + +See [Managing agent spend](/guides/managing-agent-spend) for limits, scopes, recipients, and revocation. diff --git a/vocs.config.ts b/vocs.config.ts index 45542d1b..ad5888a3 100644 --- a/vocs.config.ts +++ b/vocs.config.ts @@ -299,6 +299,10 @@ export default defineConfig({ text: "Official MCP SDK", link: "/partner-integrations/mcp-sdk", }, + { + text: "OpenClaw", + link: "/partner-integrations/openclaw", + }, { text: "Vercel AI SDK", link: "/partner-integrations/vercel-ai-sdk",