MCP.Market

L402 Gate MCP server

by zekebuilds-lab·io.github.zekebuilds-lab/mcp-l402-gate·v0.1.4

L402 Lightning paywall + DoI score gate for MCP tools: challenge, verify, score.

B78/100grade B
What users say
No reviews yet
Be the first
Safety scan
B78/100

full report

Adoption
New

0 stars41 downloads/wk

Reviews

Write one

Nobody has reviewed L402 Gate yet.

If you have run it, two minutes of your experience saves the next person an afternoon.

L402 Gate tools (3)

write = sends, deletes, buys or posts

Read from the package source without running it. The installed server may list more.

  • l402_gate_challenge

    Request a fresh PoW challenge from the PowForge L402 gate. Returns {nonce, difficulty}.

  • l402_gate_score

    Look up the Depth-of-Identity (DoI) score for a Nostr pubkey via the public PowForge

  • l402_gate_verify

    Verify a gate access attempt. Three shapes:

Public scan report

scanner v0.1.9 · 2026-09-27 · same rubric, same numbers if you re-run it

no findings
  • Code scan10 source files scanned25/25
  • –Live reliabilityno gateway calls yet and no remote to proben/a
  • –Tool poisoningtools not inspected (local package is not executed); not countedn/a
  • Auth qualitylocal package, no credentials required12/15
  • Maintenancelast push 141 days ago8/15
  • Maintainer identityregistry namespace matches repository owner6/10
Overall 78/100. Components that don't apply are left out of the denominator. Any critical finding is an F.RubricAppeal a findingJSON

How L402 Gate compares

Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.

Safety score
78/100
higher than 57% of 48,255 servers
Tools
3
the typical server has 7
Tools that change things
0%
typical: 0%. Fewer write tools means less an agent can break
Downloads a week
41
more than 33% of 12,191 servers with a package

What its tools let an agent do: 3 read

Install L402 Gate in Claude Code, Cursor or VS Code

Runs npx -y @powforge/mcp-l402-gate on your machine. Read the scan report first; the gateway never runs local packages.

claude mcp add mcp-l402-gate -- npx -y @powforge/mcp-l402-gate
Add to Cursor

What the publisher says

From the L402 Gate repository's README, as published. We do not edit it. Read it on GitHub

@powforge/mcp-l402-gate

Identity-scored Lightning paywall for MCP server operators.

L402 alone proves the caller paid 10 sats. It does not prove the caller has a reputation, has been around for more than 10 minutes, or that pricing one tool call shifts their economics at all. A fresh wallet pays the same 10 sats as a real user.

This package adds a Depth-of-Identity check on top of the L402 invoice. Drop it in front of an MCP tool and a caller has to (a) settle a Lightning invoice and (b) carry a DoI score above your threshold before the tool body runs. Cheap sybils still pay the toll, but the toll plus the per-pubkey reputation requirement is harder to grind than either piece on its own.

See it in action

A clone-and-run example server lives at github.com/zekebuilds-lab/mcp-l402-gate-example. It exposes one tool, bitcoin_data, that fetches the BTC/USD price plus mempool fees from mempool.space, gated by L402 + DoI. Clone it, fill in your LNBits creds, npm start, and you have a Lightning-gated MCP server running locally.

The Gap

Sats4AI's own documentation states the limitation plainly:

"autonomous agents cannot build reputation or receive preferential treatment across sessions."

@powforge/mcp-l402-gate closes that gap by composing L402 payment gating with the DoI oracle's composite identity score. A paying caller is also a known caller, with a per-pubkey reputation that survives across sessions and that costs irreversible work to fake.

Why not just L402

L402 is great wire format, weak abuse control. Recent MCP billing tools (sats4ai-mcp, invinoveritas, l402-kit, 402-mcp, coinopai-mcp) all ship the same 402 -> macaroon -> paid -> tool body flow, and an attacker can replay the flow from a fresh node every minute. coinopai-mcp's own author put it: "x402 is payment transport only. It doesn't handle agent identity, rate negotiation, multi-agent splits, or reputation."

PowForge has been shipping the missing piece. The DoI oracle at https://identity.powforge.dev returns a Schnorr-signed score for any Nostr pubkey, computed from observable irreversible work across four dimensions (social, access, vouch, economic). This package wires that score into the L402 path so a paying caller is also a costly-to-fake caller.

Requirements

  • Node >= 18
  • An LNBits wallet (URL + invoice/read API key) for the Lightning side
  • An accessible PowForge oracle URL (default: https://identity.powforge.dev)

5-line integration (Express)

const express = require('express');
const { mcpL402Middleware } = require('@powforge/mcp-l402-gate');

const app = express();
app.use('/tools/expensive', mcpL402Middleware({
  secret: process.env.GATE_HMAC_SECRET,
  lnbitsUrl: process.env.LNBITS_URL,
  lnbitsApiKey: process.env.LNBITS_INVOICE_KEY,
  satsAmount: 10,
  minScore: 10, // composite >= 10 means "emerging" tier on the oracle
}));

app.post('/tools/expensive', (req, res) => {
  // Reached only when L402 paid AND req.doiScore >= 10
  res.json({ ok: true, doiScore: req.doiScore, l402: req.l402Token });
});

The caller passes their pubkey via the X-Caller-Pubkey header or ?pubkey= query string. v0.1.0 treats this as caller-asserted; v0.2.0 will bind it cryptographically via NIP-98.

MCP tool wrapping

const { mcpL402Tool } = require('@powforge/mcp-l402-gate');

Shortened. The full README is on GitHub.

Nothing above is checked by us. What we check is on the safety report.

L402 Gate: common questions

Is L402 Gate MCP server safe?
Mostly: it is graded B (78/100). Read the L402 Gate safety report
How do I install L402 Gate?
It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
Does L402 Gate need an API key?
No secret keys are declared. It reads 2 settings from the environment.
Is L402 Gate maintained?
The last commit was 178 days ago (2026-05-10). The latest release is v0.1.4.
How does L402 Gate compare with other MCP servers?
safety score 78/100 (higher than 57% of 48,255 servers); tools 3 (the typical server has 7); tools that change things 0% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.

More from zekebuilds-lab →