XCP

io.github.XCP由 GitHub 帳號 XCP 發布v1.0.1更新於 Oct 25, 2026

Interact with Counterparty — the token protocol on Bitcoin. Query, compose, sign.

已驗證STDIO僅桌面資料庫金融

概覽

AI 產生的概覽

一個本機 MCP 伺服器,讓助理查詢比特幣上的 Counterparty 代幣協定,並組合、簽署與廣播交易。

可以做什麼
查詢地址與代幣的餘額、資產資訊、發行紀錄、持有者與已發行資產。瀏覽去中心化交易所訂單、訂單簿、訂單撮合、dispenser、購買紀錄、股利、轉帳與交易歷史。組合未簽署交易:轉帳、多資產轉帳、下單、撤單、BTC 付款、資產發行、dispenser、股利、廣播、掃掠、銷毀、公平發行以及 UTXO 附加/分離/移動。簽署並廣播交易、廣播已簽署交易、估算手續費、解碼原始交易十六進位。解碼 Counterparty 訊息、查看節點狀態、發出原始 API 請求,並讀取內附的協定、XCP-420 與快速入門文件。
適用情境
當你希望助理檢視 Counterparty 的資產、市場與 dispenser,或準備並視需要送出比特幣上的 Counterparty 交易時使用。僅組合模式適合想取得未簽署交易十六進位、自行審核並用自有工具簽署的使用者。
執行需求
透過 npx(Node.js)以 stdio 在桌面 MCP 用戶端本機執行。選用環境變數:COUNTERPARTY_NODE(預設指向公開 Counterparty API 節點),以及用於簽署的 SIGNER_ADDRESS 與 SIGNER_PRIVATE_KEY。需要能連線至 Counterparty 節點的網路。
安裝前請注意
啟用簽署後助理可動用所設定錢包中的資金;README 建議使用全新、僅存入少量資金的 segwit 機器人錢包,主要資產另存他處。SIGNER_PRIVATE_KEY 是 WIF 私鑰,以明文環境變數傳入。組合與廣播類工具會產生真實的鏈上交易,api_request 可呼叫任意端點。未設定簽署金鑰時,伺服器只回傳未簽署交易十六進位。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 XCP,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Counterparty MCP Server

Give AI agents the ability to interact with Counterparty — the token protocol built on Bitcoin. Query balances, assets, orders, and dispensers. Compose, sign, and broadcast transactions. Works with any MCP-compatible client.

[npm]

Install

No download needed — just add the config below to your AI client. npx fetches and runs the server automatically.

Claude Desktop

Add to claude_desktop_config.json (how to find it):

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

Claude Code

bash
claude mcp add counterparty -- npx -y @21e14/mcp-server

With signing (see Signing & Broadcasting):

bash
claude mcp add counterparty \  -e SIGNER_PRIVATE_KEY=L1aW4aubDFB7yfras2S1mN... \  -e SIGNER_ADDRESS=bc1q... \  -- npx -y @21e14/mcp-server

Manage servers with claude mcp list, claude mcp get counterparty, or claude mcp remove counterparty.

VS Code (Copilot)

Use Ctrl+Shift+P → MCP: Add Server → Stdio, then enter:

npx -y @21e14/mcp-server

Or add to .vscode/mcp.json:

json
{  "servers": {    "counterparty": {      "type": "stdio",      "command": "npx",      "args": ["-y", "@21e14/mcp-server"]    }  }}

Cursor

Add to .cursor/mcp.json:

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

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

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

ChatGPT

In ChatGPT desktop, go to Settings → Beta Features → MCP Servers, then add:

npx -y @21e14/mcp-server

Any MCP Client

The server speaks stdio. Point any MCP-compatible client at:

bash
npx -y @21e14/mcp-server

That's it. The agent can now query the Counterparty network and compose unsigned transactions.

Signing & Broadcasting

To let the agent sign and broadcast transactions, add a signing key:

json
{  "mcpServers": {    "counterparty": {      "command": "npx",      "args": ["-y", "@21e14/mcp-server"],      "env": {        "SIGNER_PRIVATE_KEY": "L1aW4aubDFB7yfras2S1mN...",        "SIGNER_ADDRESS": "bc1q..."      }    }  }}

This enables the sign_and_broadcast tool. Signing gives the AI agent the ability to spend funds — read the security guidance below.

Bot wallet pattern (recommended)

  1. Generate a fresh keypair offline. Don't reuse an existing wallet or generate keys through the AI.
  2. Fund it with only what you're willing to risk. This is your blast radius.
  3. Use a segwit address. P2WPKH (bc1q...), P2SH-P2WPKH (3...), or P2TR (bc1p...). Legacy P2PKH is not supported.
  4. One key, one address. No HD derivation. Counterparty reuses addresses by design.
  5. Keep main holdings elsewhere. The bot wallet is disposable.

Compose-only mode

Without signing keys, the server returns unsigned transaction hex from all compose tools. You can review and sign offline with your own tooling. This is the safest mode.

Transaction verification

sign_and_broadcast extracts and returns the embedded OP_RETURN data from the transaction before signing — done locally without trusting the API, so the agent can verify the transaction matches what was requested.

Environment Variables

VariableRequiredDescription
COUNTERPARTY_NODENoCounterparty node URL (default: https://api.counterparty.io:4000)
SIGNER_PRIVATE_KEYNoWIF-encoded private key for signing
SIGNER_ADDRESSNoBitcoin address for the signing key

Tools

Query (24)

ToolDescription
get_balancesAll token balances for an address
get_balanceSingle asset balance for an address
get_asset_infoAsset metadata (supply, divisibility, issuer)
get_asset_balancesAll holders of an asset
get_assetsSearch/list assets
get_issuancesIssuance history for an asset
get_owned_assetsAssets issued by an address
get_ordersDEX orders
get_orderSingle order by hash
get_order_matchesMatches for an order
get_orders_by_pairOrder book for a trading pair
get_asset_ordersOrders involving an asset
get_address_ordersOrders by address
get_dispensersDispensers
get_dispenserSingle dispenser by hash
get_dispensers_by_assetDispensers for an asset
get_address_dispensersDispensers by address
get_dispensesPurchases from a dispenser
get_dividendsDividend distributions for an asset
get_address_transactionsTransaction history for an address
get_sendsToken transfers from an address
get_transactionSingle transaction by hash
get_utxo_balancesTokens attached to a UTXO
get_latest_blockLatest block info

Compose (18)

ToolDescription
compose_sendSend tokens to an address
compose_mpmaMulti-party multi-asset send
compose_orderPlace a DEX order
compose_cancelCancel an open order
compose_btcpayPay for a matched BTC order
compose_issuanceCreate or update an asset (supports inscriptions)
compose_dispenserCreate, open, or close a dispenser
compose_dispenseBuy from a dispenser
compose_dividendDistribute dividends to holders
compose_broadcastBroadcast a message (supports inscriptions)
compose_sweepSweep all assets to a destination
compose_destroyPermanently burn tokens
compose_fairminterCreate a fair launch (supports inscriptions)
compose_xcp420_fairminterXCP-420 compliant fair launch
compose_fairmintMint from an active fair launch
compose_attachAttach tokens to a UTXO
compose_detachDetach tokens from a UTXO
compose_movetoutxoMove a UTXO to a new output

Bitcoin (4)

ToolDescription
sign_and_broadcastSign and broadcast (requires signing keys)
broadcast_transactionBroadcast an already-signed transaction
get_fee_estimateCurrent fee rate estimate
decode_transactionDecode raw transaction hex

Utility (3)

ToolDescription
unpack_transactionDecode a Counterparty message from a transaction
get_server_infoNode status and version
api_requestRaw API request to any endpoint (full API reference)

Resources

The server includes protocol documentation that agents can read for context:

  • counterparty://protocol-overview — Assets, quantities, DEX, dispensers, fair minting, fees, and operational tips
  • counterparty://xcp420-standard — XCP-420 fair launch standard
  • counterparty://quick-start — Step-by-step workflows for common operations

Development

bash
git clone https://github.com/XCP/mcp-server.gitcd mcp-servernpm installnpm test

Test locally:

json
{  "mcpServers": {    "counterparty": {      "command": "node",      "args": ["/path/to/mcp-server/dist/index.js"]    }  }}

License

MIT

來源:README.md,提交 7391d71

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分