bolthub Documentation
Charge agents for your tools. Add a price to any MCP tool or HTTP endpoint, settle over Lightning, and get paid per call.
Welcome to bolthub
bolthub is a payment layer for tool calls. Add a price to any MCP tool or HTTP endpoint and settle over Lightning. bolthub is non-custodial and never in the funds path. Buyers need no accounts or API keys; the payment is the credential.
The @bolthub/pay SDK is the fastest way to charge for tools in your own code. Prefer not to run anything? The hosted path puts an existing HTTP API behind a pay-per-call L402 gateway at {slug}.gw.bolthub.ai and makes it discoverable on the API Hub.
Charge for your tools
- @bolthub/pay: the tool-payment SDK; price MCP tools and HTTP endpoints with pluggable rails
- Hosted Facilitator: dashboard-managed mint/verify, replay protection, and usage analytics
- Quickstart: the no-code hosted path, from existing API to paid endpoint in minutes
For API consumers
- bolthub MCP server: one config entry — the whole marketplace, specific gateways, and your other MCP servers, on one budget
- CLI: search, explore, and call APIs from the terminal
- Using Paywalled APIs: step-by-step guide to calling L402-gated endpoints
- Wallet Setup: choose and configure a Lightning wallet
- In code:
ToolClient(MCP) andL402Client(HTTP) in@bolthub/pay, or thebolthubPython package
For API providers
- Publishing Your API: make your API discoverable
- Directory API: JSON discovery API (powers the API Hub)
- Security: how bolthub protects your data and credentials
Key concepts
| Concept | Description |
|---|---|
| Rail | The settlement network a payment moves on. bolthub settles over Lightning, using the L402 standard. |
| Facilitator | The service that mints payment challenges and verifies proofs for a seller. Self-host it with @bolthub/pay, or use the hosted facilitator. |
| L402 | The Lightning rail: HTTP 402 Payment Required + Lightning invoice + macaroon-based auth |
| Non-custodial | Payments flow directly to the provider's wallet; bolthub never holds funds. Consumers can pay with any Lightning wallet. |
| Gateway | Reverse proxy at {slug}.gw.bolthub.ai that handles payment verification on the hosted path |
| Pricing models | per_request, per_kb, token_bucket, time_pass, metered |