Using Web Search
This guide shows how to add web search to workflows using the Tavily MCP server, an AI-optimized search provider designed for LLM applications. While alternatives exist (Exa, SerpAPI, Brave Search), this guide focuses on Tavily configuration.
Tavily Search
Section titled “Tavily Search”Tavily provides AI-optimized search with structured JSON responses, news search capability, and fast response times through the @tavily/mcp-server MCP server.
---on: issuesengine: copilotmcp-servers: tavily: command: npx args: ["-y", "@tavily/mcp-server"] env: TAVILY_API_KEY: "${{ secrets.TAVILY_API_KEY }}" allowed: ["search", "search_news"]---
# Search and Respond
Search the web for information about: ${{ github.event.issue.title }}
Use the tavily search tool to find recent information.Setup:
- Sign up at tavily.com
- Get your API key from the dashboard
- Add as repository secret:
gh secret set TAVILY_API_KEY -a actions --body "<your-api-key>"
Terms of Service: Tavily Terms
MCP Server Configuration
Section titled “MCP Server Configuration”Configure the Tavily MCP server with the allowed list to restrict tools, store API keys in GitHub Secrets (never commit them), and use the -y flag with npx for automatic installation:
mcp-servers: tavily: command: npx args: ["-y", "@tavily/mcp-server"] env: TAVILY_API_KEY: "${{ secrets.TAVILY_API_KEY }}" allowed: ["search", "search_news"]Test your configuration with gh aw mcp inspect <workflow-name>.
Tool Discovery
Section titled “Tool Discovery”To see available tools from the Tavily MCP server:
# Inspect the MCP server in your workflowgh aw mcp inspect my-workflow --server tavily
# List tools with detailsgh aw mcp list-tools tavily my-workflow --verboseNetwork Permissions
Section titled “Network Permissions”Engines like Claude require explicit network permissions for MCP servers:
engine: claudenetwork: allowed: - defaults - "*.tavily.com"The Copilot engine doesn’t require this configuration.
Related Documentation
Section titled “Related Documentation”- MCP Integration - Complete MCP server guide
- Tools - Tool configuration reference
- AI Engines - Engine capabilities and limitations
- CLI Commands - CLI commands including
mcp inspect - Model Context Protocol Specification
- Tavily MCP Server
- Tavily Documentation