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 分