pull down to refresh

I've been building LightningProx — a pay-per-request AI gateway where the only authentication is a Lightning payment. No accounts, no API keys, no email, no credit card.

How it works:

curl /v1/topup → get a Lightning invoice (100 sats minimum)
Pay the invoice
curl /v1/tokens → get a spend token
Use the token to make AI requests (Claude, GPT-4, etc.)

Cost per request is 3-10 sats depending on the model. The token IS the API key — when the balance runs out, it stops working. No invoices, no overages.

Why I built it:
I wanted autonomous AI agents to be able to pay for services without a human pre-registering accounts everywhere. An agent with a spend token has a fixed budget and complete autonomy within that budget. No OAuth, no refresh tokens, no billing cycles.
The interesting part — MCP service chaining:
I built two MCP servers (Model Context Protocol, the standard Claude Desktop uses for tools):

LightningProx MCP — lets an agent discover models, check pricing, manage balance, make AI requests
Weather MCP — returns current weather for any city

When you install both in Claude Desktop and give it a spend token, you can say:

"Get the weather in Las Vegas. Then use LightningProx to ask GPT-4 to analyze it and tell me if I need a jacket."

Claude calls the weather tool, gets the data, then pays 5 sats over Lightning to send that data to GPT-4 through LightningProx. One agent, two AI providers, one Bitcoin payment, no human in the loop.

Demo video: [https://youtu.be/08yTMbeZi7c]
Full writeup: [https://medium.com/@unixlamadev/mcp-service-chaining-when-your-ai-agent-pays-for-its-own-intelligence-9b628ea3cf1c]

Try it yourself:
bash# Get an invoice
curl -X POST https://lightningprox.com/v1/topup
-H "Content-Type: application/json"
-d '{"amount_sats": 100}'

Pay it, then create a tokenPay it, then create a token

curl -X POST https://lightningprox.com/v1/tokens
-H "Content-Type: application/json"
-d '{"charge_id": "YOUR_CHARGE_ID"}'

Make an AI requestMake an AI request

curl -X POST https://lightningprox.com/v1/messages
-H "Content-Type: application/json"
-H "X-Spend-Token: YOUR_TOKEN"
-d '{"model": "claude-sonnet-4-20250514", "max_tokens": 200,
"messages": [{"role": "user", "content": "What is the Lightning Network?"}]}'

MCP servers are open source:

https://github.com/unixlamadev-spec/lightningprox-mcp
https://github.com/unixlamadev-spec/weather-mcp

Happy to answer questions or give out free spend tokens to anyone who wants to try it.