Tutorial

How to Connect MetaMCP to Scavio for Multi-Model Search

Route search queries from MetaMCP to Scavio for multi-model search access. One search backend for Claude, GPT, Gemini agents.

MetaMCP lets you share MCP servers across multiple AI models. Connecting Scavio search to MetaMCP means Claude, GPT, Gemini, and local models all use the same search backend. This avoids duplicate API keys and inconsistent search quality across agents. Setup takes 5 minutes.

Prerequisites

  • MetaMCP installed
  • Python 3.8+ or Node.js 18+
  • A Scavio API key from scavio.dev
  • At least two AI model clients configured

Walkthrough

Step 1: Configure Scavio as a MetaMCP server

Add the Scavio search server to your MetaMCP configuration.

Python
import json, os

# MetaMCP configuration
metamcp_config = {
    'servers': {
        'scavio-search': {
            'command': 'npx',
            'args': ['-y', 'scavio-search-mcp'],
            'env': {
                'SCAVIO_API_KEY': os.environ.get('SCAVIO_API_KEY', 'your-key-here')
            },
            'description': 'Web search, extract, and TikTok data via Scavio API',
            'shared_with': ['claude', 'gpt', 'gemini', 'local']
        }
    }
}

config_path = os.path.expanduser('~/.metamcp/config.json')
print(f'MetaMCP config path: {config_path}')
print(json.dumps(metamcp_config, indent=2))
print(f'\nThis shares one Scavio API key across all connected models.')
print(f'All models get: search, extract, and TikTok tools.')

Step 2: Verify search works across models

Test that each connected model can use the search tool.

Python
import requests

API_KEY = os.environ['SCAVIO_API_KEY']
SH = {'x-api-key': API_KEY, 'Content-Type': 'application/json'}

def test_search(label, query):
    """Simulate a model calling the shared search tool."""
    data = requests.post('https://api.scavio.dev/api/v1/search',
        headers=SH, json={'query': query, 'country_code': 'us', 'num_results': 3}).json()
    results = data.get('organic_results', [])
    print(f'  [{label}] "{query}" -> {len(results)} results')
    if results:
        print(f'    Top: {results[0].get("title", "")[:50]}')
    return len(results) > 0

print('=== MetaMCP Search Verification ===')
models = {
    'Claude': 'latest anthropic sdk features',
    'GPT': 'openai api new endpoints 2026',
    'Gemini': 'google gemini api updates',
    'Local': 'best local llm for coding',
}
successes = 0
for model, query in models.items():
    if test_search(model, query):
        successes += 1
print(f'\nAll models working: {successes}/{len(models)}')
print(f'Cost: ${len(models) * 0.005:.3f} (shared across all models)')

Step 3: Monitor shared usage and costs

Track which models are using the most search queries.

Python
from collections import defaultdict
from datetime import datetime

class SearchUsageTracker:
    def __init__(self):
        self.usage = defaultdict(lambda: {'queries': 0, 'cost': 0.0})

    def log(self, model, query):
        self.usage[model]['queries'] += 1
        self.usage[model]['cost'] += 0.005

    def report(self):
        print(f'\n=== MetaMCP Search Usage - {datetime.now().strftime("%Y-%m-%d")} ===')
        total_queries = 0
        total_cost = 0
        for model, data in sorted(self.usage.items()):
            print(f'  {model:10} | {data["queries"]:5} queries | ${data["cost"]:.3f}')
            total_queries += data['queries']
            total_cost += data['cost']
        print(f'  {"TOTAL":10} | {total_queries:5} queries | ${total_cost:.3f}')
        print(f'\n  Monthly estimate: ${total_cost * 30:.2f}')
        print(f'  vs separate keys: ${total_cost * 30 * 1.5:.2f} (50% overhead from duplication)')

tracker = SearchUsageTracker()
# Simulate usage
for _ in range(10): tracker.log('Claude', 'various queries')
for _ in range(15): tracker.log('GPT', 'various queries')
for _ in range(5): tracker.log('Gemini', 'various queries')
for _ in range(8): tracker.log('Local', 'various queries')
tracker.report()

Python Example

Python
import os, requests
SH = {'x-api-key': os.environ['SCAVIO_API_KEY'], 'Content-Type': 'application/json'}

def shared_search(model, query):
    data = requests.post('https://api.scavio.dev/api/v1/search',
        headers=SH, json={'query': query, 'country_code': 'us'}).json()
    n = len(data.get('organic_results', []))
    print(f'[{model}] {query}: {n} results')

shared_search('Claude', 'anthropic sdk 2026')
shared_search('GPT', 'openai api 2026')
print('Cost: $0.010 (shared key)')

JavaScript Example

JavaScript
const SH = { 'x-api-key': process.env.SCAVIO_API_KEY, 'Content-Type': 'application/json' };
async function sharedSearch(model, query) {
  const data = await fetch('https://api.scavio.dev/api/v1/search', {
    method: 'POST', headers: SH,
    body: JSON.stringify({ query, country_code: 'us' })
  }).then(r => r.json());
  console.log(`[${model}] ${query}: ${(data.organic_results || []).length} results`);
}
await sharedSearch('Claude', 'anthropic sdk 2026');

Expected Output

JSON
=== MetaMCP Search Verification ===
  [Claude] "latest anthropic sdk features" -> 3 results
    Top: Anthropic SDK 2026: What's New in Claude API
  [GPT] "openai api new endpoints 2026" -> 3 results
    Top: OpenAI API Updates May 2026
  [Gemini] "google gemini api updates" -> 3 results
  [Local] "best local llm for coding" -> 3 results

All models working: 4/4
Cost: $0.020 (shared across all models)

=== MetaMCP Search Usage ===
  Claude     |    10 queries | $0.050
  GPT        |    15 queries | $0.075
  Gemini     |     5 queries | $0.025
  Local      |     8 queries | $0.040
  TOTAL      |    38 queries | $0.190

Related Tutorials

Frequently Asked Questions

Most developers complete this tutorial in 15 to 30 minutes. You will need a Scavio API key (free tier works) and a working Python or JavaScript environment.

MetaMCP installed. Python 3.8+ or Node.js 18+. A Scavio API key from scavio.dev. At least two AI model clients configured. A Scavio API key gives you 250 free credits per month.

Yes. The free tier includes 250 credits per month, which is more than enough to complete this tutorial and prototype a working solution.

Scavio has a native LangChain package (langchain-scavio), an MCP server, and a plain REST API that works with any HTTP client. This tutorial uses the raw REST API, but you can adapt to your framework of choice.

Start Building

Route search queries from MetaMCP to Scavio for multi-model search access. One search backend for Claude, GPT, Gemini agents.