Tutorial

How to Add Web Search to Claude Code via Zaiglm Config

Enable live web search inside Claude Code when running through Zaiglm or a custom config. Scavio MCP plugs in with one config block.

Claude Code users running through Zaiglm or a custom provider config often lose the built-in WebSearch tool. This tutorial restores it by registering the Scavio MCP server, which gives Claude Code multi-surface search regardless of the underlying model provider.

Prerequisites

  • Claude Code latest
  • A Scavio API key
  • Node.js 20+

Walkthrough

Step 1: Locate the Claude Code config

Config lives at ~/.claude/settings.json or per-project .claude/settings.json.

Bash
code ~/.claude/settings.json

Step 2: Add the Scavio MCP

Works regardless of the model provider (Zaiglm, direct Anthropic, OpenRouter).

JSON
{
  "mcpServers": {
    "scavio": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.scavio.dev/mcp"],
      "env": { "SCAVIO_API_KEY": "${SCAVIO_API_KEY}" }
    }
  }
}

Step 3: Export the API key

Make it available to the Claude Code process.

Bash
echo 'export SCAVIO_API_KEY=sk_live_...' >> ~/.zshrc && source ~/.zshrc

Step 4: Restart Claude Code

Reload so the MCP discovery runs.

Bash
# Exit and relaunch
claude

Step 5: Verify the tool is active

Run /mcp in Claude Code to list loaded servers.

Bash
> /mcp
# Expect scavio listed with scavio_search, scavio_reddit, scavio_youtube

Python Example

Python
# Claude Code uses MCP directly; Python parity call:
import os, requests
API_KEY = os.environ['SCAVIO_API_KEY']
r = requests.post('https://api.scavio.dev/api/v1/search',
    headers={'x-api-key': API_KEY},
    json={'query': 'zaiglm claude code web search'})
print(r.json().get('organic_results', [])[:3])

JavaScript Example

JavaScript
const API_KEY = process.env.SCAVIO_API_KEY;
const r = await fetch('https://api.scavio.dev/api/v1/search', {
  method: 'POST',
  headers: { 'x-api-key': API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({ query: 'zaiglm claude code web search' })
});
console.log(((await r.json()).organic_results || []).slice(0, 3));

Expected Output

JSON
Claude Code exposes scavio_* tools regardless of model provider. The agent calls them automatically for queries that need fresh data.

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.

Claude Code latest. A Scavio API key. Node.js 20+. A Scavio API key gives you 500 free credits per month.

Yes. The free tier includes 500 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

Enable live web search inside Claude Code when running through Zaiglm or a custom config. Scavio MCP plugs in with one config block.