Skip to main content
Glama

list-projects

Retrieve all projects from n8n by providing a client ID. Designed for n8n Enterprise with project management features enabled. Input arguments must be in compact JSON format.

Instructions

List all projects from n8n. NOTE: Requires n8n Enterprise license with project management features enabled. IMPORTANT: Arguments must be provided as compact, single-line JSON without whitespace or newlines.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientIdYes

Implementation Reference

  • The main handler function for the 'list-projects' tool within the CallToolRequestSchema handler. It retrieves the N8nClient instance using the provided clientId and calls listProjects() on it, returning the list of projects or an error.
    case "list-projects": { 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 projects = await client.listProjects(); return { content: [{ type: "text", text: JSON.stringify(projects.data, null, 2), }] }; } catch (error) { return { content: [{ type: "text", text: error instanceof Error ? error.message : "Unknown error occurred", }], isError: true }; } }
  • The core helper method in N8nClient class that makes an API request to '/projects' endpoint to list n8n projects.
    async listProjects(): Promise<N8nProjectList> { return this.makeRequest<N8nProjectList>('/projects'); }
  • src/index.ts:508-517 (registration)
    Tool registration in the ListToolsRequestSchema handler, including name, description, and input schema.
    name: "list-projects", description: "List all projects from n8n. NOTE: Requires n8n Enterprise license with project management features enabled. IMPORTANT: Arguments must be provided as compact, single-line JSON without whitespace or newlines.", inputSchema: { type: "object", properties: { clientId: { type: "string" } }, required: ["clientId"] } },
  • TypeScript interface defining the structure of the n8n projects list response.
    interface N8nProjectList { data: N8nProject[]; nextCursor?: string; }
  • TypeScript interface defining the structure of an individual n8n project.
    interface N8nProject { id: string; name: string; type?: 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