
Aibtcdev
io.github.aibtcdev由 GitHub 帳號 aibtcdev 發布v1.17.0更新於 Oct 27, 2026
Bitcoin-native MCP server for AI agents: BTC/STX wallets, DeFi yield, sBTC peg, NFTs, x402 payments.
概覽
面向比特幣與 Stacks 的錢包 MCP 伺服器,讓 AI 代理擁有自己的加密錢包,轉帳 BTC/STX/sBTC、參與 DeFi 並支付 x402 介面。
- 可以做什麼
- 建立、匯入、解鎖、切換與匯出代理錢包,查詢餘額與地址
- 發送 BTC、STX、sBTC 及 SIP-010 代幣,管理 UTXO、手續費與記憶池狀態
- 處理 NFT、銘文、PSBT、BNS .btc 網域與訊息簽章
- 在 ALEX、Zest、Bitflow 上兌換與借貸,質押 STX 並領取 sBTC 獎勵
- 查詢鏈上資料、呼叫或部署 Clarity 合約,執行自動收益獵手
- 探索並支付 x402 介面、發送付費代理收件匣訊息、瀏覽 TaskMarket 任務
- 適用情境
- 適合希望代理真的在比特幣與 Stacks 上執行交易、而不只是讀取資料的情境,例如持有自己的錢包、為 x402 介面付費、兌換或借貸、管理銘文與 BNS 網域。可先用測試網模式實驗,再接觸主網資金。
- 執行需求
- 透過 npx 以 stdio 在本機執行,需要 Node.js。選用環境變數包括 NETWORK(mainnet 或 testnet)、AIBTC_TOOLS 工具設定、CLIENT_MNEMONIC、用於提高速率上限的 HIRO_API_KEY,以及 SPEND_LIMIT_* 額度。安裝程式會寫入用戶端設定檔,並在互動式終端中產生錢包、密碼與 24 個助記詞。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Aibtcdev,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
@aibtc/mcp-server
Bitcoin-native MCP server for AI agents: BTC/STX wallets, DeFi yield, sBTC peg, NFTs, and x402 payments.
Features
- Bitcoin L1 - Check balances, send BTC, manage UTXOs via mempool.space
- Agent's Own Wallet - Agents get their own wallet to perform blockchain transactions
- Secure Storage - Wallets encrypted with AES-256-GCM and stored locally
- 350+ Tools - Bitcoin L1 + comprehensive Stacks L2 operations
- sBTC Support - Native Bitcoin on Stacks operations
- Token Operations - SIP-010 fungible token transfers and queries
- NFT Support - SIP-009 NFT holdings, transfers, and metadata
- DeFi Trading - ALEX DEX swaps and Zest Protocol lending/borrowing
- Stacking/PoX-5 - Stake STX with a signer manager, extend, unstake, claim sBTC rewards
- BNS Domains - .btc domain lookups and management (V1 + V2)
- x402 Payments - Automatic payment handling for paid APIs
Quick Start
Claude Code (Terminal)
This configures Claude Code and creates the agent's wallet: it prints the Stacks and Bitcoin addresses, a generated password and the 24-word mnemonic once. Write both down. The mnemonic is stored only encrypted (AES-256-GCM) in ~/.aibtc/ on this machine, and the password is not saved anywhere; the agent asks for it to unlock, and you can change it with wallet_rotate_password. If a wallet for the network already exists it is kept. The wallet is only created when the install runs in an interactive terminal (never into a pipe or CI log). Pass --no-wallet to skip it and create or import one from the agent instead.
Restart your terminal, send a little STX to the printed address, and ask the agent to unlock the wallet and make a paid inference call.
Claude Desktop (App)
This detects your OS and writes to the correct Claude Desktop config file:
Restart Claude Desktop after installing.
Other MCP Clients
This is a standard stdio MCP server, so it works with any MCP-compatible client. Claude Code is the default --install target; select another client with a flag:
Each installer merges into the existing config — it won't clobber other servers or settings. Restart the client afterward.
OpenRouter (any model)
The clients above are MCP hosts — they connect to this server for you. To drive the tools with an OpenRouter model instead, the server ships a built-in bridge: it spawns itself in server mode, exposes the tools to the model as function tools, and runs the tool-call loop. This is the client-side pattern from OpenRouter's MCP cookbook, packaged into the binary.
Safety flags (this server moves real funds, so the bridge defaults to nothing extra and lets you constrain it):
Before any agent loop runs (and on --list-tools), the bridge prints a compact safety receipt to stderr — network, read-only mode, exposed/write/blocked tool counts, the session spend cap, and the number of known x402 endpoints — so the configured execution boundaries are visible up front. It reports boundaries only; it never claims any value moved.
The allowlist is re-enforced at execution time, so a model can never call a tool outside the exposed set. Any MCP-capable agent framework (@openrouter/agent, OpenAI Agents SDK, Claude Agent SDK) can also point at this server directly — the bridge is for driving it through OpenRouter's raw API without adopting a framework.
Testnet Mode
Add --testnet to any install command:
Why npx? Using
npx @aibtc/mcp-server@latestensures you always get the newest version automatically. Global installs (npm install -g) won't auto-update.
Tool Profiles
Every tool definition is loaded into the model's context, so --install writes AIBTC_TOOLS=core: a lean core of 26 tools: wallet (including wallet_rotate_password; wallet_export is in the wallet group so the mnemonic isn't one call away), balances, STX/BTC/sBTC transfers, x402 (list_x402_endpoints, probe_x402_endpoint, execute_x402_endpoint) earning (earning_opportunities, bounty_list/get/submit, identity_register) and inbox auto-reply (inbox_auto_reply, inbox_auto_reply_configure).
Add groups with AIBTC_TOOLS=core,defi,ordinals in the server's env (the core is always included), or load everything with AIBTC_TOOLS=all / --profile full. If AIBTC_TOOLS is not set at all, every tool is loaded, so configs written by earlier versions keep all their tools:
The server's instructions list the groups that are off, so the agent can tell you which one to enable. The OpenRouter bridge starts from the full set and narrows it with its own --read-only/--allow/--block flags.
Manual Configuration
If you prefer to configure manually, add the following to your client's config file. The -y flag stops npx from prompting for confirmation.
Claude Code / Claude Desktop / Cursor / Windsurf / Gemini CLI — mcpServers JSON:
VS Code (.vscode/mcp.json) — uses a servers key and a typed entry:
OpenAI Codex CLI (~/.codex/config.toml) — TOML, not JSON:
Zed (settings.json) — uses a context_servers key:
Cline / Roo Code (VS Code extension) — add the same mcpServers JSON block above via the extension's MCP settings panel (the exact cline_mcp_settings.json path varies by OS and VS Code build).
Any other MCP client works too — point it at
npx -y @aibtc/mcp-server@latestover stdio withNETWORKin the env.
Giving Claude a Wallet
--install creates a wallet for you (see Quick Start). If you installed with --no-wallet, configured the client by hand, or want another wallet, the agent can create or import one:
Example Conversation
Wallet States
Session Management
- By default, the wallet auto-locks after 15 minutes
- You can change this with
wallet_set_timeout(set to 0 to disable) - Use
wallet_lockto manually lock the wallet - Use
wallet_unlockwhen you need Claude to transact again
Wallet Storage
Claude's wallets are stored locally on your machine:
Security:
- AES-256-GCM encryption with Scrypt key derivation
- Password required to unlock
- Mnemonics never stored in plaintext
- File permissions set to owner-only (0600)
Bitcoin L1 Support
Each wallet automatically derives both a Stacks address and a Bitcoin address from the same mnemonic using BIP39/BIP32 standards.
Derivation Paths (BIP84):
- Mainnet:
m/84'/0'/0'/0/0(Bitcoin coin type 0) - Testnet:
m/84'/1'/0'/0/0(Bitcoin testnet coin type 1)
Address Format:
- Mainnet:
bc1q...(Native SegWit P2WPKH) - Testnet:
tb1q...(Native SegWit P2WPKH)
Capabilities:
- Full Bitcoin L1 transaction support (send BTC)
- Balance and UTXO queries via mempool.space API
- Fee estimation (fast/medium/slow)
- P2WPKH (native SegWit) transactions for optimal fees
Example:
Both addresses are derived from the same recovery phrase, making it easy to manage both Layer 1 (Bitcoin) and Layer 2 (Stacks) assets.
Available Tools (350+ total)
Wallet Management
Bitcoin L1
Mempool Watch (Bitcoin)
Bitcoin Inscriptions
PSBT & Ordinals Trading
Message Signing
Wallet & Balance
STX Transfers
sBTC Operations
Token Operations (SIP-010)
NFT Operations (SIP-009)
Stacking / PoX
BNS Domains (V1 + V2)
Smart Contracts
DeFi - ALEX DEX (Mainnet)
Uses the official alex-sdk for swap operations. Supports simple token symbols like "STX", "ALEX".
DeFi - Zest Protocol (Mainnet)
Supports 10 assets: sBTC, aeUSDC, stSTX, wSTX, USDH, sUSDT, USDA, DIKO, ALEX, stSTX-BTC
DeFi - Bitflow DEX (Mainnet)
DEX aggregator that routes trades across multiple liquidity sources.
Units: Bitflow tools default to human units (
amountUnit: "human"). Pass"2"to swap 2 STX, not"2000000". SetamountUnit: "base"only when working with raw on-chain integers. See Units & Decimals guide for details and common pitfalls.
Pillar Smart Wallet
sBTC smart wallet with Zest Protocol integration and passkey authentication.
For autonomous agents, use pillar_direct_* tools (no browser needed).
Blockchain Queries
Yield Hunter (Autonomous)
x402 API Endpoints
TaskMarket (Work Marketplace on Base)
Read-only discovery of onchain agent work on TaskMarket (USDC escrow on Base). The tools are public and anonymous: no wallet, no spend.
Inbox Messaging (aibtc.com)
Usage Examples
Wallet management:
"What's your wallet address?" "Create a wallet for yourself" "Unlock your wallet" "Keep your wallet unlocked for 1 hour"
Check balances:
"How much STX do you have?" "What's your sBTC balance?"
Transfer tokens:
"Send 2 STX to ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM" "Transfer 0.001 sBTC to muneeb.btc"
NFTs:
"What NFTs do you own?" "Send this NFT to alice.btc"
BNS domains:
"What address is satoshi.btc?" "Is myname.btc available?"
DeFi trading (mainnet):
"What pools are available on ALEX?" "Swap 0.1 STX for ALEX" "Get a quote for 100 STX to ALEX" "What assets can I lend on Zest?" "Supply 100 stSTX to Zest" "Borrow 50 aeUSDC from Zest" "Check my Zest position"
x402 endpoints:
"Get trending liquidity pools" "Tell me a dad joke"
Supported Tokens
Well-known tokens can be referenced by symbol:
- sBTC - Native Bitcoin on Stacks
- USDCx - USD Coin on Stacks
- ALEX - ALEX governance token
- wSTX - Wrapped STX
ALEX DEX tokens: STX, ALEX, and any token from alex_list_pools
Zest Protocol assets: sBTC, aeUSDC, stSTX, wSTX, USDH, sUSDT, USDA, DIKO, ALEX, stSTX-BTC
Or use any SIP-010 token by contract ID: SP2X...::token-name
Configuration
Note on NETWORK: The --install command writes NETWORK=mainnet by default (pass --testnet to use testnet). If you omit NETWORK from your config entirely, the runtime fallback is also mainnet.
Note on spending limits: A default-on safety rail meters every STX, sBTC and BTC spend (transfers, contract calls, sponsored transactions, x402/L402 auto-payments, Bitcoin broadcasts, psbt_sign) against a cumulative per-session and per-day cap, so a single bad instruction or a malicious endpoint can't drain the wallet. A spend over the cap is blocked before it is signed or broadcast, and the agent is told to ask you. Raise the caps via the env vars above, or disable with SPEND_LIMIT_ENABLED=false. The limit runs inside the server: it does not contain an agent with shell access to your machine, so keep spend tools out of your client's auto-approve list. See SECURITY.md.
Note: CLIENT_MNEMONIC is optional. The recommended approach is to let Claude create its own wallet. HIRO_API_KEY is optional but recommended for production use — without it, you may hit Hiro's public rate limits (429 responses). Get a key at platform.hiro.so.
Note on Hiro rate limits: without a key, Hiro allowed 20 requests per second and 50 per minute per client when measured on 2026-10-23 (response headers below). The per-minute budget is the one an agent usually exhausts first. A single tool call can make several Hiro requests, so 50 a minute goes quickly in a busy session. Every Hiro response reports both budgets, so you can check the current values yourself:
On a 429 the server waits for Retry-After (60s if Hiro sends none, and at least 1s, 2s, then 4s) and retries up to three times before surfacing a rate-limit error (src/services/hiro-api.ts). Retrying before that time just returns another 429. Hiro can change these limits, so treat the numbers as a snapshot and the headers as the source of truth.
Architecture
Security Notes
- Claude's wallet is stored encrypted on YOUR machine
- Password is never stored - only the encrypted keystore
- Mnemonics shown only once at creation
- Auto-lock after 15 minutes (configurable)
- Transactions signed locally before broadcast
- Spending limit (default-on): outbound spends are capped per session and per day so a single bad instruction can't drain the wallet — see Configuration
- Secret-scanning pre-commit hook: contributors get a hook (auto-installed via
npm install) that blocks committing a seed phrase or private key - For mainnet: Fund with small amounts first
See SECURITY.md for the full wallet-key protection model and key-leak recovery steps.
Advanced: Pre-configured Mnemonic
For automated setups where Claude needs immediate wallet access, add the CLIENT_MNEMONIC environment variable to your MCP server config (in ~/.claude.json for Claude Code, or claude_desktop_config.json for Claude Desktop):
This bypasses the wallet creation flow - Claude has immediate access to transact.
Agent Skill
This package includes an Agent Skills compatible skill that teaches any LLM how to use the Bitcoin wallet capabilities effectively.
What is it?
The aibtc-bitcoin-wallet skill provides:
- Structured workflows for Bitcoin L1 operations (balance, send, fees)
- Reference guides for Pillar smart wallets and Stacks L2 DeFi
- LLM-agnostic instructions that work with Claude Code, Cursor, Codex, and 20+ other tools
Using the Skill
The skill is automatically included when you install the MCP server. Find it at:
- Local:
node_modules/@aibtc/mcp-server/skill/SKILL.md - ClawHub: clawhub.ai/skills - search for
aibtc-bitcoin-wallet
Skill Structure
Development
Releases
This repo uses Release Please for automated releases:
- Merge PRs with conventional commits (
feat:,fix:, etc.) - Release Please creates a Release PR with changelog
- Merge the Release PR to publish
Repository Secrets (Maintainers)
To obtain a ClawHub API token, visit clawhub.ai and create an account.
License
MIT
來源:README.md,提交 1a122e6
工具
0版本歷史
1- v1.17.0最新Sep 16, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。