Skip to main content
Glama
DrBalls

n8n MCP Server

by DrBalls

n8n_get_current_user

Retrieve details of the authenticated user, including ID, email, name, and role, for identity verification and access control in n8n workflow automation.

Instructions

Get details of the currently authenticated user (owner of the API key).

Returns: Current user details with id, email, name, and role.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the logic for n8n_get_current_user by calling /users/me.
      async () => {
        const user = await get<N8nUser>('/users/me');
        
        return {
          content: [{ type: 'text', text: `**Current User:**\n\n${formatUser(user)}` }],
          structuredContent: user
        };
      }
    );
  • Registration of the n8n_get_current_user tool.
      server.registerTool(
        'n8n_get_current_user',
        {
          title: 'Get Current n8n User',
          description: `Get details of the currently authenticated user (owner of the API key).
    
    Returns:
      Current user details with id, email, name, and role.`,
          inputSchema: EmptySchema,
          annotations: {
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: false
          }
        },
        async () => {
          const user = await get<N8nUser>('/users/me');
          
          return {
            content: [{ type: 'text', text: `**Current User:**\n\n${formatUser(user)}` }],
            structuredContent: user
          };
        }
      );

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