Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"dev-forgesworn-402-mcp": {
"args": [
"-y",
"402-mcp"
],
"command": "npx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Nostr: npub1mgvlrnf5hm9yf0n5mf9nqmvarhvxkc6remu5ec3vf8r0txqkuk7su0e7q2
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
npx -y '402-mcp' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
Checked 402-mcp against OSV.dev.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in finance / ai-ml
Dynamic problem-solving through sequential thought chains
An open-source AI agent that brings the power of Gemini directly into your terminal.
Workspace template + MCP server for Claude Code, Codex CLI, Cursor & Windsurf. Multi-agent knowledge engine (ag-refresh / ag-ask) that turns any codebase into a queryable AI assistant.
Use any LLMs (Large Language Models) for Deep Research. Support SSE API and MCP server.
MCP Security Weekly
Get CVE alerts and security updates for dev.forgesworn/402-mcp and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
Nostr: npub1mgvlrnf5hm9yf0n5mf9nqmvarhvxkc6remu5ec3vf8r0txqkuk7su0e7q2
L402 + x402 client MCP that gives AI agents economic agency. Discover, pay for, and consume any payment-gated API — no human registration, no API keys, no middlemen.
1. Install
npx 402-mcp
2. Connect to Claude Code
claude mcp add 402-mcp -- npx 402-mcp
3. Try it
Ask Claude: "Search for paid joke APIs using l402-search" — no wallet needed, just discovery.
Ready to make paid calls? See the full quickstart guide to set up a wallet and watch your agent pay for its first API call.
graph LR
A["1. l402-config()"] --> B["2. l402-discover(url)"]
B --> C["3. Agent reasons<br/>about pricing"]
C --> D["4. l402-buy-credits()<br/>or l402-fetch()"]
D --> E["5. l402-fetch(url)<br/>with credentials"]
E --> F["6. Data returned<br/>+ balance cached"]
Example session:
Agent: "I need routing data from routing.trotters.cc"
1. l402-config()
-> nwcConfigured: true, maxAutoPaySats: 1000
2. l402-discover("https://routing.trotters.cc/api/route")
-> 10 sats/request, toll-booth detected, tiers available
3. Agent reasons: "I need ~20 requests. The 500-sat tier
gives 555 credits. Better value."
4. l402-buy-credits(url, amountSats=500)
-> Paid 500 sats, received 555 credits
5. l402-fetch("https://routing.trotters.cc/api/route?from=...&to=...")
-> 200 OK, route data, 545 credits remaining
For detailed architecture and payment flow diagrams, see docs/architecture.md.
| Variable | Default | Description |
|---|---|---|
NWC_URI | - | Nostr Wallet Connect URI for autonomous Lightning payments |
CASHU_TOKENS | - | Path to Cashu token store file |
MAX_AUTO_PAY_SATS | 1000 | Safety cap; payments above this require human confirmation |
CREDENTIAL_STORE | ~/.402-mcp/credentials.json | Persistent macaroon/credential storage |
TRANSPORT | stdio | Transport mode: stdio or http |
PORT | 3402 | HTTP server port (when TRANSPORT=http) |
TRANSPORT_PREFERENCE | onion,hns,https,http | Preferred transport order for multi-URL services (comma-separated) |
TOR_PROXY | - | SOCKS5 proxy for .onion addresses (e.g. socks5h://127.0.0.1:9050) |
SOCKS_PROXY | - | Generic SOCKS5 proxy for all requests when set |
HNS_GATEWAY_URL | - | HTTP gateway for Handshake (.hns) domains (e.g. https://hns.to) |
When a kind 31402 event advertises multiple URLs (one per transport), 402-mcp selects the best one based on your configuration:
TRANSPORT_PREFERENCE=tor and a .onion URL is available, it is tried first.