به Nostr بپیوندید
2026-06-24 17:01:01 CEST

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