Skip to main content
Glama

doppler_run

Execute commands with Doppler secrets automatically injected as environment variables to securely manage application configurations during runtime.

Instructions

Run a command with Doppler secrets injected as environment variables

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYesThe command to run with Doppler secrets
projectNoThe Doppler project name (optional if set via doppler setup)
configNoThe Doppler config name (optional if set via doppler setup)

Implementation Reference

  • Specific command-building logic for the doppler_run tool within the buildDopplerCommand switch statement.
    case "doppler_run": parts.push("run"); if (getString("project")) parts.push("--project", getString("project")!); if (getString("config")) parts.push("--config", getString("config")!); parts.push("--", getString("command")!); // Note: doppler run doesn't support --json flag break;
  • Defines the input schema, name, and description for the doppler_run tool.
    { name: "doppler_run", description: "Run a command with Doppler secrets injected as environment variables", inputSchema: { type: "object", properties: { command: { type: "string", description: "The command to run with Doppler secrets", }, 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)", }, }, required: ["command"], }, },
  • src/index.ts:27-31 (registration)
    Registers all tools, including doppler_run, by returning the toolDefinitions array in response to listTools requests.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: toolDefinitions, }; });
  • MCP server handler for tool calls; dispatches to executeCommand based on tool name, handling doppler_run among others.
    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}`); } });
  • Core helper function that constructs and executes the Doppler CLI command for the specified tool, including doppler_run.
    export 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}`); } }

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/aledlie/doppler-mcp'

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