Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/AbdelStark/bitcoin-mcp
/ functions
Functions
47 in github.com/AbdelStark/bitcoin-mcp
⨍
Functions
47
◇
Types & classes
35
↓ 4 callers
Method
shutdown
(code?: number)
src/types.ts:114
↓ 2 callers
Function
main
()
src/index.ts:15
↓ 1 callers
Method
decodeInvoice
* ⚡ Decode Lightning Invoice * ======================= * Decodes a BOLT11 invoice and presents human-readable information * * @param bolt1
src/services/bitcoin.ts:278
↓ 1 callers
Method
decodeTx
* 📜 Decode Raw Transaction * ======================= * Parses a raw transaction hex and returns human-readable information * * Returns:
src/services/bitcoin.ts:137
↓ 1 callers
Method
generateKey
* 🔑 Generate a New Bitcoin Key Pair * ================================ * Creates a fresh Bitcoin key pair with: * - Private key (WIF format)
src/services/bitcoin.ts:79
↓ 1 callers
Method
getLatestBlock
* ⛓️ Get Latest Block Information * ============================ * Fetches information about the most recent block * from the Bitcoin network
src/services/bitcoin.ts:173
↓ 1 callers
Method
getTransaction
* 🔍 Get Transaction Details * ======================= * Fetches detailed information about a specific transaction * * @param txid - Transa
src/services/bitcoin.ts:212
↓ 1 callers
Function
handleDecodeInvoice
( bitcoinService: BitcoinService, args: unknown )
src/server/tools.ts:199
↓ 1 callers
Function
handleDecodeTx
( bitcoinService: BitcoinService, args: unknown )
src/server/tools.ts:107
↓ 1 callers
Function
handleGenerateKey
(bitcoinService: BitcoinService)
src/server/tools.ts:52
↓ 1 callers
Function
handleGetLatestBlock
(bitcoinService: BitcoinService)
src/server/tools.ts:142
↓ 1 callers
Function
handleGetTransaction
( bitcoinService: BitcoinService, args: unknown )
src/server/tools.ts:163
↓ 1 callers
Function
handlePayInvoice
( bitcoinService: BitcoinService, args: unknown )
src/server/tools.ts:242
↓ 1 callers
Function
handleValidateAddress
( bitcoinService: BitcoinService, args: unknown )
src/server/tools.ts:73
↓ 1 callers
Method
humanFriendlyInvoice
(decoded: DecodedInvoice)
src/clients/lnbits_clients.ts:58
↓ 1 callers
Method
payInvoice
* ⚡ Pay Lightning Invoice * ==================== * Pays a BOLT11 invoice using LNBits * * @param bolt11 - BOLT11 format Lightning invoice
src/services/bitcoin.ts:306
↓ 1 callers
Method
sendPayment
(bolt11: string)
src/clients/lnbits_clients.ts:36
↓ 1 callers
Method
setupExpressRoutes
* 🛣️ Configure Express Routes * ======================== * Sets up the SSE endpoint and message handling route
src/server/sse.ts:64
↓ 1 callers
Method
setupStdioRedirect
* 🔄 Configure STDIO Redirection * ========================== * Sets up stdout redirection to ensure clean separation of * JSON-RPC messages a
src/server/stdio.ts:53
↓ 1 callers
Method
start
()
src/types.ts:113
↓ 1 callers
Method
toHumanFriendlyInvoice
(bolt11Invoice: string)
src/clients/lnbits_clients.ts:75
↓ 1 callers
Method
tryGetAddress
* Helper function to extract Bitcoin address from output script
src/services/bitcoin.ts:262
↓ 1 callers
Method
validateAddress
* 🔍 Validate Bitcoin Address * ========================= * Checks if a given string is a valid Bitcoin address * for the current network (mai
src/services/bitcoin.ts:114
Function
Feature
({ title, image, description }: FeatureItem)
docs/src/components/HomepageFeatures/index.tsx:45
Function
Home
()
docs/src/pages/index.tsx:32
Function
HomepageFeatures
()
docs/src/components/HomepageFeatures/index.tsx:69
Function
HomepageHeader
()
docs/src/pages/index.tsx:10
Function
constructor
* Creates a new MCP server instance * * @param config - Server configuration including network and API settings * @throws Error if configurat
src/server/base.ts:64
Method
constructor
( message: string, public readonly code: BitcoinErrorCode, public readonly status = 500 )
src/types.ts:92
Method
constructor
( message: string, public readonly code: LightningErrorCode | string, public readonly status?: num
src/types.ts:151
Method
constructor
* Creates a new Bitcoin service instance * * @param config - Configuration including network (mainnet/testnet) and API base URL
src/services/bitcoin.ts:49
Method
constructor
* Creates a new STDIO-based Bitcoin MCP server * * @param config - Bitcoin network configuration
src/server/stdio.ts:41
Method
constructor
* Creates a new SSE-based Bitcoin MCP server * * @param config - Bitcoin network configuration * @param serverConfig - SSE server settings in
src/server/sse.ts:52
Method
constructor
(baseUrl: string, adminKey: string, readKey: string)
src/clients/lnbits_clients.ts:15
Method
customWrite
( str: string | Uint8Array, encodingOrCb?: BufferEncoding | ((err?: Error) => void), cb?: (e
src/server/stdio.ts:55
Method
displayInvoiceDetails
(bolt11Invoice: string)
src/clients/lnbits_clients.ts:80
Function
formatResponse
* 📝 Format Response for MCP * ======================= * Converts any response data into the MCP text content format
src/server/base.ts:236
Method
getWalletInfo
()
src/clients/lnbits_clients.ts:21
Function
handleError
* ⚠️ Handle Errors * ============== * Formats errors into user-friendly MCP responses
src/server/base.ts:252
Function
rng
(size: number)
src/services/bitcoin.ts:37
Function
setupHandlers
* 🎮 Setup Server Event Handlers * =========================== * Configures error handling and graceful shutdown * for the server instance
src/server/base.ts:83
Function
setupToolHandlers
* 🛠️ Register Available Tools * ======================== * Sets up handlers for all supported Bitcoin operations: * - Key Generation * - A
src/server/base.ts:113
Function
shutdown
* 🔄 Graceful Shutdown * ================= * Cleanly shuts down the server and exits
src/server/base.ts:262
Method
shutdown
* 🔄 Graceful Shutdown * ================= * Restores original stdout and cleanly shuts down
src/server/stdio.ts:99
Method
shutdown
* 🔄 Graceful Shutdown * ================= * Cleanly closes SSE connections and shuts down
src/server/sse.ts:97
Method
start
* 🚀 Start STDIO Server * ================= * Initializes the STDIO transport and begins * listening for JSON-RPC messages
src/server/stdio.ts:88
Method
start
* 🚀 Start SSE Server * ================ * Begins listening for SSE connections and messages
src/server/sse.ts:86