MCP Web Search Tool
Web search and content extraction with support for multiple providers and operation modes.
- Tech: TypeScript, MCP SDK
- Tool name:
web_search
Tool: web_search
A unified web search tool with four operation modes and two search providers.
Input Schema
| Field | Type | Required | Description |
|---|---|---|---|
| query | string | Yes | Search query or URL (depending on mode) |
| mode | string | No | search (default), extract, crawl, map |
| provider | string | No | tavily (default) or brave |
| maxResults | number | No | Maximum results to return |
| searchDepth | string | No | basic, advanced, comprehensive |
| freshness | string | No | Time filter for results |
| includeDomains | string[] | No | Limit to specific domains |
| excludeDomains | string[] | No | Exclude specific domains |
| includeAnswer | boolean | No | Include AI-generated summary |
Operation Modes
| Mode | Description | Providers |
|---|---|---|
search | Standard web search -- returns titles, snippets, URLs | Tavily, Brave |
extract | Extract full content from a specific URL | Tavily only |
crawl | Crawl a website to get content from multiple pages | Tavily only |
map | Get a sitemap / list of all pages on a site | Tavily only |
Examples
Search:
{
"name": "web_search",
"arguments": {
"query": "kubernetes 1.30 release notes",
"mode": "search",
"maxResults": 5,
"searchDepth": "advanced"
}
}
Extract content from URL:
{
"name": "web_search",
"arguments": {
"query": "https://kubernetes.io/docs/concepts/scheduling/",
"mode": "extract"
}
}
Providers
| Provider | Modes Supported | Features |
|---|---|---|
| Tavily | search, extract, crawl, map | AI summaries, advanced depth, domain filtering, freshness |
| Brave | search only | Fast search, good for general queries |
Provider API keys configured via environment variables.