Basic information
About Counterparty Mcp Server
Counterparty MCP Server - AI agent access to the Counterparty protocol
Counterparty Mcp Server is a MCP server in the Other category listed in the AddMCP.net directory, published by XCP. It exposes 48 tools, including get_balances, get_balance, get_asset_info, get_asset_balances and more. Supported transport: stdio. Runtime: node. License: MIT. Source code is hosted on github.com.
Setup
{
"mcpServers": {
"counterparty": {
"command": "npx",
"args": [
"@21e14/mcp-server"
]
}
}
}
{
"mcpServers": {
"counterparty": {
"command": "npx",
"args": [
"@21e14/mcp-server"
]
}
}
}
{
"servers": {
"counterparty": {
"command": "npx",
"args": [
"@21e14/mcp-server"
]
}
}
}
Counterparty Mcp Server config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"counterparty": {
"command": "npx",
"args": [
"@21e14/mcp-server"
]
}
}
}
Counterparty Mcp Server tools
-
get_balances
— Get all Counterparty token balances for a Bitcoin address
address:string*, cursor:string, limit:integer, offset:integer -
get_balance
— Get the balance of a specific asset for a Bitcoin address
address:string*, asset:string* -
get_asset_info
— Get metadata for a Counterparty asset (supply, divisibility, issuer, description, etc.)
asset:string* -
get_asset_balances
— Get all balances for a specific asset across all holders
asset:string*, cursor:string, limit:integer, offset:integer -
get_assets
— Search or list Counterparty assets
named:boolean, cursor:string, limit:integer, offset:integer -
get_issuances
— Get the issuance history for a Counterparty asset
asset:string*, cursor:string, limit:integer, offset:integer -
get_owned_assets
— Get all assets issued/owned by a specific address
address:string*, cursor:string, limit:integer, offset:integer -
get_orders
— Get orders on the Counterparty DEX (default: open)
status:string, cursor:string, limit:integer, offset:integer -
get_order
— Get details of a specific DEX order by its transaction hash
order_hash:string* -
get_order_matches
— Get matches for a specific DEX order
order_hash:string*, status:string, cursor:string, limit:integer, offset:integer -
get_orders_by_pair
— Get the order book for a specific trading pair on the DEX
asset1:string*, asset2:string*, status:string, cursor:string, limit:integer, offset:integer -
get_asset_orders
— Get all DEX orders involving a specific asset
asset:string*, status:string, cursor:string, limit:integer, offset:integer -
get_address_orders
— Get all DEX orders placed by a specific address
address:string*, status:string, cursor:string, limit:integer, offset:integer -
get_dispensers
— Get Counterparty dispensers (default: open)
status:string, cursor:string, limit:integer, offset:integer -
get_dispenser
— Get details of a specific dispenser by its transaction hash
hash:string* -
get_dispensers_by_asset
— Get dispensers for a specific asset (default: open)
asset:string*, status:string, cursor:string, limit:integer, offset:integer -
get_address_dispensers
— Get all dispensers created by a specific address
address:string*, status:string, cursor:string, limit:integer, offset:integer -
get_dispenses
— Get dispense records (purchases) for a specific dispenser
hash:string*, cursor:string, limit:integer, offset:integer -
get_dividends
— Get dividend distributions for a specific asset
asset:string*, cursor:string, limit:integer, offset:integer -
get_address_transactions
— Get transaction history for a Bitcoin address on Counterparty
address:string*, cursor:string, limit:integer, offset:integer -
get_sends
— Get all sends (token transfers) from a specific address
address:string*, cursor:string, limit:integer, offset:integer -
get_transaction
— Get details of a specific Counterparty transaction by its hash
tx_hash:string* -
get_utxo_balances
— Get Counterparty token balances attached to a specific UTXO
utxo:string* -
get_latest_block
— Get the latest block information from the Counterparty node
(no parameters) -
compose_send
— Compose a transaction to send Counterparty tokens to an address
address:string*, destination:string*, asset:string*, quantity:integer*, memo:string, memo_is_hex:boolean, no_dispense:boolean, sat_per_vbyte:number, inputs_set:string -
compose_mpma
— 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.
address:string*, assets:string*, destinations:string*, quantities:string*, memo:string, memo_is_hex:boolean, sat_per_vbyte:number, inputs_set:string -
compose_order
— 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).
address:string*, give_asset:string*, give_quantity:integer*, get_asset:string*, get_quantity:integer*, expiration:integer*, fee_required:integer, sat_per_vbyte:number, inputs_set:string -
compose_cancel
— Compose a transaction to cancel an open DEX order
address:string*, offer_hash:string*, sat_per_vbyte:number, inputs_set:string -
compose_btcpay
— Compose a BTC payment for a matched DEX order. Used to complete BTC trades on the DEX.
address:string*, order_match_id:string*, sat_per_vbyte:number, inputs_set:string -
compose_issuance
— Compose a transaction to issue (create) a new Counterparty asset, or update an existing one.
address:string*, asset:string*, quantity:integer*, divisible:boolean, description:string, transfer_destination:string, lock:boolean, reset:boolean, inscription:string, mime_type:string, sat_per_vbyte:number, inputs_set:string, … -
compose_dispenser
— Compose a transaction to create, open, or close a dispenser. Dispensers automatically sell tokens for BTC.
address:string*, asset:string*, give_quantity:integer*, escrow_quantity:integer*, mainchainrate:integer*, status:integer, open_address:string, sat_per_vbyte:number, inputs_set:string -
compose_dispense
— Compose a transaction to buy from a dispenser by sending BTC to it
address:string*, dispenser:string*, quantity:integer*, sat_per_vbyte:number, inputs_set:string -
compose_dividend
— Compose a transaction to distribute dividends to all holders of an asset
address:string*, asset:string*, dividend_asset:string*, quantity_per_unit:integer*, sat_per_vbyte:number, inputs_set:string -
compose_broadcast
— Compose a transaction to broadcast a text message or numeric value to the Counterparty network
address:string*, text:string*, value:number, fee_fraction:number, timestamp:integer, inscription:string, mime_type:string, sat_per_vbyte:number, inputs_set:string -
compose_sweep
— Compose a transaction to sweep all assets and/or BTC from one address to another
address:string*, destination:string*, flags:integer, memo:string, sat_per_vbyte:number, inputs_set:string -
compose_destroy
— Compose a transaction to permanently destroy (burn) Counterparty tokens
address:string*, asset:string*, quantity:integer*, tag:string, sat_per_vbyte:number, inputs_set:string -
compose_fairminter
— Compose a transaction to create a fair minting launch for a new asset. For XCP-420 compliant launches, use compose_xcp420_fairminter instead.
address:string*, asset:string*, price:integer, quantity_by_price:integer, max_mint_per_tx:integer, max_mint_per_address:integer, hard_cap:integer, soft_cap:integer, soft_cap_deadline_block:integer, divisible:boolean, start_block:integer, end_block:integer, … -
compose_xcp420_fairminter
— 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.
address:string*, asset:string*, start_block:integer*, description:string, sat_per_vbyte:number, inputs_set:string -
compose_fairmint
— Compose a transaction to mint tokens from an active fair minter
address:string*, asset:string*, quantity:integer, sat_per_vbyte:number, inputs_set:string -
compose_attach
— Compose a transaction to attach Counterparty tokens to a specific UTXO
address:string*, asset:string*, quantity:integer*, destination_vout:integer, sat_per_vbyte:number, inputs_set:string -
compose_detach
— Compose a transaction to detach Counterparty tokens from a UTXO back to an address
utxo:string*, destination:string*, sat_per_vbyte:number -
compose_movetoutxo
— Compose a transaction to move a UTXO (and any attached tokens) to a new output
utxo:string*, destination:string, sat_per_vbyte:number -
broadcast_transaction
— Broadcast a signed Bitcoin transaction to the network via the Counterparty node
raw_transaction:string* -
get_fee_estimate
— 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.
conf_target:integer -
decode_transaction
— Decode a raw Bitcoin transaction hex into its components (inputs, outputs, etc.)
raw_transaction:string* -
unpack_transaction
— Decode and unpack a Counterparty message from a raw transaction, revealing the embedded Counterparty data
raw_transaction:string*, block_index:integer -
get_server_info
— Get Counterparty node status, version, and network information
(no parameters) -
api_request
— 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"
endpoint:string*, method:string, params:object
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
Frequently asked questions
1 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.
2 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.
3 Which Bitcoin address types are supported for signing?
P2WPKH (bc1q...), P2SH-P2WPKH (3...), and P2TR (bc1p...) are supported. Legacy P2PKH is not supported.
4 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.
5 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
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In