Hogswap Mcp

io.github.LiquiHog由 GitHub 帳號 LiquiHog 發布v0.4.0更新於 Oct 24, 2026

Pay any Algorand x402 invoice with any asset, plus DEX swap quotes and unsigned builds.

已驗證Streamable HTTP可網頁執行金融開發者工具

概覽

AI 產生的概覽

為 AI 助理提供 Algorand DEX 聚合報價、未簽章兌換交易建構與 x402 發票付款,並含額度與監控工具。

可以做什麼
  • 跨 Algorand 各 DEX 取得兌換報價,並依報價建構未簽章交易群組
  • 以持有的任意 1 至 4 種資產支付 Algorand 結算的 x402 發票,並為 HOGSWAP 額度加值
  • 列出可付款資產,並估算流動性提供者代幣的美元價值
  • 透過簽章挑戰自助註冊 API 金鑰,並查詢額度餘額
  • 建立、列出與刪除伺服器端常駐的價格或目標監控
適用情境
適合需要為 Algorand 兌換估價或準備交易、以非指定資產結算 x402 發票,或維持常駐價格與目標提醒的情境。也適用於簽章始終留在使用者自己錢包中的代理式鏈上付款。
執行需求
可作為遠端 Streamable HTTP 端點(服務商 /mcp/ 路徑)使用,也可透過 npm 套件以 stdio 在本機執行,需要 Node.js。免費工具不需金鑰;建構、付款、額度與監控工具需要 HOGSWAP_API_KEY,可透過註冊工具自助簽發。可用 HOGSWAP_API_URL 覆寫 API 位址。需要能連線至 HOGSWAP API 的網路。
安裝前請注意
付款與兌換工具會回傳真實的未簽章交易,使用者簽章並送出後會實際動用資金;額度加值需要付費。HOGSWAP_API_KEY 僅在註冊時顯示一次,無法找回。切勿將助記詞或私鑰傳給任何工具。監控觸發僅為提示,應重新報價確認。請求與發票資料會傳送至服務商的託管 API。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Hogswap Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.LiquiHog%2Fhogswap-mcp/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "hogswap": {
      "type": "http",
      "url": "https://hogswap-v1.liquihog.dev/mcp/"
    }
  }
}

README

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)

sh
npm installHOGSWAP_API_KEY=hsk_... node src/index.mjs        # key optional

Claude Code: claude mcp add hogswap -e HOGSWAP_API_KEY=hsk_... -- node <abs-path>/src/index.mjs

EnvMeaning
HOGSWAP_API_URLAPI base (default https://hogswap-v1.liquihog.dev)
HOGSWAP_API_KEYhsk_ bearer key; self-issue via the register_agent / verify_registration tools

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

sh
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 # remote

Both 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.

來源:README.md,提交 7d58fd8

工具

12

list_payable_assets

Assets accepted as payment inputs for pay_x402_invoice and credit top-ups (price-confidence gated; ALGO and USDC always included).

無需輸入參數。

get_quote

HOGSWAP swap quote across every Algorand DEX. Give amount (exact input) OR amount_out (exact output — minimum input is solved). Base units (µ); asset 0 = ALGO. Returns expected_out, route legs, and a quote_id for build_swap. expected_out is NET of the 5 bps routing fee; passing sender also returns router_fee_* fields and the wallet's HOG discount (hog_discount_pct, 100 = fully waived at 100 HOG). Optional sender enables HOG-holding fee discounts. Optional max_legs (1-16) caps TOTAL route legs, splits included — slightly worse price at size, 404 if nothing fits; forward (amount) quotes only.

輸入參數amountsenderapi_keyasset_in必填max_legsasset_out必填amount_out

build_swap

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, never here.

輸入參數api_keyquote_id必填user_address必填

pay_x402_invoice

Pay ANY Algorand-settled x402 invoice with any 1-4 routable assets you hold, even holding none of the demanded asset. Pass the `accepts` entry you picked as `invoice` (keep its note!) plus your inputs (single input with no amount = minimum solved). Returns UNSIGNED groups — sign all in one pass, submit IN ORDER (swap first; its on-chain floor guarantees the payment is funded; holding the asset already = one direct payment). HOGSWAP credit top-up offers feed this verbatim. EVM invoices unsupported (no bridge). NEVER pass mnemonics or private keys to any tool — signing happens in YOUR wallet, never here.

輸入參數inputs必填api_keyinvoice必填user_address必填

register_agent

Self-service HOGSWAP API key, step 1 of 2 — zero human. Returns a challenge; sign its exact bytes with the address's key in YOUR wallet tooling, then call verify_registration. NEVER pass mnemonics or private keys to any tool — signing happens in YOUR wallet, never here.

輸入參數address必填

verify_registration

Self-service key issuance, step 2 of 2. Returns your hsk_ key ONCE — store it yourself; it is not recoverable and this server does not keep it. Send it on later calls as Authorization: Bearer, X-API-Key, or the api_key argument.

輸入參數address必填challenge必填signature_b64必填

get_credit_offer

Create a credit top-up and get the x402 offer (HTTP 402 IS the payment instruction, not an error). Feed accepts[0] straight into pay_x402_invoice (keep the note nonce) to pay with any asset. Credits land ~1 block after payment.

輸入參數api_keyusdc_micro必填

get_balance

Current HOGSWAP credit balance for your API key.

輸入參數api_key

value_lp_token

Value a liquidity-provider position. Give the LP token's asset id (free, no key) and optionally `amount` in LP BASE units — what the wallet holds — for its USD value and the redeemable amount of each underlying. Also identifies the issuing pool/DEX (and STAMM tier). Per-unit figures are per WHOLE LP token. Values are a proportional-share redemption at analytics prices: no slippage, no exit fee, NOT a market quote — fields are null rather than guessed when supply or a price is missing, so check before reporting a number.

輸入參數amountasset_id必填

set_watch

Register a standing server-side watch (FREE, needs a key; idempotent upsert by client_key — re-registering replaces the watch and resets arming). kind='price': advisory µUSD threshold (asset_id, op gte/lte, threshold_usd_micro). kind='target': size-aware surrogate — would swapping amount_in of asset_in→asset_out deliver ≥ min_out? (margin_bps haircut, default 30; NO quote is run). Edge-triggered one-shot; re-arms after rearm_bps retreat + cooldown_s; ttl_s auto-expiry (default 86400) — refresh by re-upserting. Fires are numbers-only HINTS: re-quote with get_quote. Events push over SSE at GET /watches/stream (outside MCP); from MCP, poll list_watches.

輸入參數opkind必填ttl_sapi_keymin_outasset_idasset_inamount_inasset_outrearm_bpsclient_key必填cooldown_s另有 2 個

list_watches

List your key's active watches (spec + arming/fired state), quota, and latest event seq. Poll this from MCP to see fires; SSE at GET /watches/stream is the push alternative outside MCP.

輸入參數api_key

delete_watch

Delete one of your watches by its client_key.

輸入參數api_keyclient_key必填

版本歷史

1
  1. v0.4.0最新Sep 16, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分