8004swap Mcp

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

MCP server exposing 8004Swap (no-KYC agent-to-agent RFQ swap) as tools any MCP agent can call.

已驗證STDIO僅桌面金融AI 與機器學習

概覽

AI 產生的概覽

本機 MCP 伺服器,將免 KYC 的 agent 對 agent RFQ 交換協定 8004Swap 包裝成工具,讓助理索取報價、結算交易並支付 x402 資源。

可以做什麼
  • 查詢某地址是否已在 8004Swap Registry 註冊且處於啟用狀態
  • 透過簽署並廣播交易,一次性完成 agent 在 Registry 上的自我註冊
  • 以 taker 身分經由 Relay 廣播 RFQ,並收集 maker 回傳的簽章報價
  • 在鏈上結算回傳的報價,可選擇附帶 permit
  • 以該 agent 的資金支付任何受 x402 保護的 HTTP 資源,每次呼叫都必須設定支出上限
適用情境
適合需要在 8004Swap 測試網上以程式化方式與其他 agent 交易或結算交換的 agent,或需要用專用 agent 錢包支付 x402 服務、不必人工操作介面的情境。
執行需求
以 stdio 方式在本機執行,來自 npm 套件,通常以 Node.js 啟動。簽章類工具需要在 AGENT_PRIVATE_KEY 提供專用測試網錢包私鑰;check_agent_status 不需私鑰。可選的 RELAY_URL 與 RPC_URL 可覆寫 Base Sepolia 預設值。需要能連線 Relay 與 RPC 端點的網路。
安裝前請注意
持有 AGENT_PRIVATE_KEY 的任何人都能以該地址簽章,且沒有金鑰輪替或權限範圍機制;請使用專用測試網錢包,切勿使用存放其他資金的錢包。register_agent 與 fill_quote 會廣播真實的測試網交易,沒有試跑模式;pay_x402 會動用 agent 資金,僅受所設 maxAmountAtomic 限制。僅限測試網,未經正式稽核。

安裝

在 SourceWeft 中

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

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

@stakemate/8004swap-mcp-server

Exposes 8004Swap as MCP tools, so any MCP-capable agent (Claude, or any other MCP client) can request quotes, settle trades, and check Registry status directly — no human clicking through a UI in between.

Thin wrapper around @stakemate/8004swap-agent-sdk; see ../PROTOCOL.md for what actually happens on the wire.

Tools

  • check_agent_status — read-only, no key needed. Checks if an address is registered + active on the 8004Swap Registry.
  • register_agent — one-time self-registration on the Registry. Signs + broadcasts a transaction with AGENT_PRIVATE_KEY.
  • request_quote — acts as taker: broadcasts an RFQ over the Relay, returns signed quotes from subscribed makers. Needs AGENT_PRIVATE_KEY to authenticate to the Relay (this step costs no gas, it's an off-chain login signature).
  • fill_quote — acts as taker: settles a quote returned by request_quote on-chain via Settlement.fillQuote (or fillQuoteWithPermit if you pass a permit). Signs + broadcasts a transaction.
  • pay_x402 — pays for any x402-gated HTTP resource (protocol v2) using the configured agent's funds: fetches the URL, and if it answers 402 with a payment requirement, signs an EIP-3009 transferWithAuthorization and retries. Only the exact scheme with the eip3009 transfer method is supported (the common case for USDC-like tokens); Permit2/ERC-7710 offers are rejected. Not specific to 8004Swap's own protocol — this is how an agent that just swapped into USDC via fill_quote can turn around and pay some other agent's x402-gated service with it. maxAmountAtomic is required on every call and is the only spending limit — always set it to the most you're willing to authorize for that one call.

There's currently no tool for acting as a maker (subscribing to a pair and responding to broadcasts) — that role needs a long-lived connection reacting to inbound RFQs, which doesn't fit MCP's request/response tool-call model well. Use sdk/relay/examples/makerClient.ts directly for that role today.

Setup

shell
npm installnpm run buildcp .env.example .env   # fill in AGENT_PRIVATE_KEY if you want to sign anything

Defaults in .env.example point at the current Base Sepolia deployment — override RPC_URL/CHAIN_ID/REGISTRY_ADDRESS/SETTLEMENT_ADDRESS/RELAY_URL for a different network once one exists.

AGENT_PRIVATE_KEY is only needed for register_agent, request_quote, and fill_quote. Generate a dedicated wallet for this agent — never point this at a key that holds funds outside this testnet. There is no key rotation or scoping built in: whoever has this env var can sign as that address.

Running

As a standalone stdio MCP server:

shell
npm start

Point an MCP client at it, e.g. in Claude Desktop's claude_desktop_config.json:

json
{  "mcpServers": {    "8004swap": {      "command": "node",      "args": ["/absolute/path/to/8004swap/mcp-server/dist/index.js"],      "env": {        "AGENT_PRIVATE_KEY": "0x..."      }    }  }}

Status

Testnet only, same as the rest of the repo. No formal audit. fill_quote and register_agent broadcast real (testnet) transactions — there is no dry-run mode.

來源:mcp-server/README.md,提交 42906a7

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

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

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分