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 分