ScavioScavio
ProductPricingDocs
Sign InGet Started
  1. Home
  2. Tutorials
  3. How to Add Web Search to OpenCode Multi-Expert
Tutorial

How to Add Web Search to OpenCode Multi-Expert

Configure OpenCode CLI as a multi-expert agent with Scavio web search MCP. Each expert gets the same fresh web baseline.

Get Free API KeyAPI Docs

OpenCode CLI multi-expert setups need a shared web-search layer so each expert agent sees the same fresh baseline. Scavio's hosted MCP at `https://mcp.scavio.dev/mcp` plugs in once and exposes search to every expert. This tutorial covers config, expert prompt setup, and a routing pattern.

Prerequisites

  • OpenCode CLI installed
  • Scavio API key

Walkthrough

Step 1: Add Scavio MCP to OpenCode config

Single endpoint, single API key.

JSON
// ~/.opencode/config.json
{
  "mcpServers": {
    "scavio": {
      "url": "https://mcp.scavio.dev/mcp",
      "apiKey": "${SCAVIO_API_KEY}"
    }
  }
}

Step 2: Define expert prompts

One markdown file per expert role.

# experts/seo-expert.md
You are an SEO expert. Always search Scavio for current SERP data before answering.

# experts/code-expert.md
You are a code expert. Search Scavio for current docs and GitHub issues.

Step 3: Wire up routing

OpenCode routes user queries to the right expert.

# experts/router.md
Classify the query: SEO -> seo-expert, code -> code-expert, default -> generalist.

Step 4: Test with a SEO query

Verify Scavio is called with the right query.

Bash
$ opencode 'rank top 5 cars 2026'
# router -> seo-expert
# seo-expert calls Scavio /api/v1/google
# returns SERP plus AI Overview citations

Step 5: Test with a code query

Verify code expert pulls GitHub via SERP.

Bash
$ opencode 'find async-await issues in tokio repo'
# router -> code-expert
# code-expert calls Scavio with site:github.com/tokio-rs filter

Python Example

Python
# OpenCode is a CLI; use Python to orchestrate experts directly via Scavio
import os, requests
API_KEY = os.environ['SCAVIO_API_KEY']

EXPERTS = {'seo': 'site: in any', 'code': 'site:github.com'}

def expert_search(role, q):
    scope = EXPERTS.get(role, '')
    r = requests.post('https://api.scavio.dev/api/v1/google',
        headers={'x-api-key': API_KEY},
        json={'query': f'{q} {scope}'}).json()
    return r.get('organic_results', [])[:10]

JavaScript Example

JavaScript
const API_KEY = process.env.SCAVIO_API_KEY;
const EXPERTS = { seo: '', code: 'site:github.com' };
export async function expertSearch(role, q) {
  const scope = EXPERTS[role] || '';
  const r = await fetch('https://api.scavio.dev/api/v1/google', { method:'POST', headers:{'x-api-key':API_KEY,'Content-Type':'application/json'}, body: JSON.stringify({ query: `${q} ${scope}` }) });
  return (await r.json()).organic_results || [];
}

Expected Output

JSON
OpenCode CLI routes user queries to the right expert; each expert calls Scavio MCP for fresh data. Same fresh baseline across all experts.

Related Tutorials

  • How to Add Web Search to opencode CLI
  • How to Add Web Search to Claude Code via Zaiglm Config
  • How to Give Hermes Agent Web Search Access

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.

OpenCode CLI installed. Scavio API key. A Scavio API key gives you 50 free credits on signup.

Yes. The free tier includes 50 credits on signup, 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.

Related Resources

Use Case

MCP Search Gateway for Multi-Agent Systems

Read more
Use Case

Pi Coding Agent Multi-Platform Search

Read more
Solution

Give AI Agents Multi-Source Search via MCP

Read more
Best Of

Best Web Search API for opencode CLI in 2026

Read more
Best Of

Best Multi-Agent Search Tool in 2026

Read more
Workflow

Secure Financial Agent Search via MCP Workflow

Read more

Start Building

Configure OpenCode CLI as a multi-expert agent with Scavio web search MCP. Each expert gets the same fresh web baseline.

Get Free API KeyRead the Docs
ScavioScavio

Real-time search API for AI agents. Search every platform, not just Google.

Product

  • Features
  • Pricing
  • Dashboard
  • Affiliates

Developers

  • Documentation
  • API Reference
  • Quickstart
  • MCP Integration
  • Python SDK

Alternatives

  • Tavily Alternative
  • SerpAPI Alternative
  • Firecrawl Alternative
  • Exa Alternative

Tools

  • JSON Formatter
  • cURL to Code
  • Token Counter
  • All Tools

© 2026 Scavio. All rights reserved.

Featured on TAAFT
Terms of ServicePrivacy Policy