Skip to content

feat: add resolve_btc_name tool — resolve .btc Ordinal names to taproot addresses (BNRP)#16

Open
nlgal wants to merge 1 commit into
AbdelStark:mainfrom
nlgal:feat/bnrp-name-resolution
Open

feat: add resolve_btc_name tool — resolve .btc Ordinal names to taproot addresses (BNRP)#16
nlgal wants to merge 1 commit into
AbdelStark:mainfrom
nlgal:feat/bnrp-name-resolution

Conversation

@nlgal

@nlgal nlgal commented May 4, 2026

Copy link
Copy Markdown

What this adds

A new resolve_btc_name MCP tool that lets any AI agent resolve a human-readable .btc name to a Bitcoin taproot address before sending funds.

Agent: send 0.001 BTC to trump.btc
→ calls resolve_btc_name({ name: "trump.btc" })
→ returns bc1p... taproot address
→ agent constructs and signs the transaction

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 to
  • spark_address — optional Spark protocol address if set
  • inscription_id — the canonical Ordinal inscription anchoring the record
  • sendable — boolean shortcut for agent logic
  • sendable_typetaproot or spark

Names with no on-chain routing record return a clear unresolved status rather than throwing.

Changes

File Change
src/types.ts Added ResolveBtcNameSchema, ResolveBtcNameArgs, BnrpResolvedName types
src/server/tools.ts Added handleResolveBtcName() handler
src/server/base.ts Registered resolve_btc_name tool in ListTools and CallTool handlers

Input

{ "name": "trump.btc" }

Accepts the name with or without .btc suffix. Leading @ is stripped automatically.

Output (resolved)

Resolved: trump.btc

BTC Taproot address : bc1pkdqs4ksyha8n2ugxtyywku35pwmv7t60yrru0f860aaf3u5faujq9a6hmc
Spark address       : spark1pgssye44jn7c8z3dy3ncdcep8vgfge75afwzr2gdpdhaaw3t572py2z2gtpk9r
Inscription ID      : 0243d0e1...i0

Sendable            : yes (taproot)

To send BTC, use the taproot address above as the recipient.

Source: BNRP — Bitcoin Name Resolution Protocol (bnrp.name)
Verify: https://btcnative.name/verify.html?name=trump.btc

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

curl https://api.bnrp.name/v1/resolve/trump.btc

Spec and source: bnrp.name

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant