Setup
Claude Desktop
Edit Claude/claude_desktop_config.json:
{
"mcpServers": {
"lightning-tools": {
"command": "npx",
"args": ["@lightning-tools/mcp-server"]
}
}
}
Claude Code
Add to ~/.claude/settings.json (global) or .claude/settings.json (project):
{
"mcpServers": {
"lightning-tools": {
"command": "npx",
"args": ["@lightning-tools/mcp-server"]
}
}
}
Cursor
Edit ~/.cursor/mcp.json:
{
"mcpServers": {
"lightning-tools": {
"command": "npx",
"args": ["@lightning-tools/mcp-server"]
}
}
}
Existing API key
If you already have a key, either pass it as an environment variable:
{
"mcpServers": {
"lightning-tools": {
"command": "npx",
"args": ["@lightning-tools/mcp-server"],
"env": {
"LIGHTNING_TOOLS_API_KEY": "sk_..."
}
}
}
}
Or ask the agent to call set_api_key with your key — it will be saved for future sessions.
First use
Ask the agent to call buy_credits. It will generate a Lightning invoice. Pay it from any Lightning wallet, then call verify_payment, then your key is saved automatically for future sessions.
Available tools
- buy_credits — Purchase credits via Lightning invoice
- verify_payment — Confirm payment and unlock tools
- set_api_key — Store an existing API key and unlock tools
- check_balance — Check your current credit balance
- validate_email — Validate an email address (1–5 credits)
- calculate — Evaluate a mathematical expression (1 credit)
- generate_qr_code — Generate a QR code (1 credit)
- validate_phone — Validate a phone number (1 credit)
- extract_text — Extract text from a URL (2 credits)