This project provides tools for analyzing, categorizing, and storing n8n workflows across multiple database types:
- Vector Database (QDRANT): For semantic search and similarity matching
- Graph Database (Neo4j): For relationship mapping and ontological representation
- Relational Database (Supabase): For structured metadata storage
This project now includes Model Context Protocol (MCP) integrations for:
- n8n: Import and manage workflows directly with n8n's API
- QDRANT: Vector search and similarity matching for workflows
- Supabase: Structured data storage for workflow metadata
- Workflow Validation: Validate workflows against best practices
workflow-parser.js
: Processes n8n workflow JSON files, extracts metadata, and generates descriptionsvectorize-workflows.js
: Demonstrates how to use the QDRANT MCP server to vectorize workflowsn8n-mcp-client.js
: Client for interacting with the n8n MCP servern8n-workflow-validator.js
: Validator for n8n workflows against best practicesvalidate-workflow.js
: CLI tool for validating workflowsimport-to-n8n.js
: Tool for importing workflows to n8nprocessed-workflows/
: Contains the processed workflow data with enriched metadataworkflows/
: Directory containing original n8n workflow files- MCP Servers located in
/Users/kinglerbercy/MCP/
:
The workflow-parser.js
script processes n8n workflow files, extracting metadata and generating descriptions:
npm run parse
# or
node workflow-parser.js
This creates enriched workflow data in the processed-workflows/
directory.
Copy the example environment file and update with your settings:
cp .env.example .env
# Edit .env with your configuration
# Connect to QDRANT for vectorization and semantic search
npm run vectorize-mcp
# Store workflows in Supabase
npm run supabase-mcp
# Connect to n8n and list workflows
npm run n8n-demo
# Import all workflows to n8n
npm run import-all
# Import a specific workflow to n8n
npm run import <workflow-id>
# or
npm run import <workflow-file.json>
# Validate a workflow in n8n by ID
npm run validate <workflow-id>
# Validate a local workflow file
npm run validate -f <workflow-file.json>
# Validate with high strictness
npm run validate -s high <workflow-id>
# Run specific validators only
npm run validate -v naming,security,errorHandling <workflow-id>
The workflow validator checks for best practices in five categories:
- Naming: Ensures workflows and nodes have descriptive names
- Error Handling: Checks for proper error handling nodes and patterns
- Security: Validates credential usage and security practices
- Performance: Identifies potential performance issues
- Documentation: Ensures workflows are properly documented
The QDRANT MCP server can also be configured in the Cline MCP settings:
"n8n-workflows-qdrant": {
"command": "node",
"args": [
"/Users/kinglerbercy/MCP/qdrant-server/index.js"
],
"env": {
"OPENAI_API_KEY": "your-openai-api-key",
"QDRANT_URL": "http://localhost:6333"
},
"disabled": false,
"autoApprove": []
}
After restarting Cline with the MCP server configuration, you can use the MCP tools to vectorize and search workflows:
// Vectorize workflows
use_mcp_tool(
server_name: "n8n-workflows-qdrant",
tool_name: "vectorize_workflows",
arguments: {
"workflowsDir": "/path/to/workflows",
"processedDir": "/path/to/processed-workflows"
}
)
// Search for similar workflows
use_mcp_tool(
server_name: "n8n-workflows-qdrant",
tool_name: "search_similar_workflows",
arguments: {
"query": "workflow that handles email automation",
"limit": 5,
"filter": {
"category": "workflow",
"tags": ["email", "automation"],
"complexity": "moderate"
}
}
)
The workflow parser extracts the following information:
- Category: Derived from the filename prefix (e.g., "agent:", "workflow:", "tool:")
- Name: Extracted from the filename
- Description: Generated from workflow content, including node types and documentation
- Tags: Extracted from node types and services used
- Complexity: Analyzed based on node count, connection count, and unique node types
- Purpose: Semantic search and similarity matching
- Implementation: QDRANT MCP server with OpenAI embeddings
- Features: Search by query, filter by category, tags, and complexity
- Purpose: Relationship mapping and ontological representation
- Implementation: To be implemented
- Features: Query relationships between workflows, node types, and categories
- Purpose: Structured metadata storage
- Implementation: To be implemented
- Features: SQL queries for structured data analysis
The QDRANT MCP server provides the following tools:
vectorize_workflows
: Vectorize n8n workflows and store them in Qdrantsearch_similar_workflows
: Search for similar workflows based on a queryget_workflow_categories
: Get all workflow categoriesget_workflow_tags
: Get all workflow tags
The n8n MCP server provides the following tools:
list_workflows
: Get all workflows from n8nget_workflow
: Get a specific workflow by IDcreate_workflow
: Create a new workflowupdate_workflow
: Update an existing workflowdelete_workflow
: Delete a workflowimport_workflow
: Import a workflow from a fileexport_workflow
: Export a workflow to a file
The workflow validator provides the following validation categories:
naming
: Validate node and workflow naming conventionserrorHandling
: Validate error handling patternssecurity
: Validate security practices and credential usageperformance
: Identify potential performance issuesdocumentation
: Ensure proper workflow documentation
- Implement Neo4j integration for relationship mapping
- Implement Supabase integration for structured metadata storage
- Create a web interface for browsing and searching workflows
- Add more advanced analytics and visualization tools