n8n is the most popular open-source workflow automation tool, and its MCP node support in 2026 makes connecting to external data sources trivial. This tutorial connects n8n to the Scavio MCP server, giving your workflows access to web search, TikTok analytics, and YouTube data through a single MCP connection. Once connected, you can build automated research workflows, monitoring pipelines, and content generation systems entirely within n8n's visual editor.
Prerequisites
- n8n self-hosted or cloud instance running
- A Scavio API key from scavio.dev
- Basic familiarity with n8n workflow editor
- Node.js 18+ (for self-hosted n8n)
Walkthrough
Step 1: Configure the Scavio MCP connection in n8n
Add the Scavio MCP server as a credential in n8n. This creates a reusable connection that any workflow can use.
// n8n MCP credential configuration
// Go to Settings > Credentials > Add Credential > MCP Server
// Configuration values:
const mcpConfig = {
serverUrl: 'https://mcp.scavio.dev/mcp',
authType: 'Bearer',
authToken: process.env.SCAVIO_API_KEY,
// Available tools after connection:
// - web_search: Google search results
// - tiktok_search: TikTok video search
// - youtube_search: YouTube video search
};
console.log('MCP Server URL:', mcpConfig.serverUrl);
console.log('Auth: Bearer token');Step 2: Build a simple search workflow
Create an n8n workflow that accepts a search query, calls Scavio via MCP, and outputs formatted results. Test with a manual trigger.
// n8n Function node: Format search request
// This goes in a Function node after the Manual Trigger
const SCAVIO_KEY = $env.SCAVIO_API_KEY;
// Direct API call (alternative to MCP node)
const response = await fetch('https://api.scavio.dev/api/v1/search', {
method: 'POST',
headers: {
'x-api-key': SCAVIO_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
query: $input.first().json.query || 'test search',
country_code: 'us',
num_results: 5
})
});
const data = await response.json();
const results = (data.organic_results || []).map(r => ({
title: r.title,
url: r.link,
snippet: r.snippet || '',
}));
return results.map(r => ({ json: r }));Step 3: Add a scheduled trigger for daily research
Replace the manual trigger with a cron schedule to run the search workflow daily. Add email notification for results.
// n8n Cron configuration for daily runs:
// Trigger: Cron, Expression: 0 8 * * * (8 AM daily)
// Function node: Build daily research queries
const niche = 'developer tools API';
const queries = [
`${niche} trending 2026`,
`${niche} new releases this week`,
`${niche} comparison reviews`,
];
return queries.map(q => ({ json: { query: q } }));
// Follow with: HTTP Request node calling Scavio API
// Then: Function node to format results
// Finally: Email node to send the daily briefStep 4: Test the complete workflow
Verify the workflow executes correctly by running it manually and checking the output at each node.
// Verification script: test the Scavio connection from n8n
const SCAVIO_KEY = process.env.SCAVIO_API_KEY;
async function testConnection() {
const resp = await fetch('https://api.scavio.dev/api/v1/search', {
method: 'POST',
headers: {
'x-api-key': SCAVIO_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({ query: 'n8n workflow automation', country_code: 'us', num_results: 3 })
});
const data = await resp.json();
const results = data.organic_results || [];
console.log(`Connection test: ${results.length} results`);
results.forEach(r => console.log(` ${r.title}`));
console.log('n8n -> Scavio connection working');
}
testConnection();Python Example
import os, requests
SCAVIO_KEY = os.environ['SCAVIO_API_KEY']
H = {'x-api-key': SCAVIO_KEY, 'Content-Type': 'application/json'}
# Equivalent of n8n HTTP Request node calling Scavio
def n8n_search_node(query):
resp = requests.post('https://api.scavio.dev/api/v1/search', headers=H,
json={'query': query, 'country_code': 'us', 'num_results': 5})
results = resp.json().get('organic_results', [])
return [{'title': r['title'], 'url': r['link'], 'snippet': r.get('snippet', '')} for r in results]
# Simulate n8n daily workflow
queries = ['developer tools trending 2026', 'new api releases this week']
for q in queries:
results = n8n_search_node(q)
print(f'{q}: {len(results)} results')
for r in results[:2]:
print(f' {r["title"][:50]}')JavaScript Example
const SCAVIO_KEY = process.env.SCAVIO_API_KEY;
// Equivalent of n8n HTTP Request node
async function n8nSearchNode(query) {
const resp = await fetch('https://api.scavio.dev/api/v1/search', {
method: 'POST',
headers: { 'x-api-key': SCAVIO_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({ query, country_code: 'us', num_results: 5 })
});
const data = await resp.json();
return (data.organic_results || []).map(r => ({
title: r.title, url: r.link, snippet: r.snippet || ''
}));
}
// Simulate n8n workflow execution
async function runWorkflow() {
const queries = ['developer tools trending 2026', 'new api releases'];
for (const q of queries) {
const results = await n8nSearchNode(q);
console.log(`${q}: ${results.length} results`);
results.slice(0, 2).forEach(r => console.log(` ${r.title.slice(0, 50)}`));
}
}
runWorkflow();Expected Output
Connection test: 3 results
n8n Workflow Automation Platform - Open Source
Building Automated Workflows with n8n in 2026
n8n vs Zapier: Complete Comparison Guide
n8n -> Scavio connection working
developer tools trending 2026: 5 results
Top Developer Productivity Tools for 2026
AI-Powered Developer Tools Gaining Traction
new api releases this week: 5 results
OpenAI Launches GPT-5 Turbo API
Anthropic Claude 4 API Now Available