Agents that attach 3+ MCP servers (Scavio + Browserbase + custom databases) need a routing layer. Without one, the agent calls the wrong tool half the time. This tutorial walks the pattern.
Prerequisites
- Claude Code or any MCP-aware agent
- 2+ MCP servers attached
Walkthrough
Step 1: List attached MCP servers and their tools
Each server contributes named tools.
# Scavio MCP: search, reddit_search, youtube_search, amazon_search, walmart_search, extract.
# Browserbase MCP: navigate, click, fill_form.
# Custom DB MCP: query_internal_db.Step 2: Write a routing prompt
Tell the agent when to use which.
# Routing prompt fragment:
# 'For public-web SERP and indexed-target reads: use Scavio MCP.
# For auth-gated dashboards / JS-only SPAs: use Browserbase.
# For internal company data: use the DB MCP.'Step 3: Set tool priority via naming
Clearer names route better.
# Avoid generic 'fetch' or 'get_data'.
# Prefer 'scavio_search', 'browserbase_navigate', 'company_db_query'.Step 4: Test with ambiguous prompts
Use prompts that could route either way.
# Test: 'Get the latest news about X from our internal records.'
# Watch which tool the agent picks; tune the prompt if wrong.Step 5: Add fallback policy
When tools return empty.
# 'If Scavio returns no results, try Browserbase navigate to the source page.'Python Example
# No code per se — the deliverable is the routing prompt and naming convention.JavaScript Example
// Same — skill file is the artifact.Expected Output
Agent picks the right MCP server per query 90%+ of the time, up from ~50% without routing logic.