Web Search | GitHub Agentic Workflows

Web Search

Use the Tavily Model Context Protocol (MCP) server to add web search to workflows. Alternatives such as Exa, SerpAPI, and Brave Search also exist, but this page covers Tavily.

Copilot’s native web_search tool is unavailable in offline BYOK mode, including SDK mode. gh aw compile rejects tools.web-search for Copilot; configure an MCP server as shown below instead.

Tavily provides structured JSON search results, news search, and an MCP server at @tavily/mcp.

---
on: issues
engine: copilot
mcp-servers:
tavily:
command: npx
args: ["-y", "@tavily/mcp"]
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.

Sign up at tavily.com to get an API key, then add it as a repository secret:

Terminal window
gh aw secrets set TAVILY_API_KEY --value "<your-api-key>"

Review the Tavily Terms of Service, then test the workflow with gh aw mcp inspect <workflow>.

Inspect the workflow to see which Tavily tools are available:

Terminal window
# Inspect the MCP server in your workflow
gh aw mcp inspect my-workflow --server tavily
# List tools with details
gh aw mcp list-tools tavily my-workflow --verbose

Agentic workflows require explicit network permissions for MCP servers:

network:
allowed:
- defaults
- "*.tavily.com"