
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.
概览
本地 MCP 服务器,把免 KYC 的 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 端点的网络。
安装
在 SourceWeft 中
- 打开 控制台中的 8004swap Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
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 withAGENT_PRIVATE_KEY.request_quote— acts as taker: broadcasts an RFQ over the Relay, returns signed quotes from subscribed makers. NeedsAGENT_PRIVATE_KEYto 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 byrequest_quoteon-chain viaSettlement.fillQuote(orfillQuoteWithPermitif you pass apermit). 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-3009transferWithAuthorizationand retries. Only theexactscheme with theeip3009transfer 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 viafill_quotecan turn around and pay some other agent's x402-gated service with it.maxAmountAtomicis 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
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:
Point an MCP client at it, e.g. in Claude Desktop's claude_desktop_config.json:
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版本历史
1- v0.1.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分