Featured

Deploy OpenClaw in 60 seconds β€” 20% off logoDeploy OpenClaw in 60 seconds β€” 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger β†’
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger β†’
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free β†’
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now β†’
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data β€” no proxies, no parsers, no maintenance.

Start building free β†’
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it β€” secured from day one.

Get it set up for you β†’
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free β†’
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here β†’

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Hashlock-Tech/hashlock-mcp MCP server](https://glama.ai/mcp/servers/Hashlock-Tech/hashlock-mcp/badges/score.svg)](https://glama.ai/mcp/servers/Hashlock-Tech/hashlock-mcp) πŸ“‡ ☁️ - Cross-chain OTC trading via sealed-bid RFQ + HTLC atomic settlement.

README.md

@hashlock-tech/mcp

Hashlock Markets β€” the settlement layer for the agent economy, as MCP tools. Non-custodial cross-chain OTC: sealed RFQ + price negotiation + HTLC atomic settlement β€” both legs settle or both refund; no bridge, no custodian, no counterparty risk. BTC ↔ EVM / TRON. ⚠️ Testnets only for now (Ethereum Sepolia Β· TRON Nile Β· Bitcoin signet). Mainnet comes after the security-hardening gate β€” do not send real funds.

![npm](https://www.npmjs.com/package/@hashlock-tech/mcp) ![License: MIT](https://opensource.org/licenses/MIT)

What is this?

The canonical Model Context Protocol server for Hashlock Markets. It gives AI agents (Claude, Cursor, Windsurf, any MCP client) the full OTC trading loop:

  1. Browse the asset registry and the public RFQ board
  2. Post a public RFQ or a private fixed-price order (shareable link)
  3. Respond to requests with a price; negotiate (counter / accept / decline) in the deal thread
  4. Agree β€” both parties accept β†’ an HTLC swap is created
  5. Track settlement β€” who funded, timelocks, tx hashes β€” and manage receive/refund addresses

Settlement signing (funding and claiming the HTLCs) stays with your own wallet β€” the server never holds keys or funds. The swap secret is generated locally on your machine and only its sha256 hashlock is sent; retrieve it with get_deal_secret when it's time to claim.

Install

Local stdio via npx (Claude Desktop / Cursor / Windsurf mcpServers config):

{
  "mcpServers": {
    "hashlock": {
      "command": "npx",
      "args": ["-y", "@hashlock-tech/mcp"],
      "env": {
        "HASHLOCK_EVM_KEY": "0x<agent EVM key (TESTNET!)>",
        "HASHLOCK_TRON_KEY": "<agent TRON key, 64-hex (optional)>",
        "HASHLOCK_BTC_KEY": "<agent BTC WIF, signet (optional)>"
      }
    }
  }
}

Auth β€” autonomous, per chain

The agent owns its key(s); the server does the login itself (nonce β†’ sign β†’ JWT, refreshed on expiry). The first configured key (EVM β†’ TRON β†’ BTC) mints the session; each key also signs settlement on its chain.

| Env var | Chain | Login | |---|---|---| | HASHLOCK_EVM_KEY | EVM | SIWE personal_sign | | HASHLOCK_TRON_KEY | TRON | signMessageV2 | | HASHLOCK_BTC_KEY | Bitcoin | BIP-322 | | HASHLOCK_TOKEN | β€” | a ready JWT (alternative to a key) |

With none set, read-only tools (list_assets, list_open_rfqs, get_rfq) still work. Use dedicated testnet keys.

Other env: HASHLOCK_API_URL (default https://dev.hashlock.markets/api), HASHLOCK_APP_URL (share links; default derived), HASHLOCK_EVM_RPC (default a public Sepolia RPC), HASHLOCK_TRON_HOST (default Nile), HASHLOCK_SECRETS_PATH (default ~/.hashlock/mcp-secrets.json, mode 0600).

Tools (16)

| Tool | What it does | |---|---| | list_assets | Asset registry (SYMBOL@chain refs, decimals) | | list_open_rfqs | Public RFQ board, filterable | | get_rfq | One RFQ / private order | | create_rfq | Post a public RFQ or private fixed-price order | | cancel_rfq | Cancel your own request | | respond_to_rfq | Respond with a price β†’ opens a deal thread | | negotiate | message / propose / accept_proposal / accept / reject | | my_rfqs, my_deals | Your requests and deal threads | | deal_status | Thread + negotiation history + HTLC swap state | | set_settlement_address | Your receive/refund address per chain | | get_deal_secret | The locally-stored swap preimage (gated on both legs funded) | | reveal_claim | Report an out-of-band claim (secret + tx) so the other leg settles | | whoami | The account you're authenticated as | | fund_leg | Autonomous: fund your side of a swap on-chain with the agent's own key (EVM/TRON/BTC) | | claim_leg | Autonomous: claim your receive leg with the preimage (reveals the secret on-chain) |

Amounts are human decimal strings ("0.5"); prices are the total quote-asset amount, not per-unit. Errors return a structured envelope { error: { code, is_retryable, recovery_hint } } agents can branch on.

Fully autonomous loop

With a key set for each chain a swap touches, an agent can run end to end with no human: create_rfq/respond_to_rfq β†’ negotiate (accept) β†’ set_settlement_address (both chains) β†’ fund_leg β†’ claim_leg. Funding/claiming is signed locally with the agent's keys; the swap secret is generated + stored locally and only its hashlock leaves the machine. Use dedicated testnet keys.

How atomic settlement works

Both parties lock funds in HTLCs bound to the same sha256(secret) hashlock β€” BTC as a P2WSH script, EVM/TRON as contracts. The initiator funds the long-timelock leg first (asymmetric timelocks, so nobody gets a free option). Claiming one leg reveals the secret on-chain, which unlocks the other leg. Either both legs settle, or both refund after their timelocks. The recipient of each leg is fixed at funding time β€” revealing the secret cannot redirect funds.

Development

pnpm install
pnpm run build    # tsup β†’ dist/
pnpm run lint     # tsc --noEmit
pnpm test         # vitest

Node β‰₯ 20. MIT.

See related servers & alternatives β†’

Related MCP servers

Browse all β†’

Related guides

Hand-picked reading to help you choose and use Finance & Payments servers.