{
  "markdown": "# hogswap-mcp\n\nMCP server exposing [HOGSWAP](https://hogswap-v1.liquihog.dev) to AI\nagents: DEX-aggregated quotes, unsigned swap builds, zero-human API-key\nself-registration, and the star — **`pay_x402_invoice`**: pay any\nAlgorand-settled x402 invoice with any 1–4 assets you hold, via an\nexact-out router swap. API reference:\n[hogswap-v1.liquihog.dev/reference](https://hogswap-v1.liquihog.dev/reference).\nBuilding an app rather than an agent? Official SDKs:\n[`hogswap-js-sdk`](https://github.com/LiquiHog/hogswap-js-sdk) (npm)\nand [`hogswap-py-sdk`](https://github.com/LiquiHog/hogswap-py-sdk) (PyPI).\n\nStrictly non-custodial: every transaction-producing tool returns\n**unsigned** groups; you sign with your own wallet tooling and submit\nyourself. Never give any tool a mnemonic or private key.\n\n## Run (stdio)\n\n```sh\nnpm install\nHOGSWAP_API_KEY=hsk_... node src/index.mjs        # key optional\n```\n\nClaude Code: `claude mcp add hogswap -e HOGSWAP_API_KEY=hsk_... -- node <abs-path>/src/index.mjs`\n\n| Env | Meaning |\n|---|---|\n| `HOGSWAP_API_URL` | API base (default `https://hogswap-v1.liquihog.dev`) |\n| `HOGSWAP_API_KEY` | `hsk_` bearer key; self-issue via the `register_agent` / `verify_registration` tools |\n\n## Tools\n\nFree (no key): `list_payable_assets`, `get_quote`, `register_agent`,\n`verify_registration`. `get_quote` takes optional `max_legs` (1–16)\nto cap total route legs, splits included — for replaying the route\nunder your own resource budget.\n\n🔑 Require a HOGSWAP API key (set `HOGSWAP_API_KEY`, or self-issue one\nwith `register_agent` → sign → `verify_registration`): `build_swap`,\n`pay_x402_invoice`, `get_credit_offer`, `get_balance`, plus the watch\ntools `set_watch` / `list_watches` / `delete_watch` (standing\nserver-side price/target alerts — free of charge, but namespaced by\nkey). Without a key these return an auth error, not a build.\n\nWatch fires are numbers-only hints — re-quote with `get_quote` when\none fires. From MCP, poll `list_watches`; outside MCP the server\npushes events over SSE at `GET /watches/stream`.\n\n`pay_x402_invoice` returns two groups (swap, then payment) — sign all\ntxns in one pass, submit the groups in order; the swap's on-chain\nfloor guarantees the payment is funded. A HOGSWAP credit top-up's 402\noffer is itself an x402 invoice: feed its `accepts[0]` (with the\n`note` nonce) straight into `pay_x402_invoice` to buy credits with\nany asset.\n\n## Remote (no local process)\n\nThe same 12 tools are served over MCP Streamable HTTP at\n`https://hogswap-v1.liquihog.dev/mcp/` — hosted by the HOGSWAP API\nitself, no local process needed. **Use the trailing slash** — the\nbare `/mcp` 307-redirects to `/mcp/`, costing an extra round trip per\ncall. Point any remote-capable MCP client at it; pass your key as\n`Authorization: Bearer hsk_...` (the Claude API connector's\n`authorization_token` does exactly this).\n\n## Smoke tests\n\n```sh\nHOGSWAP_API_KEY=hsk_... \\\nSMOKE_PAY_TO=<any USDC-opted addr> node test/smoke.mjs        # stdio\n\nHOGSWAP_API_KEY=hsk_... \\\nSMOKE_PAY_TO=<any USDC-opted addr> node test/smoke-remote.mjs # remote\n```\n\nBoth default to the live API; set `HOGSWAP_API_URL` (stdio) or\n`MCP_URL` (remote) to point them at another instance. Read-only +\nbuild-only; nothing is signed or broadcast.\n",
  "bytes": 3251,
  "sha": "6d216422ec9f5dbce10ec54fb45767b3d2921eed00db1c02a4caa9cad070aba9",
  "repo_slug": "liquihog/hogswap-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_liquihog_hogswap_mcp_f3d3bedf/readme"
}