doppler_secrets_list
Retrieve all secret values stored in a Doppler configuration to access sensitive environment variables and application credentials.
Instructions
List all secrets in a Doppler config
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | The Doppler project name (optional if set via doppler setup) | |
| config | No | The Doppler config name (optional if set via doppler setup) |
Implementation Reference
- src/doppler.ts:58-63 (handler)Specific switch case handling the doppler_secrets_list tool by constructing the Doppler CLI command: doppler secrets list [--project] [--config] --jsoncase "doppler_secrets_list": parts.push("secrets", "list"); if (getString("project")) parts.push("--project", getString("project")!); if (getString("config")) parts.push("--config", getString("config")!); parts.push("--json"); break;
- src/tools.ts:26-42 (schema)Tool definition including name, description, and input schema for doppler_secrets_list{ name: "doppler_secrets_list", description: "List all secrets in a Doppler config", inputSchema: { type: "object", properties: { project: { type: "string", description: "The Doppler project name (optional if set via doppler setup)", }, config: { type: "string", description: "The Doppler config name (optional if set via doppler setup)", }, }, }, },
- src/index.ts:27-31 (registration)Registration of tool list handler that returns all tool definitions, including doppler_secrets_listserver.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: toolDefinitions, }; });
- src/doppler.ts:10-36 (handler)Core handler function that executes the built Doppler CLI command for any tool, including doppler_secrets_listexport async function executeCommand( toolName: string, args: DopplerArgs ): Promise<any> { const command = buildDopplerCommand(toolName, args); try { const output = execSync(command, { encoding: "utf-8", stdio: ["pipe", "pipe", "pipe"], maxBuffer: 10 * 1024 * 1024, // 10MB buffer }); // Try to parse as JSON, if it fails return raw output try { return JSON.parse(output); } catch { return { output: output.trim() }; } } catch (error: any) { // Handle execution errors const stderr = error.stderr?.toString() || ""; const stdout = error.stdout?.toString() || ""; const message = stderr || stdout || error.message; throw new Error(`Doppler CLI command failed: ${message}`); } }
- src/index.ts:33-51 (registration)MCP server request handler for calling tools, which dispatches to executeCommand based on the tool name doppler_secrets_list// Handle tool calls server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args } = request.params; try { const result = await executeCommand(name, args || {}); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); throw new McpError(ErrorCode.InternalError, `Doppler CLI error: ${errorMessage}`); } });