Major features implemented: - SQLite storage service with FTS5 for fast node search - Database rebuild mechanism for bulk node extraction - MCP tools: search_nodes, extract_all_nodes, get_node_statistics - Production Docker deployment with persistent storage - Management scripts for database operations - Comprehensive test suite for all functionality Database capabilities: - Stores node source code and metadata - Full-text search by node name or content - No versioning (stores latest only as per requirements) - Supports complete database rebuilds - ~4.5MB database with 500+ nodes indexed Production features: - Automated deployment script - Docker Compose production configuration - Database initialization on first run - Volume persistence for data - Management utilities for operations Documentation: - Updated README with complete instructions - Production deployment guide - Clear troubleshooting section - API reference for all new tools 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
66 lines
1.8 KiB
Bash
Executable File
66 lines
1.8 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
echo "🚀 Quick n8n-MCP Node Extraction Test"
|
|
echo "===================================="
|
|
echo ""
|
|
|
|
# Start services
|
|
echo "1. Starting Docker services..."
|
|
docker compose -f docker-compose.test.yml up -d
|
|
|
|
echo ""
|
|
echo "2. Waiting for services to start (30 seconds)..."
|
|
sleep 30
|
|
|
|
echo ""
|
|
echo "3. Testing AI Agent node extraction..."
|
|
docker compose -f docker-compose.test.yml run --rm n8n-mcp node -e "
|
|
const { NodeSourceExtractor } = require('./dist/utils/node-source-extractor');
|
|
|
|
async function test() {
|
|
const extractor = new NodeSourceExtractor();
|
|
|
|
console.log('\\n🔍 Extracting AI Agent node...');
|
|
try {
|
|
const result = await extractor.extractNodeSource('@n8n/n8n-nodes-langchain.Agent');
|
|
console.log('✅ SUCCESS!');
|
|
console.log('📦 Node Type:', result.nodeType);
|
|
console.log('📏 Code Size:', result.sourceCode.length, 'bytes');
|
|
console.log('📍 Location:', result.location);
|
|
console.log('\\n📄 First 200 characters of code:');
|
|
console.log(result.sourceCode.substring(0, 200) + '...');
|
|
} catch (error) {
|
|
console.log('❌ FAILED:', error.message);
|
|
}
|
|
}
|
|
|
|
test();
|
|
"
|
|
|
|
echo ""
|
|
echo "4. Listing available AI nodes..."
|
|
docker compose -f docker-compose.test.yml run --rm n8n-mcp node -e "
|
|
const { NodeSourceExtractor } = require('./dist/utils/node-source-extractor');
|
|
|
|
async function test() {
|
|
const extractor = new NodeSourceExtractor();
|
|
|
|
console.log('\\n📋 Listing AI/LangChain nodes...');
|
|
const nodes = await extractor.listAvailableNodes();
|
|
const aiNodes = nodes.filter(n => n.location && n.location.includes('langchain'));
|
|
|
|
console.log('Found', aiNodes.length, 'AI nodes:');
|
|
aiNodes.slice(0, 10).forEach(node => {
|
|
console.log(' -', node.name);
|
|
});
|
|
}
|
|
|
|
test();
|
|
"
|
|
|
|
echo ""
|
|
echo "5. Cleaning up..."
|
|
docker compose -f docker-compose.test.yml down -v
|
|
|
|
echo ""
|
|
echo "✅ Test complete!" |