Skip to main content
Glama
aledlie

Doppler MCP Server

by aledlie

doppler_projects_create

Create a new project in Doppler for organizing and managing secrets across your applications and environments.

Instructions

Create a new Doppler project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe name of the project to create
descriptionNoOptional description for the project

Implementation Reference

  • Handler logic specific to 'doppler_projects_create': builds the CLI command 'doppler projects create <name> [--description <desc>] --json' and executes it via execSync.
    case "doppler_projects_create":
      parts.push("projects", "create", getString("name")!);
      if (getString("description")) parts.push("--description", getString("description")!);
      parts.push("--json");
      break;
  • Tool definition including name, description, and input schema for creating a Doppler project (required: name; optional: description).
    {
      name: "doppler_projects_create",
      description: "Create a new Doppler project",
      inputSchema: {
        type: "object",
        properties: {
          name: {
            type: "string",
            description: "The name of the project to create",
          },
          description: {
            type: "string",
            description: "Optional description for the project",
          },
        },
        required: ["name"],
      },
    },
  • src/index.ts:27-31 (registration)
    Registers the 'doppler_projects_create' tool (among others) by including it in toolDefinitions returned for ListToolsRequest.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: toolDefinitions,
      };
    });
  • Core handler function that executes the built Doppler CLI command for any tool, including 'doppler_projects_create', via child_process.execSync and parses output as JSON.
    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}`);
      }
    }
  • src/index.ts:34-51 (registration)
    MCP server request handler for CallToolRequest that dispatches to executeCommand based on tool name, used to invoke 'doppler_projects_create'.
    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}`);
      }
    });

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