set_agent_credentials
Configure API credentials to operate as a specific agent within the Lightning Wallet MCP server, enabling autonomous Bitcoin Lightning wallet operations and access to paid APIs.
Instructions
Switch to an agent API key for subsequent requests. Use to operate as a specific agent after creating it.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| api_key | Yes | The agent API key |
Implementation Reference
- src/index.ts:1113-1127 (handler)The handler implementation for the 'set_agent_credentials' tool which updates the session client with the new API key.
case 'set_agent_credentials': { const parsed = SetAgentCredentialsSchema.parse(args); session.setClient(new LightningFaucetClient(parsed.api_key)); return { content: [ { type: 'text', text: JSON.stringify({ success: true, message: 'Switched to agent credentials. Subsequent requests will use this API key.', }, null, 2), }, ], }; } - src/index.ts:152-155 (schema)Input validation schema for 'set_agent_credentials'.
const SetAgentCredentialsSchema = z.object({ api_key: z.string().min(10, 'API key is too short').max(200, 'API key is too long') .describe('The agent API key to use for subsequent requests'), }); - src/index.ts:460-469 (registration)Tool definition and registration for 'set_agent_credentials' in the ListToolsRequestSchema handler.
name: 'set_agent_credentials', description: 'Switch to an agent API key for subsequent requests. Use to operate as a specific agent after creating it.', inputSchema: { type: 'object', properties: { api_key: { type: 'string', description: 'The agent API key' }, }, required: ['api_key'], }, },