MCP.so
Sign In

Counterparty Mcp Server

@XCP

About Counterparty Mcp Server

Counterparty MCP Server - AI agent access to the Counterparty protocol

Config

Add this server to your MCP-compatible client using the configuration below.

{
  "mcpServers": {
    "counterparty": {
      "command": "npx",
      "args": [
        "@21e14/mcp-server"
      ]
    }
  }
}

Tools

48

Get all Counterparty token balances for a Bitcoin address

Get the balance of a specific asset for a Bitcoin address

Get metadata for a Counterparty asset (supply, divisibility, issuer, description, etc.)

Get all balances for a specific asset across all holders

Search or list Counterparty assets

Get the issuance history for a Counterparty asset

Get all assets issued/owned by a specific address

Get orders on the Counterparty DEX (default: open)

Get details of a specific DEX order by its transaction hash

Get matches for a specific DEX order

Get the order book for a specific trading pair on the DEX

Get all DEX orders involving a specific asset

Get all DEX orders placed by a specific address

Get Counterparty dispensers (default: open)

Get details of a specific dispenser by its transaction hash

Get dispensers for a specific asset (default: open)

Get all dispensers created by a specific address

Get dispense records (purchases) for a specific dispenser

Get dividend distributions for a specific asset

Get transaction history for a Bitcoin address on Counterparty

Get all sends (token transfers) from a specific address

Get details of a specific Counterparty transaction by its hash

Get Counterparty token balances attached to a specific UTXO

Get the latest block information from the Counterparty node

Compose a transaction to send Counterparty tokens to an address

Compose a multi-party multi-asset send transaction. Sends multiple assets to multiple destinations in a single transaction. All three arrays must be the same length.

Compose a DEX order to trade Counterparty assets. IMPORTANT: give_quantity and get_quantity are TOTAL amounts, not per-unit prices. The price per unit is the ratio between them. Example: to buy 1000 TOKENA at 0.5 XCP each, set give_asset=XCP, give_quantity=500*10^8 (500 XCP total), get_asset=TOKENA, get_quantity=1000. Example: to sell 50 XCP for BTC at 0.001 BTC per XCP, set give_asset=XCP, give_quantity=50*10^8, get_asset=BTC, get_quantity=50*100000 (0.05 BTC total).

Compose a transaction to cancel an open DEX order

Compose a BTC payment for a matched DEX order. Used to complete BTC trades on the DEX.

Compose a transaction to issue (create) a new Counterparty asset, or update an existing one.

Compose a transaction to create, open, or close a dispenser. Dispensers automatically sell tokens for BTC.

Compose a transaction to buy from a dispenser by sending BTC to it

Compose a transaction to distribute dividends to all holders of an asset

Compose a transaction to broadcast a text message or numeric value to the Counterparty network

Compose a transaction to sweep all assets and/or BTC from one address to another

Compose a transaction to permanently destroy (burn) Counterparty tokens

Compose a transaction to create a fair minting launch for a new asset. For XCP-420 compliant launches, use compose_xcp420_fairminter instead.

Compose a XCP-420 compliant fair launch. XCP-420 is a community standard that enforces fixed parameters: 10M supply, 4.2M soft cap, 0.1 XCP per mint, 1000 tokens per mint, 1000 block duration, no premine, no commission, burn payment, locked supply. Only the asset name, start block, and description are configurable.

Compose a transaction to mint tokens from an active fair minter

Compose a transaction to attach Counterparty tokens to a specific UTXO

Compose a transaction to detach Counterparty tokens from a UTXO back to an address

Compose a transaction to move a UTXO (and any attached tokens) to a new output

Broadcast a signed Bitcoin transaction to the network via the Counterparty node

Get current Bitcoin fee rates in sat/vB. Queries the Counterparty node first, falls back to mempool.space. Use the returned values directly as sat_per_vbyte in compose tools.

Decode a raw Bitcoin transaction hex into its components (inputs, outputs, etc.)

Decode and unpack a Counterparty message from a raw transaction, revealing the embedded Counterparty data

Get Counterparty node status, version, and network information

Make a raw API request to any Counterparty REST endpoint not covered by the other tools. Full API reference: https://raw.githubusercontent.com/CounterpartyXCP/counterparty-core/refs/heads/master/apiary.apib — Example: endpoint="/v2/blocks/last", method="GET"

Overview

What is Counterparty MCP Server?

An MCP server that gives AI agents the ability to interact with Counterparty — the token protocol built on Bitcoin. It enables querying balances, assets, orders, and dispensers, as well as composing, signing, and broadcasting transactions. Works with any MCP-compatible client.

How to use Counterparty MCP Server?

No download needed — add the configuration to your MCP client. For most clients, use npx -y @21e14/mcp-server as the command. Optionally set environment variables SIGNER_PRIVATE_KEY and SIGNER_ADDRESS to enable signing and broadcasting. The server then exposes 49 tools and 3 resources for agent interaction.

Key features of Counterparty MCP Server

  • 24 query tools for reading blockchain data
  • 18 compose tools for building transactions
  • 4 Bitcoin tools including signing and broadcasting
  • 3 utility tools for debugging and raw API access
  • Built-in protocol documentation for agent context
  • Works with Claude, VS Code, Cursor, ChatGPT, and more

Use cases of Counterparty MCP Server

  • Check token balances for any Bitcoin address
  • Place or cancel orders on the Counterparty DEX
  • Create and manage token dispensers
  • Issue new assets or launch fair mints
  • Automate token sends and sweeps across addresses

FAQ from Counterparty MCP Server

What is the default Counterparty node URL?

The default node URL is https://api.counterparty.io:4000. You can override it with the COUNTERPARTY_NODE environment variable.

How do I enable signing and broadcasting?

Set SIGNER_PRIVATE_KEY (WIF-encoded) and SIGNER_ADDRESS (segwit address) in the server’s environment. This activates the sign_and_broadcast tool.

Which Bitcoin address types are supported for signing?

P2WPKH (bc1q...), P2SH-P2WPKH (3...), and P2TR (bc1p...) are supported. Legacy P2PKH is not supported.

What happens if I don’t provide signing keys?

The server runs in compose-only mode: all compose tools return unsigned transaction hex. You can review and sign offline with your own tooling.

Where are the Counterparty protocol docs located for agents?

The server exposes three resources: counterparty://protocol-overview, counterparty://xcp420-standard, and counterparty://quick-start. Agents can read these for context.

Frequently asked questions

What is the default Counterparty node URL?

The default node URL is `https://api.counterparty.io:4000`. You can override it with the `COUNTERPARTY_NODE` environment variable.

How do I enable signing and broadcasting?

Set `SIGNER_PRIVATE_KEY` (WIF-encoded) and `SIGNER_ADDRESS` (segwit address) in the server’s environment. This activates the `sign_and_broadcast` tool.

Which Bitcoin address types are supported for signing?

P2WPKH (`bc1q...`), P2SH-P2WPKH (`3...`), and P2TR (`bc1p...`) are supported. Legacy P2PKH is not supported.

What happens if I don’t provide signing keys?

The server runs in compose-only mode: all compose tools return unsigned transaction hex. You can review and sign offline with your own tooling.

Where are the Counterparty protocol docs located for agents?

The server exposes three resources: `counterparty://protocol-overview`, `counterparty://xcp420-standard`, and `counterparty://quick-start`. Agents can read these for context.

Comments

More Other MCP servers