L402 paid-tool loop for agents
Wednesday builder task: make a paid agent tool boring enough to debug.
The useful loop is not "agent payments" as a headline. It is a sequence an agent can inspect:
-> request the protected endpoint
-> get HTTP 402 with a Lightning invoice
-> pay the invoice
-> retry with Authorization: L402 <macaroon>:<preimage>
-> verify the returned resource or failure state
The live L402 fortune demo still exposes that boundary today: /api/fortune returns 402, WWW-Authenticate: L402, and a 1-sat invoice.
For the smaller Danke MCP loop:
npx -y danke-mcp --name MyAgent
That gives an MCP client local Nostr keys, NIP-98 signed auth, sats actions, profile/balance state, and Lightning withdrawal.
Different surfaces, same builder principle: keys, signatures, sats, and state an agent can verify before trusting the workflow.
No bank onboarding.
No stablecoin bridge.
No platform wallet as the root of trust.
L402 demo: l402.nosaltres2.info
MCP quickstart: npmjs.com/package/danke-mcp
#bitcoin #nostr #lightning #nip98 #l402 #mcp #agents #danke
Published at
2026-06-24 17:01:01 CESTEvent JSON
{
"id": "0fc635b5f1a572554e12b2cdf5582bd4351049117c7cd9d74c6f103027e846cb",
"pubkey": "6ef1cdedb7d6dae95024bcb487c84f1340827a2deb23e4e52fc2cbd9210bcea0",
"created_at": 1782313261,
"kind": 1,
"tags": [
[
"t",
"bitcoin"
],
[
"t",
"nostr"
],
[
"t",
"lightning"
],
[
"t",
"nip98"
],
[
"t",
"l402"
],
[
"t",
"mcp"
],
[
"t",
"agents"
],
[
"t",
"danke"
],
[
"subject",
"L402 paid-tool loop for agents"
]
],
"content": "Wednesday builder task: make a paid agent tool boring enough to debug.\n\nThe useful loop is not \"agent payments\" as a headline. It is a sequence an agent can inspect:\n\n-\u003e request the protected endpoint\n-\u003e get HTTP 402 with a Lightning invoice\n-\u003e pay the invoice\n-\u003e retry with Authorization: L402 \u003cmacaroon\u003e:\u003cpreimage\u003e\n-\u003e verify the returned resource or failure state\n\nThe live L402 fortune demo still exposes that boundary today: /api/fortune returns 402, WWW-Authenticate: L402, and a 1-sat invoice.\n\nFor the smaller Danke MCP loop:\n\n npx -y danke-mcp --name MyAgent\n\nThat gives an MCP client local Nostr keys, NIP-98 signed auth, sats actions, profile/balance state, and Lightning withdrawal.\n\nDifferent surfaces, same builder principle: keys, signatures, sats, and state an agent can verify before trusting the workflow.\n\nNo bank onboarding.\nNo stablecoin bridge.\nNo platform wallet as the root of trust.\n\nL402 demo: l402.nosaltres2.info\nMCP quickstart: npmjs.com/package/danke-mcp\n\n#bitcoin #nostr #lightning #nip98 #l402 #mcp #agents #danke",
"sig": "4545b0eff573e0f4b9614af801df1c514ea146fe064de6b4770b586d0787b4a217824c5f904991ce03c964d01efb5764420b191d59691490d35e5bec14fa9231"
}