Skip to main content
Glama
Infisical

Infisical MCP Server

Official
by Infisical

delete-secret

Remove a specific secret from a project within the Infisical MCP Server by specifying the project ID, environment slug, and secret name.

Instructions

Delete a secret in Infisical

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
environmentSlugYesThe slug of the environment to delete the secret from (required)
projectIdYesThe ID of the project to delete the secret from (required)
secretNameYesThe name of the secret to delete (required)
secretPathNoThe path of the secret to delete (Defaults to /)

Implementation Reference

  • The handler logic for the 'delete-secret' tool. It validates input using the Zod schema, calls the Infisical SDK to delete the secret, and returns a success message with the deleted secret's key.
    if (name === AvailableTools.DeleteSecret) { const data = deleteSecretSchema.zod.parse(args); const { secret } = await infisicalSdk.secrets().deleteSecret(data.secretName, { environment: data.environmentSlug, projectId: data.projectId, secretPath: data.secretPath }); return { content: [ { type: "text", text: `Secret deleted successfully: ${secret.secretKey}` } ] }; }
  • Input schema definition for the 'delete-secret' tool, including Zod validation schema and MCP capability with inputSchema for tool registration.
    const deleteSecretSchema = { zod: z.object({ projectId: z.string(), environmentSlug: z.string(), secretPath: z.string().default("/"), secretName: z.string() }), capability: { name: AvailableTools.DeleteSecret, description: "Delete a secret in Infisical", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project to delete the secret from (required)" }, environmentSlug: { type: "string", description: "The slug of the environment to delete the secret from (required)" }, secretPath: { type: "string", description: "The path of the secret to delete (Defaults to /)" }, secretName: { type: "string", description: "The name of the secret to delete (required)" } }, required: ["projectId", "environmentSlug", "secretName"] } } };
  • src/index.ts:452-467 (registration)
    Registration of the 'delete-secret' tool (via deleteSecretSchema.capability) along with other tools in the ListToolsRequestSchema handler.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: [ createSecretSchema.capability, deleteSecretSchema.capability, updateSecretSchema.capability, listSecretsSchema.capability, getSecretSchema.capability, createProjectSchema.capability, createEnvironmentSchema.capability, createFolderSchema.capability, inviteMembersToProjectSchema.capability, listProjectsSchema.capability ] }; });

Other Tools

Related Tools

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/Infisical/infisical-mcp-server'

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