Skip to main content

What is MCP?

Model Context Protocol is Anthropic’s open standard for giving LLMs access to external tools. l402-kit ships a ready-made MCP server with two categories of tools:

Generic L402 tools

VERITY tools — paid services, auto-pay included

VERITY tools pay autonomously — no manual invoice handling needed.

Setup in Claude Desktop

1. Install Node.js ≥ 18

2. Configure your wallet

Config file location:
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

3. Restart Claude Desktop

The tools l402_fetch, l402_balance, and l402_spending_report will appear in Claude’s tool list.

Environment variables


Using the tools

Once the server is running, Claude can call VERITY and any L402-protected API autonomously:

HTTP MCP endpoint

In addition to the stdio package, VERITY exposes a live HTTP MCP server — no installation required:
Any MCP client that supports streamable HTTP transport can connect directly. Pass your Blink credentials as headers:
Initialize:
List tools:
Call a tool:
The endpoint auto-pays Lightning invoices using your wallet credentials and returns the VERITY result directly.

MCP registries

l402-kit is listed in all major MCP registries: Machine-readable manifest: GET https://l402kit.com/.well-known/mcp.json

Setup with Cursor

Add the same config block to Cursor’s MCP settings under Settings → MCP Servers.

Setup with any MCP client

The server reads from stdin / writes to stdout (stdio transport):
Any MCP-compatible client can connect using the stdio transport.

Building a custom MCP server

You can also embed L402Client directly in your own MCP server:

Security notes

  • The budget cap (BUDGET_SATS) is your primary safeguard — set it conservatively
  • Each npx l402-kit-mcp process has its own in-memory budget; it resets on restart
  • For production agents, persist the spending log via onSpend callback to an external store