Lightning Tools MCP Server

Use Lightning Tools directly inside any MCP-compatible AI agent.

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