Skip to main content
Glama

delete-credential

Remove a credential by its ID using the MCP server, ensuring only the credential owner can perform the deletion. Supports secure management of n8n workflow credentials.

Instructions

Delete a credential by ID. You must be the owner of the credentials.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientIdYes
idYes

Implementation Reference

  • The main handler for the 'delete-credential' tool within the CallToolRequestSchema switch statement. It retrieves the N8nClient instance, calls deleteCredential(id), and returns success or error response.
    case "delete-credential": { const { clientId, id } = args as { clientId: string; id: string }; const client = clients.get(clientId); if (!client) { return { content: [{ type: "text", text: "Client not initialized. Please run init-n8n first.", }], isError: true }; } try { const result = await client.deleteCredential(id); return { content: [{ type: "text", text: `Successfully deleted credential:\n${JSON.stringify(result, null, 2)}`, }] }; } catch (error) { return { content: [{ type: "text", text: error instanceof Error ? error.message : "Unknown error occurred", }], isError: true }; } }
  • Helper method in N8nClient class that performs the actual API DELETE request to remove a credential by ID.
    async deleteCredential(id: string): Promise<any> { return this.makeRequest(`/credentials/${id}`, { method: 'DELETE', }); }
  • src/index.ts:666-675 (registration)
    Tool registration in the listTools response, including name, description, and input schema definition.
    name: "delete-credential", description: "Delete a credential by ID. You must be the owner of the credentials.", inputSchema: { type: "object", properties: { clientId: { type: "string" }, id: { type: "string" } }, required: ["clientId", "id"] }

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/illuminaresolutions/n8n-mcp-server'

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