Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.rndrntwrk.com/llms.txt

Use this file to discover all available pages before exploring further.

Status: Pre-publish. Source available at github.com/Render-Network-OS/sw4p-kit. Public npm publish ships with the mainnet return.

@sw4p/kit

@sw4p/kit is the agent-native surface for sw4p. It lets any MCP-aware agent, Claude Code, Cursor, Continue, Goose, Codex, Cline, ElizaOS, Hermes, Open Claw, settle cross-chain through the sw4p settlement engine over every open agent payment standard. The kit is a thin client. Chain interaction, custody, rail selection, gas abstraction, and the settlement lifecycle live in the sw4p backend. The kit gives agents a small, opinionated tool surface and the wrappers for the open agent-payment standards.

Why a separate kit

The sw4p backend already speaks HTTP via @sw4p/sdk. The kit exists for one reason: agents don’t read HTTP APIs, they read MCP tool surfaces. Wrapping the SDK in MCP lets any agent settle cross-chain with a two-tool surface (sw4p.balance and sw4p.send) rather than hand-rolling 30+ method calls. Beyond MCP, the kit adapts every other open agent-payment standard to the same backend:
  • MCP 2025-11-25: tools + async Tasks primitive for long-running settlement
  • AP2 Cart Mandates: HMAC-signed cart authorization with canonical JSON
  • x402 V2: framework-agnostic 402 middleware + client (Web Request/Response, works in any runtime)
  • A2A (Agent-to-Agent): Zod-validated payment messages + handler factory
  • ERC-7683 intent builder: produces the on-chain intent struct for solver-based execution

Surface area

ModuleWhat it doesTalks to
mcpMCP server (stdio + Streamable HTTP), tool registry, async Taskssw4p HTTP API
coreSettlementClient, KitError taxonomy, in-process TaskStore, gasless abstractionsw4p HTTP API
ap2Cart Mandates, HMAC signer, canonical JSON, budget guardPure crypto + data
x402Middleware + client + discoveryPure HTTP semantics
a2aPayRequest / PaySettled / PayFailed schemas + handler factorysw4p HTTP API
intentsERC-7683 intent struct builderPure data builder

Tool surface (MCP)

The kit exposes a deliberately small set of MCP tools so agents see a clean surface:
  • sw4p.balance, USDC balance across configured chains
  • sw4p.send, submit a settlement (cross-chain or same-chain). One call: submit → settle.
  • sw4p.estimate, pre-flight fee + route quote
  • sw4p.status, poll a settlement by intent ID
  • sw4p.portfolio, cross-chain portfolio aggregation
  • sw4p.rebalance_plan / sw4p.rebalance_execute, agent-driven rebalance
  • sw4p.task, MCP 2025-11-25 async task primitive
  • sw4p.ap2.cart_propose / sw4p.ap2.cart_execute, AP2 Cart Mandate flow (when an AP2 signing key is configured)

Quickstart (source install, pre-publish)

git clone https://github.com/Render-Network-OS/sw4p-kit
cd sw4p-kit && npm install && npm run build
Add to any MCP-aware client (Claude Code, Cursor, Continue, Zed, ElizaOS, Hermes, Open Claw):
{
  "mcpServers": {
    "sw4p": {
      "command": "node",
      "args": ["<abs-path>/sw4p-kit/dist/mcp/bin.js"],
      "env": { "SW4P_API_KEY": "..." }
    }
  }
}
Once @sw4p/kit publishes to npm, this collapses to:
npm install @sw4p/kit
# then args: ["sw4p-mcp"] via npx

Standards covered

StandardWhere in the kit
MCP 2025-11-25 (tools + Tasks)src/mcp/*
AP2 Cart Mandates (Google)src/ap2/*
x402 V2 (Coinbase)src/x402/*
A2A (Agent-to-Agent)src/a2a/*
ERC-7683 intentssrc/intents/*

Distribution roadmap

  • Now: source install from GitHub.
  • Next: npx @sw4p/kit init for one-command setup across every major MCP-aware agent. Auto-detects Claude Code / Cursor / Continue / Goose / Codex / Cline / Aider / ElizaOS / Hermes / Open Claw configs and writes the right config file.
  • Next: hosted MCP gateway at mcp.sw4p.io for remote agents (claude.ai web, Cursor cloud, etc.), no local install required.
  • Then: public npm publish, MCP Registry submission, Smithery listing.
  • Then: @sw4p/eliza-plugin for first-class ElizaOS integration.

Reference