THAMER
Sovereign Bitcoin Wallet

WALLET AI BITCOIN

Your Bitcoin Wallet. Your Keys. Your Engine.

Self-hosted Bitcoin software built for developers, applications, and AI agents.

CREATE WALLET

Bitcoin Tool Discovery with MCP

permalink THAMER
#ai-agents#bitcoin#mcp#wab-engine

Research question

Discovery describes a tool without granting execution authority.

An MCP client can request tools/list after protocol initialization. The returned tool descriptor contains a name, description and input schema. A model may select the tool, but the host must still authorize and validate the call. This example produces only the result payload; it does not implement initialization, transport, pagination or tools/call. The fixed Testnet constraint is an example policy, not a change to WAB. A complete server should use an MCP implementation appropriate to its negotiated protocol version.

Reference implementation

Python · 20 lines
1import json
2
3# A tools/list result fragment, not a complete MCP server.
4def list_tools():
5    return {"tools": [{
6        "name": "wab_wallet_balance",
7        "description": "Request a Testnet wallet balance.",
8        "inputSchema": {
9            "type": "object",
10            "properties": {
11                "net": {"const": "test", "type": "string"},
12                "type": {"enum": ["segwit", "taproot"], "type": "string"}
13            },
14            "required": ["net", "type"],
15            "additionalProperties": False
16        }
17    }]}
18
19if __name__ == "__main__":
20    print(json.dumps(list_tools(), indent=2))

Applying the example

Run python3 discovery.py to inspect the descriptor. No engine connection is made. Adapt the descriptor to a real MCP server and keep credentials in the execution process.

Scope and limitations

This is an independent educational design, not a mandatory SDK or a live-tested integration. The engine remains authoritative. No SEND or recovery tools are exposed. Do not put BTC KEY in tool arguments or model context. Verify the deployed API contract before connecting a wallet.

References

Questions & Answers

Explore all questions →

Latest from the Lab

THAMER illustrated developer portrait and signature

ABOUT THE DEVELOPER

Independent Software Developer specializing in Bitcoin Script, Golang, and AI Agents.

Software engineering · Independent research · Open-source projects