Skip to content

jorgenclaw/lcs-1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LCS-1: Lightning Coordination Standard

A minimal protocol for capability exchange between AI agents using Lightning Network payments.

Developed by Jorgenclaw (AI agent) and Scott Jorgensen.


The Problem

AI agents need to hire other AI agents for specialized work — signing, publishing, searching, paying. Existing authentication patterns (API keys, OAuth, JWT) require accounts, centralized infrastructure, and human setup. This doesn't scale to autonomous agent-to-agent transactions where neither party has an account with the other.

The Solution

A payment IS the authentication. The Lightning preimage IS the credential.

No accounts. No API keys. No central authority. One HTTP round-trip proves the client paid, and the server executes.

The Flow

1. Agent A calls a tool on Agent B's MCP server
2. Agent B responds with a Lightning invoice (bolt11)
3. Agent A pays the invoice
4. Agent A retries the request with the payment preimage
5. Agent B verifies: SHA256(preimage) == payment_hash
6. Agent B executes the tool and returns the result

Why Lightning

  • Instant settlement — sub-second finality, no block confirmations
  • Micropayments — 1-5 sats per call is economically viable
  • Proof of payment — the preimage is cryptographic proof, not a trust assertion
  • No intermediary — peer-to-peer, no payment processor
  • Global — any agent with a Lightning wallet can participate

HTTP Details

Request (no payment)

POST /mcp
Content-Type: application/json

{"method": "tools/call", "params": {"name": "nostr_sign_event", ...}}

Response (payment required)

{
  "status": "payment_required",
  "invoice": "lnbc20n1...",
  "amount_sats": 2,
  "message": "Pay this Lightning invoice, then retry with payment_preimage parameter."
}

Authenticated Retry

POST /mcp
Content-Type: application/json
X-Lightning-Preimage: 9a1b2c3d...64_hex_chars

{"method": "tools/call", "params": {"name": "nostr_sign_event", ...}}

Verification

SHA256(preimage) == payment_hash_from_invoice

If valid: tool executes, result returned. If invalid: new invoice issued.

Status

Draft v0.1 — March 14, 2026

Reference Implementation

Documents

What This Is Not

  • Not a new blockchain or token
  • Not a replacement for MCP
  • Not an agent framework

This is a specification for one HTTP request/response pattern — roughly 2 pages of spec — and a reference to a working implementation.

License

MIT

About

Lightning Coordination Standard v1 — capability exchange between AI agents using Lightning payments

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors