feat: add resolve_btc_name tool — resolve .btc Ordinal names to taproot addresses (BNRP)#16
Open
nlgal wants to merge 1 commit into
Open
feat: add resolve_btc_name tool — resolve .btc Ordinal names to taproot addresses (BNRP)#16nlgal wants to merge 1 commit into
nlgal wants to merge 1 commit into
Conversation
Adds a new MCP tool that resolves .btc Ordinal names to Bitcoin taproot addresses using the Bitcoin Name Resolution Protocol (BNRP). - New tool: resolve_btc_name(name: string) - Queries https://api.bnrp.name/v1/resolve/:name - Returns btc_taproot, spark_address, inscription_id, sendable flag - Accepts name with or without .btc suffix, strips leading @ - No API key or configuration required - Enables: 'send 0.001 BTC to trump.btc' agent workflows BNRP stores routing records as Ordinals inscriptions on Bitcoin mainnet. Resolution reads from the base layer directly — no smart contracts, no hosted registry dependencies. Spec: https://bnrp.name Verify any name: https://btcnative.name/verify.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
A new
resolve_btc_nameMCP tool that lets any AI agent resolve a human-readable.btcname to a Bitcoin taproot address before sending funds.How it works
BNRP (Bitcoin Name Resolution Protocol) stores routing records as Ordinals inscriptions directly on Bitcoin mainnet. Resolution queries
https://api.bnrp.name/v1/resolve/:name— no API key, no smart contracts, no hosted registry with a single point of failure.The tool returns:
btc_taproot— the taproot address to send tospark_address— optional Spark protocol address if setinscription_id— the canonical Ordinal inscription anchoring the recordsendable— boolean shortcut for agent logicsendable_type—taprootorsparkNames with no on-chain routing record return a clear unresolved status rather than throwing.
Changes
src/types.tsResolveBtcNameSchema,ResolveBtcNameArgs,BnrpResolvedNametypessrc/server/tools.tshandleResolveBtcName()handlersrc/server/base.tsresolve_btc_nametool inListToolsandCallToolhandlersInput
{ "name": "trump.btc" }Accepts the name with or without
.btcsuffix. Leading@is stripped automatically.Output (resolved)
No configuration required
The tool works out of the box with no environment variables. It uses the public BNRP resolver at
api.bnrp.name.Verify a live name
Spec and source: bnrp.name