@dexterai/clawdexter
v3.0.2
Published
x402 payments + marketplace for OpenClaw agents. Search the OpenDexter marketplace, price-check endpoints, and auto-pay with USDC across Solana, Base, and 4 more chains.
Maintainers
Readme
What is Clawdexter?
Clawdexter is an OpenClaw plugin, not a hosted Claude MCP server.
It brings the OpenDexter x402 workflow into OpenClaw with five tools:
x402_searchx402_checkx402_fetchx402_payx402_wallet
Use it when you want OpenClaw agents to discover and pay for x402 resources with locally configured wallet keys.
What is x402?
x402 is an open protocol for HTTP-native micropayments. When a server returns 402 Payment Required, the client signs a USDC payment and retries — the server verifies and serves the response. No API keys, no subscriptions, no invoices.
ClawDexter brings x402 to every OpenClaw agent. It ships five tools that let agents discover paid APIs, check prices, pay automatically, and track spending — all with a single OpenClaw wallet configuration.
Install
ClawDexter is an OpenClaw plugin. Install it from the OpenClaw plugin registry or add it directly:
openclaw plugins install @dexterai/clawdexterThen configure your wallet in ~/.openclaw/openclaw.json:
{
"plugins": {
"clawdexter": {
"svmPrivateKey": "base58_solana_private_key",
"evmPrivateKey": "0x_hex_evm_private_key",
"maxPaymentUSDC": "0.50"
}
}
}You can configure one wallet or both. Solana keys are base58-encoded, EVM keys are hex with 0x prefix.
Tools
x402_search
Search the OpenDexter marketplace for x402-enabled paid APIs. Returns quality-ranked results with pricing, verification status, seller reputation, and settlement volume.
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| query | string | No | Search term (e.g. "token analysis", "image generation") |
| network | string | No | Filter by network: solana, base, polygon, arbitrum, optimism, avalanche |
| verified | boolean | No | Only show quality-verified endpoints |
| category | string | No | Filter by category (e.g. "api", "creative") |
| maxPriceUsdc | number | No | Maximum price per call in USDC |
| sort | string | No | Sort: marketplace (default), relevance, quality_score, settlements, volume, recent |
| limit | number | No | Max results (default 20, max 50) |
"Search for Solana analytics APIs under $0.10"x402_fetch
Call any x402-protected endpoint with automatic payment. This is the recommended tool for making paid API calls — the agent gets the response directly along with a payment receipt.
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| url | string | Yes | The x402 resource URL |
| method | string | No | HTTP method (default GET) |
| body | string | No | JSON body for POST/PUT requests |
"Use x402_fetch to call https://x402.dexter.cash/api/tools/solscan/trending"How it works:
- Sends the request to the URL
- Receives
402 Payment Requiredwith payment terms - Signs a USDC payment matching the requested amount and chain
- Retries with the payment proof header
- Returns the API response and spend receipt
x402_pay
Explicit payment-oriented version of the same x402 flow.
Use x402_pay when you want the calling pattern to be framed as:
- search
- check
- pay and call
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| url | string | Yes | The x402 endpoint URL |
| method | string | No | HTTP method (default GET) |
| params | object | No | Query params (GET) or JSON body (POST) |
| headers | object | No | Custom HTTP headers |
Use x402_fetch for most calls. Use x402_pay when you need custom headers, query parameters on GET requests, or non-JSON payloads.
x402_check
Probe an endpoint for payment requirements without paying. Returns pricing per chain, accepted networks, pay-to addresses, and the x402 protocol version.
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| url | string | Yes | The URL to check |
| method | string | No | HTTP method to probe (default GET) |
"Use x402_check to see what https://x402.dexter.cash/api/jupiter/quote costs"Returns requiresPayment: false for free endpoints, or a list of paymentOptions with per-chain pricing.
x402_wallet
Show which local wallets are configured, the default network, and the per-call spending limit.
No parameters. Returns configured wallet types, active network, and maxPaymentUsdc.
Configuration
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| svmPrivateKey | string | — | Solana private key (base58) for Solana payments |
| evmPrivateKey | string | — | EVM private key (hex, 0x-prefixed) for Base/Polygon/Arbitrum/Optimism/Avalanche |
| defaultNetwork | string | "solana" | Preferred payment network |
| maxPaymentUSDC | string | "0.50" | Maximum USDC per request (e.g. "1.00" = $1) |
| marketplaceUrl | string | Dexter API | Override marketplace search endpoint |
| directoryUrl | string | Dexter API | Override x402 directory endpoint |
| disableTelemetry | boolean | false | Disable anonymous usage telemetry |
Supported Networks
| Network | Chain ID (CAIP-2) | Asset |
|---------|-------------------|-------|
| Solana | solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp | USDC (SPL) |
| Base | eip155:8453 | USDC (ERC-20) |
| Polygon | eip155:137 | USDC (ERC-20) |
| Arbitrum | eip155:42161 | USDC (ERC-20) |
| Optimism | eip155:10 | USDC (ERC-20) |
| Avalanche | eip155:43114 | USDC (ERC-20) |
Solana requires svmPrivateKey. All EVM chains share evmPrivateKey.
Architecture
┌───────────────┐ ┌──────────────────────┐
│ OpenClaw │ │ x402-enabled APIs │
│ Agent │────────►│ (OpenDexter market) │
│ │ fetch │ │
└───────┬───────┘ └──────────┬───────────┘
│ │
│ 402 Payment Required │ 200 OK + data
│◄───────────────────────────│
│ │
│ USDC payment signature │
│───────────────────────────►│
│ │
▼ ▼
┌───────────────┐ ┌──────────────────────┐
│ @dexterai/ │ │ Dexter Marketplace │
│ x402 SDK │ │ dexter.cash │
│ (payment │ │ (search, rankings, │
│ signing) │ │ verification) │
└───────────────┘ └──────────────────────┘The plugin uses @dexterai/x402 to sign USDC payments client-side. No funds are custodied — the wallet keys stay local and payments are signed on-device.
Troubleshooting
"No wallet configured"
Set at least one key in plugin config:
{
"plugins": {
"clawdexter": {
"svmPrivateKey": "your_solana_key"
}
}
}Payment rejected (amount_exceeds_max)
The endpoint costs more than your maxPaymentUSDC limit. Increase it:
{
"maxPaymentUSDC": "1.00"
}Insufficient balance
Fund your wallet with USDC on the appropriate network. Solana wallets need SPL USDC, EVM wallets need ERC-20 USDC on the target chain.
Tools not appearing
Verify the plugin is enabled:
openclaw plugins listDependencies
| Package | Purpose |
|---------|---------|
| @dexterai/x402 | x402 payment signing (client SDK) |
| @sinclair/typebox | Runtime type validation for tool schemas |
Links
- OpenDexter Marketplace — Browse and discover paid APIs
- x402 Protocol — Protocol specification
- Dexter — Dexter AI platform
- OpenClaw — AI agent framework
- @dexterai/x402 SDK — Seller SDK for publishing x402 endpoints
- @dexterai/opendexter — Standalone MCP server with session wallets
- Discord — Community support
License
MIT
