pull down to refresh

tollbooth-sampletollbooth-sample

Educational Weather Stats MCP Service — the reference implementation for building Tollbooth DPYC monetized API services with Bitcoin Lightning micropayments.

This service wraps the free Open-Meteo weather API and gates paid tool calls through the Tollbooth credit system using the @runtime.paid_tool() decorator. Domain tools contain only business logic; debit, rollback, balance warnings, and constraint evaluation are handled automatically by the OperatorRuntime. Standard DPYC tools (balance, purchase, Secure Courier, Oracle, pricing, constraints) are delegated to the wheel via register_standard_tools().

Version: 0.2.0

The DPYC EconomyThe DPYC Economy

DPYC stands for Don't Pester Your Customer. It's a philosophy and protocol for API monetization that eliminates mid-session payment popups, subscription nag screens, and KYC friction.

How it worksHow it works

  1. Pre-funded balances — Users buy credits via Bitcoin Lightning before using tools. Each tool call silently debits from their balance. No interruptions, no "please upgrade" modals.
  2. Nostr keypair identity — Users are identified by a Nostr public key (npub), not an email or password. One keypair per role, managed by the user. No account creation forms.
  3. UUID-keyed tool identity — Every tool is a ToolIdentity object with a deterministic UUID v5 derived from a capability name. Pricing hints come from the category field:
    CategoryPricing hintUse case
    free0 satsBalance checks, status
    read1 satSimple lookups
    write5 satsMulti-step operations
    heavy10 satsExpensive queries
    Actual prices are set dynamically by the operator's pricing model in Neon.
  4. Rollback on failure — If the downstream API fails after a debit, credits are automatically rolled back via a compensating tranche. The user never pays for a failed call.
  5. Honor Chain — The DPYC ecosystem is a voluntary community:
    • Citizens — Users who consume API services
    • Operators — Developers who run MCP services (like this one)
    • Authorities — Certify operators and collect a small tax on purchases
    • First Curator — The root of the chain, mints the initial cert-sat supply

website: https://tollbooth-dpyc.com

84 sats \ 2 replies \ @optimism 6h
This service wraps the free Open-Meteo weather API

"Creating value" 😭😂

reply
71 sats \ 1 reply \ @supratic OP 4h

Those APIs have been used as samples, it should apply to any API.

reply

Yes! Here are some API ideas for y'all:

  1. Wrap wikipedia
  2. Wrap Bitcoin peer discovery
  3. Wrap your canary
  4. Wrap torrents
  5. Wrap search
  6. Wrap FRED
  7. Wrap waybackmachine
  8. Wrap the library
  9. Wrap air

But whatever you do, do not wrap bitcoin like Mike, that's lame.

reply