Skip to content
LogoLogo

MCP Server

The JAW CLI includes an MCP (Model Context Protocol) server that lets AI agents interact with JAW smart accounts programmatically.

Setup with Claude Desktop

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "jaw": {
      "command": "npx",
      "args": ["-y", "@jaw.id/cli", "mcp"],
      "env": {
        "JAW_API_KEY": "YOUR_API_KEY",
        "JAW_CHAIN_ID": "8453"
      }
    }
  }
}

The MCP server runs on stdio transport — no ports or URLs to configure.

Available Tools

ToolDescription
jaw_rpcExecute any RPC method (method, params?, chainId?, session?)
jaw_config_showDisplay current configuration (secrets redacted)
jaw_config_setUpdate a configuration value (key, value)
jaw_statusCheck relay session status and configuration in use
jaw_session_statusCheck local session-key (auto mode) status
jaw_disconnectClose relay session and browser tab
jaw_pay_and_fetchFetch a URL, paying an x402 402 challenge in USDC if one appears
jaw_discoverSearch the x402 Bazaar for paid services (read only, never spends)
jaw_x402_balanceThe session payer's USDC balance on a network
jaw_x402_logThe local ledger of every payment attempt

jaw_rpc

The primary tool. Executes any EIP-1193 RPC method through the browser bridge.

{
  "method": "wallet_sendCalls",
  "params": {
    "calls": [{ "to": "0x...", "value": "0x..." }]
  },
  "chainId": 8453
}

Methods that require signing (e.g., wallet_sendCalls, personal_sign) will open the browser for passkey confirmation on first use. The session persists across multiple tool calls.

The chain is resolved in this order: the chainId argument, the JAW_CHAIN_ID environment variable, the configured defaultChain, then Ethereum mainnet (1).

Autonomous signing with session keys

If a session key exists (created with jaw session setup), pass session: true to sign without opening the browser:

{
  "method": "wallet_sendCalls",
  "params": {
    "calls": [{ "to": "0x...", "value": "0x..." }]
  },
  "session": true
}

Set JAW_SESSION=true in the MCP server's env block to make session mode the default (a per-call session: false still routes through the browser). Session mode supports eth_requestAccounts, eth_accounts, wallet_sendCalls and wallet_getCallsStatus. Signing methods are browser only, since a signature made by the session key never passes the spend caps or the ledger. Use jaw_session_status to check whether a session key exists and when it expires.

jaw_config_set

{
  "key": "defaultChain",
  "value": "8453"
}

Valid keys: apiKey, defaultChain, keysUrl, ens, relayUrl, sessionExpiry

The x402 spending limits are not settable here. An agent must not be able to raise its own caps, so those keys are only writable by a human at the terminal. See Paying for APIs.

jaw_pay_and_fetch

Fetches a URL. If it is free, it comes back as is. If it answers 402, the agent pays in USDC and retries.

{
  "url": "https://api.example.com/resource",
  "maxAmount": "50000"
}

Requires a session with an x402 permission (jaw session setup --x402). Every payment is bounded by the configured policy plus the optional maxAmount for the call. An over cap, wrong asset, wrong network or disallowed recipient payment is refused, never silently paid.

Read Paying for APIs for funding and limits, including which of the two accounts to fund.

Available Resources

The MCP server exposes documentation resources that AI agents can read for context.

Resource URIDescription
jaw://api-referenceIndex of all supported RPC methods
jaw://api-reference/{method}Detailed documentation for a specific method
jaw://x402How to pay for HTTP resources with x402: the tools, which account to fund, and the spending limits

Agent Skills

For AI coding assistants that support skills, there's an official skill package that provides deep knowledge of the JAW CLI and SDK.

Repository: github.com/JustaName-id/jaw-skills

Install

npx skills add JustaName-id/jaw-skills --skill jaw-cli

This installs two skills:

SkillDescription
jaw-cliCLI usage patterns and best practices
jaw-sdk-best-practicesSDK development patterns and architectural guidance

Once installed, AI assistants automatically apply JAW-specific guidance when working with CLI commands or SDK integration code.