Tutorial

How to Build an OpenClaw Search Agent

OpenClaw is the open-source terminal agent that works with any LLM. Wire in Scavio's MCP server for live web search during autonomous coding sessions.

OpenClaw is an open-source terminal coding agent that works with any LLM backend (Claude, GPT-5, local Qwen, etc.) and exposes tools via MCP, skills, and CLI hooks. Adding Scavio's MCP server gives your OpenClaw agent live web, YouTube, Amazon, Walmart, and Reddit data in one drop-in config.

Prerequisites

  • OpenClaw installed from openclaw.ai
  • Any LLM backend configured (Claude API, OpenAI, or local)
  • A Scavio API key
  • Node.js 20+ for MCP

Walkthrough

Step 1: Install OpenClaw

Install the OpenClaw CLI.

Bash
curl -fsSL openclaw.ai/install.sh | sh

Step 2: Configure an LLM backend

Set up your LLM of choice in ~/.claw/config.json.

JSON
{
  "model": {
    "provider": "anthropic",
    "apiKey": "sk-ant-..."
  }
}

Step 3: Add the Scavio MCP server to claw.json

Register Scavio as an MCP server in ~/.claw/claw.json.

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

Step 4: Launch OpenClaw

Start an OpenClaw session. The agent detects and loads the Scavio tools.

Bash
openclaw

Step 5: Ask for live research

Prompt OpenClaw with a task requiring live data.

Bash
> research the 3 most-upvoted r/openclaw threads this month and summarize the pain points

Python Example

Python
import os, requests
r = requests.post('https://api.scavio.dev/api/v1/search',
    headers={'x-api-key': os.environ['SCAVIO_API_KEY']},
    json={'platform': 'reddit', 'subreddit': 'openclaw', 'sort': 'top', 'time': 'month'})
print(r.json()['posts'][:3])

JavaScript Example

JavaScript
const res = await fetch('https://api.scavio.dev/api/v1/search', {
  method: 'POST',
  headers: { 'x-api-key': process.env.SCAVIO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({ platform: 'reddit', subreddit: 'openclaw', sort: 'top', time: 'month' })
});
console.log((await res.json()).posts.slice(0, 3));

Expected Output

JSON
OpenClaw calls scavio.search_reddit with the subreddit filter, then scavio.get_reddit_post for comments on the top 3. It synthesizes a pain-point summary with citations.

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.

OpenClaw installed from openclaw.ai. Any LLM backend configured (Claude API, OpenAI, or local). A Scavio API key. Node.js 20+ for MCP. 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

OpenClaw is the open-source terminal agent that works with any LLM. Wire in Scavio's MCP server for live web search during autonomous coding sessions.