Overview
Add Model Context Protocol (MCP) server support to enable Nod.ie to interact with external tools and services through voice commands. This will allow users to perform actions like Lightning Network operations, file management, and API interactions through natural conversation.
Background
- MCP is an open standard by Anthropic for AI-tool communication
- Unmute doesn't have native tool calling, but the underlying LLM supports it
- Integration requires intercepting LLM calls and handling tool execution
Architecture Design
1. New Module: modules/mcp-bridge.js
- MCP client implementation
- Server discovery and connection management
- Tool execution with error handling
- Response formatting for voice
2. LLM Wrapper Service
- Intercept Unmute's vLLM calls
- Parse tool calling intents from conversation
- Execute tools and inject results
- Maintain conversation context
3. Configuration Structure
{
"mcpServers": {
"lnd": {
"command": "lightning-mcp-server",
"args": ["--node-url", "localhost:10009"],
"transport": "stdio",
"env": {
"LND_MACAROON_PATH": "~/.lnd/admin.macaroon",
"LND_TLS_CERT_PATH": "~/.lnd/tls.cert"
}
},
"files": {
"command": "file-mcp-server",
"args": ["--root", "~/Documents"],
"transport": "stdio"
}
}
}
Implementation Tasks
Phase 1: MCP Client Foundation
Phase 2: LLM Integration Layer
Phase 3: Voice Optimization
Phase 4: LND MCP Server
Phase 5: User Experience
Example Interactions
User: "What's my Lightning balance?"
Nod.ie: "Let me check your Lightning node... You have 0.05 Bitcoin in your Lightning channels and 0.02 Bitcoin in your on-chain wallet."
User: "Create an invoice for 10,000 sats with memo 'Coffee payment'"
Nod.ie: "I've created a Lightning invoice for 10,000 satoshis. The payment request is... [reads bolt11]. Should I display the QR code?"
User: "List my active channels"
Nod.ie: "You have 3 active channels: One with ACINQ with 2 million sats capacity, one with Lightning Labs with 5 million sats, and one with Voltage with 1 million sats."
Technical Considerations
Security
- MCP servers run in separate processes
- Macaroon/cert authentication for LND
- User confirmation for payments
- Rate limiting on sensitive operations
Performance
- Tool calls add latency to responses
- Cache frequently accessed data
- Implement timeouts for long operations
- Stream partial results when possible
Error Handling
- Graceful degradation if MCP servers unavailable
- Voice-friendly error messages
- Retry logic for transient failures
- Clear user feedback on tool status
Dependencies
- MCP protocol implementation
- FastAPI for LLM wrapper
- lightning-mcp-server or custom implementation
- Updated Unmute integration
Testing Plan
- Unit tests for MCP client
- Integration tests with mock MCP servers
- End-to-end voice interaction tests
- LND testnet integration tests
References
This feature will transform Nod.ie from a conversational assistant into an action-capable voice interface for Bitcoin/Lightning operations and beyond.
Overview
Add Model Context Protocol (MCP) server support to enable Nod.ie to interact with external tools and services through voice commands. This will allow users to perform actions like Lightning Network operations, file management, and API interactions through natural conversation.
Background
Architecture Design
1. New Module:
modules/mcp-bridge.js2. LLM Wrapper Service
3. Configuration Structure
{ "mcpServers": { "lnd": { "command": "lightning-mcp-server", "args": ["--node-url", "localhost:10009"], "transport": "stdio", "env": { "LND_MACAROON_PATH": "~/.lnd/admin.macaroon", "LND_TLS_CERT_PATH": "~/.lnd/tls.cert" } }, "files": { "command": "file-mcp-server", "args": ["--root", "~/Documents"], "transport": "stdio" } } }Implementation Tasks
Phase 1: MCP Client Foundation
Phase 2: LLM Integration Layer
Phase 3: Voice Optimization
Phase 4: LND MCP Server
getBalance()- Check Lightning and on-chain balancelistChannels()- List active/inactive channelscreateInvoice(amount, memo)- Generate payment requestspayInvoice(bolt11)- Send Lightning paymentsgetNodeInfo()- Node status and statsPhase 5: User Experience
Example Interactions
Technical Considerations
Security
Performance
Error Handling
Dependencies
Testing Plan
References
This feature will transform Nod.ie from a conversational assistant into an action-capable voice interface for Bitcoin/Lightning operations and beyond.