Skip to main content
Glama

register_operator

Create a new operator account for the Lightning Wallet MCP server to manage Bitcoin Lightning wallets, access paid APIs, and control agent spending limits. Returns API key and recovery code that must be saved immediately.

Instructions

Register a new operator account. Returns API key and recovery code. SAVE THESE - they cannot be retrieved later!

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoName for the operator account (optional)
emailNoOptional email for product updates and feature announcements

Implementation Reference

  • The implementation of the `register_operator` tool, which is a standalone exported function that registers a new operator with the Lightning Faucet API.
    export async function registerOperator(name?: string, email?: string): Promise<{
      operatorId: number;
      apiKey: string;
      recoveryCode: string;
    }> {
      const payload: Record<string, string> = {
        action: 'register',
        name: name || 'AI Agent Operator',
      };
      if (email) {
        payload.email = email;
      }
    
      const response = await fetch(API_BASE_URL, {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json',
        },
        body: JSON.stringify(payload),
      });
    
      if (!response.ok) {
        throw new Error(`Request failed (HTTP ${response.status})`);
      }
    
      const result = await response.json() as RegisterResponse;
    
      if (!result.success) {
        throw new Error(result.error || 'Registration failed');
      }
    
      if (!result.api_key) {
        throw new Error('No API key returned');
      }
    
      return {
        operatorId: result.operator_id || 0,
        apiKey: result.api_key,
        recoveryCode: result.recovery_code || '',
      };
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lightningfaucet/lightning-wallet-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server