Skip to main content
Glama

list-users

Retrieve all users from your MCP-N8N instance. This tool is restricted to the instance owner and requires a clientId for authentication.

Instructions

Retrieve all users from your instance. Only available for the instance owner.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientIdYes

Implementation Reference

  • Executes the list-users tool by fetching users via N8nClient.listUsers() and returning formatted JSON.
    case "list-users": { const { clientId } = args as { clientId: 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 users = await client.listUsers(); return { content: [{ type: "text", text: JSON.stringify(users.data, null, 2), }] }; } catch (error) { return { content: [{ type: "text", text: error instanceof Error ? error.message : "Unknown error occurred", }], isError: true }; } }
  • src/index.ts:556-565 (registration)
    Registers the list-users tool in the listTools response with name, description, and input schema.
    name: "list-users", description: "Retrieve all users from your instance. Only available for the instance owner.", inputSchema: { type: "object", properties: { clientId: { type: "string" } }, required: ["clientId"] } },
  • N8nClient helper method that performs the API request to list users.
    return this.makeRequest<N8nUserList>('/users'); }
  • Type definition for the response from the users API.
    interface N8nUserList { data: N8nUser[]; nextCursor?: string; }
  • Type definition for individual n8n user objects.
    interface N8nUser { id: string; email: string; firstName?: string; lastName?: string; isPending: boolean; role?: string; createdAt: string; updatedAt: string; }

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

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