Hashlock-Tech/hashlock-mcp

๐Ÿ’ฐ Finance & Fintech
0 Views
0 Installs

๐Ÿ“‡ โ˜๏ธ - Cross-chain OTC trading via sealed-bid RFQ + HTLC atomic settlement. Six tools for AI agents to swap ETH, BTC, and SUI without bridges, custodians, or information leakage. Hosted at hashlock.markets/mcp or local stdio via @hashlock-tech/mcp.

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "hashlock-tech-hashlock-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "hashlock-tech-hashlock-mcp"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

@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 License: 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 varChainLogin
HASHLOCK_EVM_KEYEVMSIWE personal_sign
HASHLOCK_TRON_KEYTRONsignMessageV2
HASHLOCK_BTC_KEYBitcoinBIP-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)

ToolWhat it does
list_assetsAsset registry (SYMBOL@chain refs, decimals)
list_open_rfqsPublic RFQ board, filterable
get_rfqOne RFQ / private order
create_rfqPost a public RFQ or private fixed-price order
cancel_rfqCancel your own request
respond_to_rfqRespond with a price โ†’ opens a deal thread
negotiatemessage / propose / accept_proposal / accept / reject
my_rfqs, my_dealsYour requests and deal threads
deal_statusThread + negotiation history + HTLC swap state
set_settlement_addressYour receive/refund address per chain
get_deal_secretThe locally-stored swap preimage (gated on both legs funded)
reveal_claimReport an out-of-band claim (secret + tx) so the other leg settles
whoamiThe account you're authenticated as
fund_legAutonomous: fund your side of a swap on-chain with the agent's own key (EVM/TRON/BTC)
claim_legAutonomous: 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.

Related MCP Servers

@agentfund/mcp

๐Ÿ“‡ โ˜๏ธ - Fundraising infrastructure for AI agents on Solana โ€” campaigns, x402 donations, and on-chain reputation. MCP tools for registering agents, creating campaigns, and donating via the x402 pay-to-call flow, backed by Anchor programs (agentregistry, escrow, reputation). npx -y @agentfund/mcp

๐Ÿ’ฐ Finance & Fintech1 views
@asterpay/mcp-server

๐Ÿ“‡ โ˜๏ธ - EUR settlement for AI agents via x402 protocol. Market data, AI tools, crypto analytics โ€” pay-per-call in USDC on Base. SEPA Instant EUR off-ramp.

๐Ÿ’ฐ Finance & Fintech1 views
@czagents/cnb

๐Ÿ“‡ โ˜๏ธ ๐Ÿ  ๐ŸŽ ๐ŸชŸ ๐Ÿง - Czech National Bank (ฤŒNB) daily FX rates: fetch official CZK exchange rates, convert between currencies, fetch historical rates. Cached 10 min to ease upstream load. npm @czagents/cnb or HTTP at cnb.cz-agents.dev/mcp.

๐Ÿ’ฐ Finance & Fintech1 views
@arbitova/mcp-server

๐Ÿ“‡ โ˜๏ธ - Non-custodial on-chain escrow + AI dispute arbitration for agent-to-agent USDC payments on Base. Seven tools covering the full EscrowV1 contract surface: create escrow, mark delivered with on-chain content hash, confirm or dispute, arbiter resolves with signed verdict, cancel/escalate on timeout. npx @arbitova/mcp-server

๐Ÿ’ฐ Finance & Fintech0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Not checked yet

We have not completed a health check for this listing yet.

No check timestamp yet.

Unclaimed listing (imported or pending owner verification). Claim it โ†’
โ˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.