hogswap-mcp
This server provides non-custodial tools for interacting with the HOGSWAP DEX aggregator on Algorand. It allows you to:
List payable assets (
list_payable_assets): see which assets are accepted as swap/payment inputs.Get DEX swap quotes (
get_quote): fetch aggregated quotes across all Algorand DEXs with exact in/out modes, optional sender fee discounts, and route leg capping.Build unsigned swap transactions (
build_swap): create unsigned transaction groups from a quote ID, ready for your wallet.Pay x402 invoices (
pay_x402_invoice): settle any Algorand-settled x402 invoice using up to four of your held assets via automatic router swaps – even if you don't hold the demanded asset. Returns unsigned groups to sign and submit.Self-register for an API key (
register_agent+verify_registration): obtain a HOGSWAP API key through an on-chain challenge/sign/verify process with zero human interaction.Manage credits: generate a credit top-up x402 offer (
get_credit_offer) and check your current balance (get_balance).Monitor assets: set, list, and delete server-side price/target watches (
set_watch,list_watches,delete_watch) for alerts.
All transaction-producing tools return unsigned groups – signing always happens in your own wallet, ensuring full non-custodial control. Free tools include list_payable_assets, get_quote, register_agent, and verify_registration; others require an API key. The server is also remotely accessible via MCP Streamable HTTP.
Allows interaction with the Algorand blockchain via HOGSWAP, providing tools for getting DEX-aggregated quotes, building unsigned swap transactions, and paying x402 invoices with any held assets.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@hogswap-mcp Get me a quote to swap 100 USDC to ALGO"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
hogswap-mcp
MCP server exposing HOGSWAP to AI
agents: DEX-aggregated quotes, unsigned swap builds, zero-human API-key
self-registration, and the star — pay_x402_invoice: pay any
Algorand-settled x402 invoice with any 1–4 assets you hold, via an
exact-out router swap. API reference:
hogswap-v1.liquihog.dev/reference.
Building an app rather than an agent? Official SDKs:
hogswap-js-sdk (npm)
and hogswap-py-sdk (PyPI).
Strictly non-custodial: every transaction-producing tool returns unsigned groups; you sign with your own wallet tooling and submit yourself. Never give any tool a mnemonic or private key.
Run (stdio)
npm install
HOGSWAP_API_KEY=hsk_... node src/index.mjs # key optionalClaude Code: claude mcp add hogswap -e HOGSWAP_API_KEY=hsk_... -- node <abs-path>/src/index.mjs
Env | Meaning |
| API base (default |
|
|
Related MCP server: inflow
Tools
Free (no key): list_payable_assets, get_quote, register_agent,
verify_registration. get_quote takes optional max_legs (1–16)
to cap total route legs, splits included — for replaying the route
under your own resource budget.
🔑 Require a HOGSWAP API key (set HOGSWAP_API_KEY, or self-issue one
with register_agent → sign → verify_registration): build_swap,
pay_x402_invoice, get_credit_offer, get_balance, plus the watch
tools set_watch / list_watches / delete_watch (standing
server-side price/target alerts — free of charge, but namespaced by
key). Without a key these return an auth error, not a build.
Watch fires are numbers-only hints — re-quote with get_quote when
one fires. From MCP, poll list_watches; outside MCP the server
pushes events over SSE at GET /watches/stream.
pay_x402_invoice returns two groups (swap, then payment) — sign all
txns in one pass, submit the groups in order; the swap's on-chain
floor guarantees the payment is funded. A HOGSWAP credit top-up's 402
offer is itself an x402 invoice: feed its accepts[0] (with the
note nonce) straight into pay_x402_invoice to buy credits with
any asset.
Remote (no local process)
The same 12 tools are served over MCP Streamable HTTP at
https://hogswap-v1.liquihog.dev/mcp/ — hosted by the HOGSWAP API
itself, no local process needed. Use the trailing slash — the
bare /mcp 307-redirects to /mcp/, costing an extra round trip per
call. Point any remote-capable MCP client at it; pass your key as
Authorization: Bearer hsk_... (the Claude API connector's
authorization_token does exactly this).
Smoke tests
HOGSWAP_API_KEY=hsk_... \
SMOKE_PAY_TO=<any USDC-opted addr> node test/smoke.mjs # stdio
HOGSWAP_API_KEY=hsk_... \
SMOKE_PAY_TO=<any USDC-opted addr> node test/smoke-remote.mjs # remoteBoth default to the live API; set HOGSWAP_API_URL (stdio) or
MCP_URL (remote) to point them at another instance. Read-only +
build-only; nothing is signed or broadcast.
Available Tools
8 toolsbuild_swapBInspect
Unsigned transaction group for a get_quote quote_id. Sign every txn with your own wallet and submit as one group. NEVER pass mnemonics or private keys to any tool — signing happens in YOUR wallet tooling, never on this server.
Inputs: quote_id (required), user_address (required), api_key.
get_balanceBInspect
Current HOGSWAP credit balance for your API key.
Inputs: api_key.
get_credit_offerAInspect
Create a credit top-up and get the x402 offer (HTTP 402 IS the payment instruction, not an error). accepts[0] is a plain USDC transfer invoice — feed it straight into pay_x402_invoice (keep the note!) to pay with any asset. Credits land ~1 block after the payment confirms.
Inputs: usdc_micro (required), api_key.
get_quoteAInspect
HOGSWAP swap quote across every Algorand DEX. Give amount (exact input) OR amount_out (exact output — minimum input is solved). Amounts are base units (µ); asset 0 = ALGO. Returns expected_out, route legs, and a quote_id for build_swap.
Inputs: asset_in (required), asset_out (required), amount, sender, +1 more.
list_payable_assetsAInspect
Assets accepted as payment inputs for pay_x402_invoice and credit top-ups (price-confidence gated; ALGO and USDC always included). Asset metadata is on get_quote responses or GET /assets.
Inputs: no named parameters.
pay_x402_invoiceAInspect
Pay ANY Algorand-settled x402 invoice with any 1-4 routable assets you hold, even if you hold none of the demanded asset. Pass the accepts entry you picked from the 402 response as invoice, plus your inputs (single input with no amount = minimum is solved for you). Returns UNSIGNED groups — sign everything in one pass, then submit the groups IN ORDER (swap first; its on-chain floor guarantees the payment is funded; if you already hold the demanded asset it is a single direct payment). Works for HOGSWAP credit top-up offers too: feed accepts[0] of the 402 straight in. EVM-settled invoices are not supported (no bridge). NEVER pass mnemonics or private keys to any tool — signing happens in YOUR wallet tooling, never on this server.
Inputs: inputs (required), invoice (required), user_address (required), api_key.
register_agentAInspect
Self-service HOGSWAP API key, step 1 of 2 — zero human, zero email. Returns a challenge string; sign its exact bytes with the Algorand address's key IN YOUR OWN wallet tooling, then call verify_registration. NEVER pass mnemonics or private keys to any tool — signing happens in YOUR wallet tooling, never on this server.
Inputs: address (required).
verify_registrationAInspect
Self-service key issuance, step 2 of 2. Returns your hsk_ API key ONCE — store it yourself (e.g. set HOGSWAP_API_KEY); it is not recoverable and this server does not keep it.
Inputs: address (required), challenge (required), signature_b64 (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool targets a distinct action in the HOGSWAP workflow: listing assets, checking balance, getting quotes, building swaps, paying invoices, registering, verifying, and creating credit offers. The sequential dependencies (quote -> build -> pay; register -> verify) are clear, and no two tools appear to duplicate functionality.
All tool names follow a consistent verb_noun snake_case pattern: list_, get_, build_, pay_, register_, verify_. There is a minor mix of 'list' vs 'get' for retrieval operations, but it is semantically appropriate (listing a collection vs fetching a specific balance/quote), and the overall convention is uniform.
With 8 tools, the server is well-scoped for its purpose—covering authentication, asset discovery, quoting, swap construction, invoice payment, balance checking, and credit top-ups. Each tool earns its place, and the count sits comfortably within the ideal 3-15 range.
The tool surface fully covers the core lifecycle: registration (register_agent + verify_registration), credit management (get_balance, get_credit_offer, pay_x402_invoice), and swap execution (list_payable_assets, get_quote, build_swap). Transaction submission is intentionally external for security, so there are no dead ends in the workflow.
Maintenance
Related MCP Connectors
Non-custodial cross-chain crypto swap MCP — 1288+ assets, no KYC. Solana/EVM/Monero, RPC, oracle.
Multichain DEX router: free MCP tools for swap-quote prices, chains, catalog; paid via x402.
MCP server for Boson Protocol — on-chain agentic commerce for physical & digital goods.
MCP server with quote and live cryptocurrency price tools, local and cloud-deployed transports.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server providing cross-chain swaps between Solana and Base for AI agents paid for via x402 micropayments.378 npm2MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for agent-native and human-accessible payments using MPP and x402 protocols, enabling payment flows from CLI or agent hosts.MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server for agentic commerce, enabling AI agents to discover services, make x402 payments with USDC across multiple chains, and manage crypto wallets and token swaps.339 npm1MIT
- AlicenseAqualityDmaintenanceMCP server for non-custodial token swaps and honeypot/rug-pull safety checks across 8 blockchains, with free quotes and paid x402-based transaction builds and security screenings.658 npm1MIT