ScavioScavio
产品定价文档
登录开始使用
  1. 首页
  2. 教程
  3. 如何通过 MCP 将 Web 搜索添加到 Hermes 代理
教程

如何通过 MCP 将 Web 搜索添加到 Hermes 代理

通过 Scavio MCP 服务器将 Hermes 代理连接到实时网络搜索。在 5 分钟内完成配置更新和测试查询。

获取免费API密钥API文档

Hermes 代理支持通过 MCP 调用工具,但没有内置搜索工具。添加 Scavio MCP 使您的 Hermes 代理能够以零自定义代码访问 Google、YouTube、Amazon、Walmart、Reddit 和 TikTok 搜索数据。 MCP 端点为 https://mcp.scavio.dev/mcp,每次工具调用费用为 0.005 美元。本教程可在 5 分钟内完成连接。

前置条件

  • Hermes 代理运行时已安装
  • 来自 scavio.dev 的 Scavio API 密钥
  • 基本熟悉 Hermes 配置

操作指南

步骤 1: 获取您的 Scavio API 密钥和 MCP 端点

在 scavio.dev 上注册并记下 MCP 服务器 URL。

Bash
# 1. Sign up at https://scavio.dev (free: 250 credits/month)
# 2. Dashboard > API Keys > Create New Key
# 3. MCP endpoint: https://mcp.scavio.dev/mcp

# Verify the MCP server is reachable:
curl -X POST https://mcp.scavio.dev/mcp \
  -H 'x-api-key: YOUR_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc": "2.0", "method": "tools/list", "id": 1}'

步骤 2: 将 Scavio MCP 添加到 Hermes 代理配置

更新您的 Hermes 代理配置以包含 Scavio MCP 服务器。

# In your Hermes agent config (config.yaml or equivalent):
# Add the MCP server under the tools or mcp_servers section

mcp_servers:
  scavio:
    url: "https://mcp.scavio.dev/mcp"
    headers:
      x-api-key: "${SCAVIO_API_KEY}"
    tools:
      - search
      - extract
      - tiktok

# Environment variable:
# export SCAVIO_API_KEY=your_key_here

步骤 3: 测试代理中的搜索工具

运行测试查询以验证 MCP 连接是否可以端到端工作。

Python
# Start your Hermes agent with the updated config
# Then send a test message:

# User: Search for the best Python web frameworks in 2026

# Expected agent behavior:
# 1. Agent recognizes it needs live data
# 2. Calls scavio.search tool via MCP
# 3. Receives structured Google results
# 4. Synthesizes answer from live data

# You can also test programmatically:
import requests
SH = {'x-api-key': os.environ['SCAVIO_API_KEY'], 'Content-Type': 'application/json'}
data = requests.post('https://api.scavio.dev/api/v1/search',
    headers=SH, json={'query': 'best python web framework 2026', 'country_code': 'us'}).json()
print(f'Results: {len(data.get("organic_results", []))} organic')
print(f'AI Overview: {"yes" if data.get("ai_overview") else "no"}')

步骤 4: 配置特定于平台的搜索

使用平台参数搜索 Reddit、YouTube、Amazon 等。

Bash
# Your Hermes agent can now use these search patterns:

# Google search (default):
# {"query": "serp api comparison", "country_code": "us"}

# Reddit search:
# {"query": "best api for agents", "platform": "reddit", "country_code": "us"}

# YouTube search:
# {"query": "python tutorial 2026", "platform": "youtube", "country_code": "us"}

# Amazon product search:
# {"query": "mechanical keyboard", "platform": "amazon", "country_code": "us"}

# Example agent prompt that triggers multi-platform search:
# "Research what Reddit says about the best SERP APIs,
#  then check YouTube for tutorial coverage"

# Cost: $0.005 per search call
# Free tier: 250 searches/month
# Project plan: $30/month = 7,000 searches

Python 示例

Python
# The MCP integration requires no Python code.
# To verify the same data programmatically:
import os, requests
SH = {'x-api-key': os.environ['SCAVIO_API_KEY'], 'Content-Type': 'application/json'}
for platform in ['google', 'reddit', 'youtube']:
    data = requests.post('https://api.scavio.dev/api/v1/search',
        headers=SH, json={'query': 'best serp api', 'platform': platform if platform != 'google' else None,
                          'country_code': 'us'}).json()
    print(f'{platform}: {len(data.get("organic_results", []))} results ($0.005)')

JavaScript 示例

JavaScript
// MCP integration requires no JS code.
// To verify the same data programmatically:
const SH = { 'x-api-key': process.env.SCAVIO_API_KEY, 'Content-Type': 'application/json' };
for (const platform of [null, 'reddit', 'youtube']) {
  const body = { query: 'best serp api', country_code: 'us' };
  if (platform) body.platform = platform;
  const data = await fetch('https://api.scavio.dev/api/v1/search', {
    method: 'POST', headers: SH, body: JSON.stringify(body)
  }).then(r => r.json());
  console.log(`${platform || 'google'}: ${(data.organic_results || []).length} results`);
}

预期输出

JSON
# After config update and agent restart:

Hermes Agent > MCP Servers:
  scavio: Connected (3 tools available)

# Test query:
User: Search for best Python web frameworks in 2026

Agent: [Calling scavio.search]
Based on current search results:
1. FastAPI leads for async API development
2. Django 5.1 remains the full-stack standard
3. Litestar gaining traction as FastAPI alternative

google: 10 results ($0.005)
reddit: 8 results ($0.005)
youtube: 10 results ($0.005)

相关教程

  • 如何通过 MCP 将实时搜索添加到光标
  • 如何构建自定义 MCP 搜索服务器
  • 如何为 CrewAI 创建 Scavio 搜索工具

常见问题

大多数开发者在15到30分钟内完成本教程。您需要一个Scavio API密钥(免费套餐即可)和可用的Python或JavaScript环境。

Hermes 代理运行时已安装. 来自 scavio.dev 的 Scavio API 密钥. 基本熟悉 Hermes 配置. Scavio API密钥注册即送50个免费积分。

可以。免费套餐注册即送50个积分,完全足够完成本教程并构建一个可运行的原型解决方案。

Scavio提供原生LangChain包(langchain-scavio)、MCP服务器以及适用于任何HTTP客户端的REST API。本教程使用 the raw REST API, 但您可以根据需要适配您选择的框架。

相关资源

Best Of

2026年Hermes智能体最佳搜索API

Read more
Best Of

2026年Claude Code最佳MCP搜索工具

Read more
Use Case

IDE MCP 搜索

Read more
Use Case

MCP 自定义搜索服务器

Read more
Solution

MCP按需上下文节省

Read more
Solution

用实时搜索支撑Hermes Agent

Read more

开始构建

通过 Scavio MCP 服务器将 Hermes 代理连接到实时网络搜索。在 5 分钟内完成配置更新和测试查询。

获取免费API密钥阅读文档
ScavioScavio

面向AI智能体的实时搜索API。搜索所有平台,不仅仅是Google。

产品

  • 功能
  • 定价
  • 控制台
  • 联盟计划

开发者

  • 文档
  • API参考
  • 快速开始
  • MCP集成
  • Python SDK

替代方案

  • Tavily替代方案
  • SerpAPI替代方案
  • Firecrawl替代方案
  • Exa替代方案

工具

  • JSON格式化
  • cURL转代码
  • Token计数器
  • 全部工具

© 2026 Scavio. 保留所有权利。

Featured on TAAFT
服务条款隐私政策