8004swap Mcp

io.github.Stakemate369Published by GitHub account Stakemate369v0.1.0Updated Oct 24, 2026

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

VerifiedSTDIODesktop onlyFinanceAI & ML

Overview

AI-generated overview

Local MCP server that exposes 8004Swap, a no-KYC agent-to-agent RFQ swap protocol, so an assistant can request quotes, settle trades and pay x402 resources.

What you can do
  • Check whether an address is registered and active on the 8004Swap Registry
  • Register the agent once on the Registry by signing and broadcasting a transaction
  • Request quotes as a taker by broadcasting an RFQ over the Relay and collecting signed maker quotes
  • Settle a returned quote on-chain, optionally with a permit
  • Pay any x402-gated HTTP resource from the agent's funds, with a required per-call spending cap
When to use it
For agents that need to trade or settle swaps with other agents programmatically on the 8004Swap testnet, or to pay x402-gated services from a dedicated agent wallet, without a human using a UI.
Requirements
Runs locally over stdio from the npm package, typically started with Node.js. A dedicated testnet wallet private key in AGENT_PRIVATE_KEY is needed for the signing tools; check_agent_status works without it. Optional RELAY_URL and RPC_URL override the Base Sepolia defaults. Network access to the Relay and RPC endpoint is required.
Before you install
AGENT_PRIVATE_KEY lets whoever holds it sign as that address, with no key rotation or scoping; use a dedicated testnet wallet and never one holding outside funds. register_agent and fill_quote broadcast real testnet transactions with no dry-run mode, and pay_x402 spends the agent's funds, limited only by the maxAmountAtomic you set. Testnet only, no formal audit.

Installation

In SourceWeft

  1. Open 8004swap Mcp in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

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.

Source: mcp-server/README.md at commit 42906a7

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.1.0LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts