Build a lead enrichment workflow using MCP by configuring Scavio as a search server in Claude Desktop or Claude Code, then prompting the agent to research and enrich company records from a CSV or list. The MCP approach eliminates the need for custom code -- you describe what data you need and the agent runs the searches, parses the results, and formats the enriched output. This tutorial sets up the MCP config, designs the enrichment prompt, and shows how to process a batch of leads.
Prerequisites
- Claude Desktop or Claude Code installed
- A Scavio API key from scavio.dev
- A CSV or list of company names to enrich
- Basic familiarity with MCP server configuration
Walkthrough
Step 1: Configure Scavio as an MCP server
Add the Scavio MCP endpoint to your Claude Desktop or Claude Code configuration so the agent can call search tools.
// .mcp.json or claude_desktop_config.json:
{
"mcpServers": {
"scavio": {
"url": "https://mcp.scavio.dev/mcp",
"headers": { "x-api-key": "your_scavio_api_key" }
}
}
}Step 2: Design the enrichment prompt
Create a structured prompt that tells the agent exactly what fields to populate for each company.
# Enrichment prompt for Claude:
ENRICHMENT_PROMPT = """
For each company in the list below, search Google to find:
1. Company domain (official website URL)
2. One-line description (what they do)
3. Founding year
4. Estimated company size (employees)
5. Recent funding (if any, from last 2 years)
6. Key technology signals (languages, frameworks, cloud)
Output as a JSON array with fields:
{domain, description, founded, size, funding, tech_signals}
Companies to enrich:
- Vercel
- Supabase
- Resend
- Linear
"""Step 3: Process batch results
After the agent returns enriched data, validate the output and save it for your CRM or outreach tool.
import json
def validate_enrichment(data: list) -> list:
valid = []
for record in data:
if record.get('domain') and record.get('description'):
valid.append(record)
else:
print(f'Incomplete record: {record}')
return valid
def save_enriched(records: list, output_path: str = 'enriched_leads.json'):
with open(output_path, 'w') as f:
json.dump(records, f, indent=2)
print(f'Saved {len(records)} enriched leads to {output_path}')
# After Claude returns the enriched JSON:
# enriched = json.loads(claude_response)
# valid = validate_enrichment(enriched)
# save_enriched(valid)Step 4: Automate with the API for larger batches
For batches larger than 10 companies, use the Scavio API directly to avoid MCP rate limits and process in parallel.
import requests, os
from concurrent.futures import ThreadPoolExecutor
API_KEY = os.environ['SCAVIO_API_KEY']
def enrich_company_api(name: str) -> dict:
resp = requests.post('https://api.scavio.dev/api/v1/search',
headers={'x-api-key': API_KEY},
json={'platform': 'google', 'query': f'{name} company about funding tech stack'}, timeout=15)
results = resp.json().get('organic_results', [])
return {
'name': name,
'domain': results[0].get('link', '').split('/')[2] if results else '',
'snippets': [r.get('snippet', '') for r in results[:3]],
}
companies = ['Vercel', 'Supabase', 'Resend', 'Linear']
with ThreadPoolExecutor(max_workers=3) as pool:
enriched = list(pool.map(enrich_company_api, companies))
for e in enriched:
print(f'{e["name"]}: {e["domain"]}')Python Example
import requests, os
H = {'x-api-key': os.environ['SCAVIO_API_KEY']}
def enrich(name):
data = requests.post('https://api.scavio.dev/api/v1/search', headers=H,
json={'platform': 'google', 'query': f'{name} company about'}).json()
results = data.get('organic_results', [])
return {'name': name, 'domain': results[0].get('link', '').split('/')[2] if results else '', 'snippet': results[0].get('snippet', '') if results else ''}
for c in ['Vercel', 'Supabase', 'Linear']:
print(enrich(c))JavaScript Example
const H = {'x-api-key': process.env.SCAVIO_API_KEY, 'Content-Type': 'application/json'};
async function enrich(name) {
const r = await fetch('https://api.scavio.dev/api/v1/search', {
method: 'POST', headers: H,
body: JSON.stringify({platform: 'google', query: `${name} company about`})
});
const results = (await r.json()).organic_results || [];
return {name, domain: results[0]?.link ? new URL(results[0].link).hostname : '', snippet: results[0]?.snippet || ''};
}
Promise.all(['Vercel', 'Supabase'].map(enrich)).then(console.log);Expected Output
A JSON array of enriched lead records with domain, description, funding data, and tech signals for each company, ready for CRM import.