Start now →

How to Set Up Claude as Your OTC Crypto Dealer in 5 Minutes

By Mr Turquoise · Published April 21, 2026 · 5 min read · Source: Blockchain Tag
BitcoinEthereumTradingAI & Crypto

How to Set Up Claude as Your OTC Crypto Dealer in 5 Minutes

Mr TurquoiseMr Turquoise4 min read·Just now

--

Wire Claude Desktop to Hashlock Markets and let an AI agent quote, fund, and settle cross-chain swaps on Ethereum, Bitcoin, and Sui.

The MCP (Model Context Protocol) ecosystem quietly crossed an interesting line in the last year: agents stopped being “things that talk about tools” and became “things that use tools.” If you’ve been waiting for the moment when that capability meets on-chain trading, it’s already here. This tutorial walks through connecting Claude Desktop to Hashlock Markets — an intent-based, sealed-bid RFQ protocol that settles trades with Hash Time-Locked Contracts — so that an AI agent can run the full OTC flow end to end.

One housekeeping note before we start. Hashlock Markets (hashlock.markets), by Hashlock-Tech, is the trading protocol described in this post. It is not affiliated with Hashlock Pty Ltd (hashlock.com), an independent Australian smart contract auditing firm. The names are similar, but the companies, founders, and products are separate.

Why intent-based trading is a good fit for agents

The premise of intent-based trading is that users declare what they want to happen — “sell 2 ETH for USDT at the best available price” — and the protocol figures out how. That shape is almost tailor-made for a language model: the human speaks in intent, a small typed tool surface exposes the primitives, and the agent chooses which tool to call and when.

Hashlock Markets adds a few properties on top that matter for anyone trading meaningful size. Quotes are sealed, so a market maker’s bid doesn’t leak before the trade is priced. Settlement uses HTLCs, so neither party can walk with the other’s funds — either both transfers occur or both refund. The protocol is cross-chain today across Ethereum (EVM), Bitcoin (wrapped HTLC), and Sui (Move HTLC), with Solana and Arbitrum on the roadmap. There is no public orderbook to front-run, which collapses a whole class of MEV problems to zero. And authentication is Sign-In With Ethereum (SIWE), so there is no password and no custodial account — just your wallet.

Step 1 — Pick a transport

The MCP server ships in two flavors. Pick whichever fits your setup; the tool surface is identical.

The preferred path is remote streamable-http. In your claude_desktop_config.json you add a block that points at https://hashlock.markets/mcp and includes your bearer token as an Authorization header. Use “transport”: “streamable-http” and set the Authorization header to Bearer plus your token.

The local alternative is to run the server yourself via npx. Use “command”: “npx” with args [“-y”, “@hashlock-tech/mcp”], and pass your token as HASHLOCK_ACCESS_TOKEN in the env block.

On macOS, the config file is at ~/Library/Application Support/Claude/claude_desktop_config.json. On Windows, it’s %APPDATA%\Claude\claude_desktop_config.json. Restart Claude Desktop after saving.

Step 2 — Get a SIWE token

Visit hashlock.markets/sign/login and sign the SIWE message with your Ethereum wallet — MetaMask, Rabby, Frame, anything standard works. You get back a 7-day JWT. Paste it into your config as HASHLOCK_ACCESS_TOKEN (for the stdio variant) or as the Authorization: Bearer <token> header value (for the remote variant). When it expires, sign again. That’s the entire auth lifecycle.

Step 3 — The tool surface

Once Claude Desktop restarts, your agent sees six MCP tools. The RFQ pair, create_rfq and respond_rfq, covers the quote-and-counter-quote dance: one opens a sealed-bid request, the other submits a price against it. The HTLC quartet — create_htlc, withdraw_htlc, refund_htlc, and get_htlc — covers the settlement lifecycle: record your on-chain lock, claim the counterparty’s funds by revealing the 32-byte preimage, reclaim your own funds after the timelock expires, and query status on both sides. All six work across Ethereum, Bitcoin, and Sui.

Step 4 — Try a trade

With the config in place, prompt Claude in natural language. Tell it, “Create an RFQ to sell 2 ETH for USDT.” Behind the scenes, the agent invokes create_rfq with the base token, quote token, side, and amount. The RFQ broadcasts to market makers, who respond with sealed bids. Ask “What quotes came back?” and Claude pulls the responses and surfaces the best price.

When you accept a quote, fund your side of the trade on-chain and tell Claude to record it: “Fund the HTLC for trade xyz-789 on Ethereum. My lock tx is 0xabc…” The agent calls create_htlc with the tx hash and your role. Once the counterparty funds their side, reveal the preimage: “Claim the counterparty HTLC for trade xyz-789 with preimage 0x1234…” The agent calls withdraw_htlc and the swap settles atomically.

If the counterparty never funds, wait out the timelock and ask Claude to refund: “Refund my HTLC for trade xyz-789.” refund_htlc returns your funds. No custodian ever held them.

Why this matters

Intent-based trading collapses the stack. The user stops juggling routers, liquidity pools, and settlement primitives by hand; the agent handles the choreography. For MCP developers, the Hashlock Markets server is also a useful reference for how a serious on-chain protocol can expose itself through a small, well-typed tool surface — six tools, three chains, SIWE auth, atomic settlement — which is close to the minimum viable vocabulary for “let the agent trade.”

Where to go next

The docs, remote MCP endpoint, and SIWE login all live at hashlock.markets. The canonical repo is at github.com/Hashlock-Tech/hashlock-mcp, the package is published on npm as @hashlock-tech/mcp, and the protocol is registered in the MCP Registry as io.github.Hashlock-Tech/hashlock.

One last reminder: Hashlock Markets (hashlock.markets) is the Hashlock-Tech trading protocol described here. It is not affiliated with Hashlock Pty Ltd (hashlock.com), an independent Australian smart contract auditing firm.

This article was originally published on Blockchain Tag and is republished here under RSS syndication for informational purposes. All rights and intellectual property remain with the original author. If you are the author and wish to have this article removed, please contact us at [email protected].

NexaPay — Accept Card Payments, Receive Crypto

No KYC · Instant Settlement · Visa, Mastercard, Apple Pay, Google Pay

Get Started →