Skip to main content
Glama
DrBalls

n8n MCP Server

by DrBalls

n8n_list_credentials

Retrieve a list of stored credentials from n8n workflows, showing names and types while excluding sensitive data for security.

Instructions

List all credentials (without sensitive data).

Args:

  • type (string, optional): Filter by credential type (e.g., "slackApi", "httpBasicAuth")

  • limit (number): Maximum results (default: 100)

  • cursor (string, optional): Pagination cursor

Returns: List of credentials with id, name, type, and timestamps. ⚠️ Credential data/secrets are NOT included for security.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoFilter by credential type
limitNoMaximum results to return
cursorNoPagination cursor

Implementation Reference

  • The handler logic for n8n_list_credentials. It fetches credentials from the API based on provided optional filters and formats the response for the user.
    async (params: z.infer<typeof ListCredentialsSchema>) => {
      const queryParams: Record<string, unknown> = { limit: params.limit };
      if (params.type) queryParams.type = params.type;
      if (params.cursor) queryParams.cursor = params.cursor;
      
      const response = await get<N8nPaginatedResponse<N8nCredentialListItem>>('/credentials', queryParams);
      
      const formatted = response.data.map(formatCredential).join('\n\n---\n\n');
      const output = {
        count: response.data.length,
        credentials: response.data,
        nextCursor: response.nextCursor
      };
      
      let text = `Found ${response.data.length} credential(s):\n\n${formatted}`;
      if (response.nextCursor) {
        text += `\n\n_More results available. Use cursor: ${response.nextCursor}_`;
      }
      
      return {
        content: [{ type: 'text', text }],
        structuredContent: output
      };
    }
  • Registration of the 'n8n_list_credentials' tool in the MCP server.
      server.registerTool(
        'n8n_list_credentials',
        {
          title: 'List n8n Credentials',
          description: `List all credentials (without sensitive data).
    
    Args:
      - type (string, optional): Filter by credential type (e.g., "slackApi", "httpBasicAuth")
      - limit (number): Maximum results (default: 100)
      - cursor (string, optional): Pagination cursor
    
    Returns:
      List of credentials with id, name, type, and timestamps.
      ⚠️ Credential data/secrets are NOT included for security.`,
          inputSchema: ListCredentialsSchema,
          annotations: {
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: false
          }
        },

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

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