Hermes v0.14.0 introduced native MCP tool support, making it straightforward to give your agent live web search without custom API wrappers. This tutorial configures Scavio as an MCP search provider in Hermes, so your agent can answer questions with real-time web data instead of relying solely on its training cutoff.
Prerequisites
- Hermes Agent v0.14.0 or later installed
- Python 3.11+
- A Scavio API key from https://scavio.dev
- The Scavio MCP server package (pip install scavio-mcp)
Walkthrough
Step 1: Install and configure the Scavio MCP server
Install the Scavio MCP server package and set up the configuration file that Hermes will read to discover available tools.
# Install the Scavio MCP server
pip install scavio-mcp
# Create the MCP server config
cat > mcp_config.json << 'CONFIG'
{
"mcpServers": {
"scavio": {
"command": "scavio-mcp",
"env": {
"SCAVIO_API_KEY": "your-api-key"
},
"tools": ["web_search", "news_search"]
}
}
}
CONFIG
# Verify the server starts
scavio-mcp --health-checkStep 2: Register the MCP tools in Hermes v0.14.0
Point Hermes at the MCP config file so it discovers Scavio tools at startup. Hermes v0.14.0 reads MCP tool schemas and makes them available to the agent.
from hermes import Agent, MCPToolProvider
# Load MCP tools from config
mcp_provider = MCPToolProvider.from_config("mcp_config.json")
# Create the Hermes agent with MCP tools
agent = Agent(
model="hermes-3",
tools=mcp_provider.get_tools(),
system_prompt="""You are a research assistant with live web search.
Use the web_search tool to find current information.
Always cite your sources with URLs."""
)
# Verify tools are registered
for tool in agent.available_tools:
print(f"Tool: {tool.name} - {tool.description}")Step 3: Execute search queries through the agent
Run the agent with queries that trigger web search. Hermes automatically decides when to call the search tool and incorporates results into its response.
import asyncio
async def research_query(agent: Agent, question: str) -> str:
response = await agent.run(question)
# Access tool call details
for step in response.steps:
if step.tool_call:
print(f"Tool used: {step.tool_call.name}")
print(f"Query sent: {step.tool_call.arguments.get('query')}")
result_count = len(step.tool_call.result.get("results", []))
print(f"Results returned: {result_count}")
return response.final_answer
async def main():
mcp_provider = MCPToolProvider.from_config("mcp_config.json")
agent = Agent(
model="hermes-3",
tools=mcp_provider.get_tools(),
system_prompt="Research assistant with live web search. Cite sources."
)
answer = await research_query(agent, "What are the top MCP servers in May 2026?")
print(f"Answer: {answer}")
asyncio.run(main())Python Example
import asyncio
from hermes import Agent, MCPToolProvider
async def main():
# Set up MCP tools from Scavio
mcp_provider = MCPToolProvider.from_config("mcp_config.json")
agent = Agent(
model="hermes-3",
tools=mcp_provider.get_tools(),
system_prompt="Research assistant with web search. Always cite sources."
)
# Run a query
response = await agent.run("What are the latest AI agent frameworks in 2026?")
for step in response.steps:
if step.tool_call:
print(f"Searched: {step.tool_call.arguments.get('query')}")
print(f"Results: {len(step.tool_call.result.get('results', []))}")
print(f"Answer: {response.final_answer}")
asyncio.run(main())JavaScript Example
// mcp_config.json must be in the working directory
// Hermes JS SDK example
import { Agent, MCPToolProvider } from "@hermes-ai/sdk";
const mcpProvider = MCPToolProvider.fromConfig("mcp_config.json");
const agent = new Agent({
model: "hermes-3",
tools: mcpProvider.getTools(),
systemPrompt: "Research assistant with web search. Cite sources."
});
async function main() {
const response = await agent.run("Latest AI agent frameworks in 2026?");
for (const step of response.steps) {
if (step.toolCall) {
console.log("Searched:", step.toolCall.arguments.query);
console.log("Results:", (step.toolCall.result.results || []).length);
}
}
console.log("Answer:", response.finalAnswer);
}
main();Expected Output
Tool: web_search - Search the web using Scavio
Searched: latest AI agent frameworks 2026
Results: 10
Answer: Based on current web results, the top AI agent frameworks in 2026 include...