XCP
MCP server letting AI agents query, compose and sign Counterparty (Bitcoin token protocol)
XCP is an open-source MCP server for crypto and web3. It runs locally on your machine and is started by your AI client.
- Pricing
- Open source
- Platforms
- CLI, API, Self-hosted
- Runs
- Locally
- Version
- 1.0.1
- Listing updated
Similar MCP servers
Install
Run in a terminal
claude mcp add mcp-server --env SIGNER_PRIVATE_KEY='<SIGNER_PRIVATE_KEY>' -- npx -y @21e14/mcp-serverAdd to claude_desktop_config.json
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@21e14/mcp-server"
],
"env": {
"SIGNER_PRIVATE_KEY": "<SIGNER_PRIVATE_KEY>"
}
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@21e14/mcp-server"
],
"env": {
"SIGNER_PRIVATE_KEY": "<SIGNER_PRIVATE_KEY>"
}
}
}
}Add to .vscode/mcp.json
{
"servers": {
"mcp-server": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@21e14/mcp-server"
],
"env": {
"SIGNER_PRIVATE_KEY": "<SIGNER_PRIVATE_KEY>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@21e14/mcp-server"
],
"env": {
"SIGNER_PRIVATE_KEY": "<SIGNER_PRIVATE_KEY>"
}
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@21e14/mcp-server"
],
"env": {
"SIGNER_PRIVATE_KEY": "<SIGNER_PRIVATE_KEY>"
}
}
}
}Using several servers? Build one config file with the MCP config generator.
Configuration
COUNTERPARTY_NODECounterparty node URL (default: https://api.counterparty.io:4000)SIGNER_PRIVATE_KEYWIF-encoded private key for transaction signingSIGNER_ADDRESSBitcoin address for the signing key
About XCP
The README describes this as a way to give AI agents access to Counterparty, a token protocol built on Bitcoin. It exposes read tools for balances, assets, DEX orders, dispensers and dispenses, alongside compose tools that build unsigned transaction hex for sends, orders, issuances, dispensers and fair launches.
Signing is optional. Without a WIF private key and signer address in the environment, the server only returns unsigned hex that can be reviewed and signed offline. When a key is supplied, a sign_and_broadcast tool becomes available, and the README says the embedded OP_RETURN data is decoded locally before signing so the agent can check the transaction against the request.
The README is direct that signing lets an agent spend funds and recommends a disposable bot wallet with a single segwit address, funded only with an amount the user can afford to lose. It is aimed at developers and operators building agent workflows on Counterparty, and it installs via npx in clients such as Claude Desktop, Claude Code, VS Code, Cursor and Windsurf.
Tools this server provides (49)
Taken from the project documentation; the running server may differ.
- get_balances
- All token balances for an address
- get_balance
- Single asset balance for an address
- get_asset_info
- Asset metadata (supply, divisibility, issuer)
- get_asset_balances
- All holders of an asset
- get_assets
- Search/list assets
- get_issuances
- Issuance history for an asset
- get_owned_assets
- Assets issued by an address
- get_orders
- DEX orders
- get_order
- Single order by hash
- get_order_matches
- Matches for an order
- get_orders_by_pair
- Order book for a trading pair
- get_asset_orders
- Orders involving an asset
- get_address_orders
- Orders by address
- get_dispensers
- Dispensers
- get_dispenser
- Single dispenser by hash
- get_dispensers_by_asset
- Dispensers for an asset
- get_address_dispensers
- Dispensers by address
- get_dispenses
- Purchases from a dispenser
- get_dividends
- Dividend distributions for an asset
- get_address_transactions
- Transaction history for an address
- get_sends
- Token transfers from an address
- get_transaction
- Single transaction by hash
- get_utxo_balances
- Tokens attached to a UTXO
- get_latest_block
- Latest block info
- compose_send
- Send tokens to an address
- compose_mpma
- Multi-party multi-asset send
- compose_order
- Place a DEX order
- compose_cancel
- Cancel an open order
- compose_btcpay
- Pay for a matched BTC order
- compose_issuance
- Create or update an asset (supports inscriptions)
- compose_dispenser
- Create, open, or close a dispenser
- compose_dispense
- Buy from a dispenser
- compose_dividend
- Distribute dividends to holders
- compose_broadcast
- Broadcast a message (supports inscriptions)
- compose_sweep
- Sweep all assets to a destination
- compose_destroy
- Permanently burn tokens
- compose_fairminter
- Create a fair launch (supports inscriptions)
- compose_xcp420_fairminter
- XCP-420 compliant fair launch
- compose_fairmint
- Mint from an active fair launch
- compose_attach
- Attach tokens to a UTXO
- compose_detach
- Detach tokens from a UTXO
- compose_movetoutxo
- Move a UTXO to a new output
- sign_and_broadcast
- Sign and broadcast (requires signing keys)
- broadcast_transaction
- Broadcast an already-signed transaction
- get_fee_estimate
- Current fee rate estimate
- decode_transaction
- Decode raw transaction hex
- unpack_transaction
- Decode a Counterparty message from a transaction
- get_server_info
- Node status and version
- api_request
- Raw API request to any endpoint
What it does
- Read-only chain queries
- Twenty-four query tools cover balances, assets, orders, order matches, dispensers and transaction history.
- Unsigned transaction composition
- Eighteen compose tools return unsigned transaction hex for sends, DEX orders, issuances, dispensers and fair mints.
- Optional signing and broadcasting
- A signing key in the environment enables a sign_and_broadcast tool; without it the server stays compose-only.
- Local OP_RETURN verification
- Embedded Counterparty data is extracted and shown locally before signing, so the agent can check what it is signing.
- Protocol documentation resources
- Built-in resources cover the protocol overview, the XCP-420 fair launch standard and common workflows.
Good for
- Checking token balances and holders for a Bitcoin address or asset
- Browsing DEX order books and dispensers for a Counterparty asset
- Drafting unsigned Counterparty transactions for offline review and signing
- Running a small disposable bot wallet that makes scripted token transfers
Pricing
Open source
Free and MIT licensed; run locally via npx.
XCP FAQ
Does the server need a private key to work?
No. Without SIGNER_PRIVATE_KEY and SIGNER_ADDRESS it returns unsigned transaction hex from compose tools, which the README calls the safest mode.
Which address types can sign transactions?
The README says segwit addresses are used: P2WPKH (bc1q), P2SH-P2WPKH (3...) and P2TR (bc1p). Legacy P2PKH is not supported.
Which Counterparty node does XCP use by default?
It uses https://api.counterparty.io:4000 unless COUNTERPARTY_NODE is set to another node URL.
What license is XCP under?
The README states the MIT license.
Is XCP free?
Yes. XCP is open source, so you can use and self-host it for free.
How do I add XCP to Claude Code?
Run this command in your terminal: claude mcp add mcp-server --env SIGNER_PRIVATE_KEY='<SIGNER_PRIVATE_KEY>' -- npx -y @21e14/mcp-server
What are the best alternatives to XCP?
The closest alternatives to XCP are Universal Blockchain MCP, Tychi MCP, Semiosis, Onv MCP and MCP Agentic Wallet — open-source session management for x402.
Where this comes from
- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.
