list_credentials
Retrieve all stored n8n credentials to access and manage authentication details for workflow connections and API integrations.
Instructions
List all n8n credentials
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:565-575 (handler)MCP server handler for list_credentials tool. Fetches credentials using N8nClient and formats response as MCP content.private async handleListCredentials() { const credentials = await this.n8nClient.listCredentials(); return { content: [ { type: 'text', text: JSON.stringify(jsonSuccess(credentials), null, 2), }, ], }; }
- src/index.ts:160-167 (registration)Registration of list_credentials tool in ListToolsRequestSchema response, including description and input schema.{ name: 'list_credentials', description: 'List all n8n credentials', inputSchema: { type: 'object', properties: {}, }, },
- src/index.ts:163-166 (schema)Input schema definition for list_credentials tool (empty object, no parameters required).inputSchema: { type: 'object', properties: {}, },
- src/n8n-client.ts:233-236 (helper)N8nClient helper method implementing the core logic: GET /api/v1/credentials and extracts data array.async listCredentials(): Promise<N8nCredential[]> { const response = await this.api.get<N8nCredentialsListResponse>('/credentials'); return response.data.data; }
- src/index.ts:241-242 (handler)Switch case dispatch in CallToolRequestSchema handler routing list_credentials calls to the handler method.case 'list_credentials': return await this.handleListCredentials();