Skip to main content
Glama
DrBalls

n8n MCP Server

by DrBalls

n8n_get_credential

Retrieve metadata for a specific credential in n8n workflow automation, including ID, name, type, and timestamps, without exposing sensitive data.

Instructions

Get details of a specific credential (without sensitive data).

Args:

  • id (string): Credential ID

Returns: Credential metadata (id, name, type, timestamps). ⚠️ Credential data/secrets are NOT returned for security.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe unique identifier of the resource

Implementation Reference

  • Implementation of the 'n8n_get_credential' tool handler.
      // ============ Get Credential ============
      server.registerTool(
        'n8n_get_credential',
        {
          title: 'Get n8n Credential',
          description: `Get details of a specific credential (without sensitive data).
    
    Args:
      - id (string): Credential ID
    
    Returns:
      Credential metadata (id, name, type, timestamps).
      ⚠️ Credential data/secrets are NOT returned for security.`,
          inputSchema: IdParamSchema,
          annotations: {
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: false
          }
        },
        async (params: z.infer<typeof IdParamSchema>) => {
          const credential = await get<N8nCredential>(`/credentials/${params.id}`);
          
          return {
            content: [{ type: 'text', text: formatCredential(credential) }],
            structuredContent: credential
          };
        }
      );

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