Skip to main content
Glama

n8n-MCP

by 88-888
test-workflow-sanitizer.tsβ€’1.76 kB
#!/usr/bin/env npx tsx /** * Test workflow sanitizer */ import { WorkflowSanitizer } from '../src/telemetry/workflow-sanitizer'; const testWorkflow = { nodes: [ { id: 'webhook1', type: 'n8n-nodes-base.webhook', name: 'Webhook', position: [0, 0], parameters: { path: '/test-webhook', httpMethod: 'POST' } }, { id: 'http1', type: 'n8n-nodes-base.httpRequest', name: 'HTTP Request', position: [250, 0], parameters: { url: 'https://api.example.com/endpoint', method: 'GET', authentication: 'genericCredentialType', sendHeaders: true, headerParameters: { parameters: [ { name: 'Authorization', value: 'Bearer sk-1234567890abcdef' } ] } } } ], connections: { 'webhook1': { main: [[{ node: 'http1', type: 'main', index: 0 }]] } } }; console.log('πŸ§ͺ Testing Workflow Sanitizer\n'); console.log('Original workflow has', testWorkflow.nodes.length, 'nodes'); try { const sanitized = WorkflowSanitizer.sanitizeWorkflow(testWorkflow); console.log('\nβœ… Sanitization successful!'); console.log('\nSanitized output:'); console.log(JSON.stringify(sanitized, null, 2)); console.log('\nπŸ“Š Metrics:'); console.log('- Workflow Hash:', sanitized.workflowHash); console.log('- Node Count:', sanitized.nodeCount); console.log('- Node Types:', sanitized.nodeTypes); console.log('- Has Trigger:', sanitized.hasTrigger); console.log('- Has Webhook:', sanitized.hasWebhook); console.log('- Complexity:', sanitized.complexity); } catch (error) { console.error('❌ Sanitization failed:', error); }

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/88-888/n8n-mcp'

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