Skip to main content
Glama
DrBalls

n8n MCP Server

by DrBalls

n8n_generate_audit

Generate security audit reports for n8n workflows and configurations to identify potential risks and issues across credentials, databases, nodes, and instance settings.

Instructions

Generate a security audit report for the n8n instance.

Args:

  • categories (array, optional): Categories to audit:

    • credentials: Check credential security

    • database: Check database configuration

    • filesystem: Check file system access

    • instance: Check instance configuration

    • nodes: Check node security

  • daysAbandonedWorkflow (number, optional): Days to consider workflow abandoned

Returns: Audit report with risk levels and issues by category.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoriesNoCategories to audit (default: all)
daysAbandonedWorkflowNoDays to consider workflow abandoned

Implementation Reference

  • Implementation of the n8n_generate_audit tool, which registers the tool and defines its execution logic (a POST request to /audit).
      server.registerTool(
        'n8n_generate_audit',
        {
          title: 'Generate Security Audit',
          description: `Generate a security audit report for the n8n instance.
    
    Args:
      - categories (array, optional): Categories to audit:
        - credentials: Check credential security
        - database: Check database configuration
        - filesystem: Check file system access
        - instance: Check instance configuration
        - nodes: Check node security
      - daysAbandonedWorkflow (number, optional): Days to consider workflow abandoned
    
    Returns:
      Audit report with risk levels and issues by category.`,
          inputSchema: GenerateAuditSchema,
          annotations: {
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: false
          }
        },
        async (params: z.infer<typeof GenerateAuditSchema>) => {
          const result = await post<N8nAuditResult>('/audit', params);
          
          const riskEmoji = {
            high: '🔴',
            medium: '🟡',
            low: '🟢'
          };
          
          const sections = result.sections.map(section => {
            const issues = section.issues.length > 0
              ? section.issues.map(i => `    - ${i}`).join('\n')
              : '    No issues found';
            
            return `${riskEmoji[section.risk]} **${section.name}** (${section.risk} risk)\n${issues}`;
          }).join('\n\n');
          
          const text = [
            `**Security Audit Report**`,
            `Overall Risk: ${riskEmoji[result.risk]} ${result.risk.toUpperCase()}`,
            '',
            sections
          ].join('\n');
          
          return {
            content: [{ type: 'text', text }],
            structuredContent: result
          };
        }
      );

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