Own your LLM's web search: a local search->fetch->rank pipeline that replaces hosted web-search tools. Measured: matches hosted accuracy at 66% lower cost and up to 88% fewer tokens, plus a precision-tuned semantic caching with query-dependant TTL that no API offers.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add webfetch --env BRAVE_API_KEY='<BRAVE_API_KEY>' --env SERPER_API_KEY='<SERPER_API_KEY>' --env TAVILY_API_KEY='<TAVILY_API_KEY>' -- uvx webfetch-llm~/.codex/config.toml
[mcp_servers.webfetch]
command = "uvx"
args = ["webfetch-llm"]
env = { BRAVE_API_KEY = "<BRAVE_API_KEY>", SERPER_API_KEY = "<SERPER_API_KEY>", TAVILY_API_KEY = "<TAVILY_API_KEY>" }
# codex mcp add webfetch --env BRAVE_API_KEY='<BRAVE_API_KEY>' --env SERPER_API_KEY='<SERPER_API_KEY>' --env TAVILY_API_KEY='<TAVILY_API_KEY>' -- uvx webfetch-llm~/.cursor/mcp.json
{
"mcpServers": {
"webfetch": {
"command": "uvx",
"args": [
"webfetch-llm"
],
"env": {
"BRAVE_API_KEY": "<BRAVE_API_KEY>",
"SERPER_API_KEY": "<SERPER_API_KEY>",
"TAVILY_API_KEY": "<TAVILY_API_KEY>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"webfetch": {
"type": "stdio",
"command": "uvx",
"args": [
"webfetch-llm"
],
"env": {
"BRAVE_API_KEY": "<BRAVE_API_KEY>",
"SERPER_API_KEY": "<SERPER_API_KEY>",
"TAVILY_API_KEY": "<TAVILY_API_KEY>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"webfetch": {
"command": "uvx",
"args": [
"webfetch-llm"
],
"env": {
"BRAVE_API_KEY": "<BRAVE_API_KEY>",
"SERPER_API_KEY": "<SERPER_API_KEY>",
"TAVILY_API_KEY": "<TAVILY_API_KEY>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"webfetch": {
"command": "uvx",
"args": [
"webfetch-llm"
],
"env": {
"BRAVE_API_KEY": "<BRAVE_API_KEY>",
"SERPER_API_KEY": "<SERPER_API_KEY>",
"TAVILY_API_KEY": "<TAVILY_API_KEY>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"webfetch": {
"command": "uvx",
"args": [
"webfetch-llm"
],
"env": {
"BRAVE_API_KEY": "<BRAVE_API_KEY>",
"SERPER_API_KEY": "<SERPER_API_KEY>",
"TAVILY_API_KEY": "<TAVILY_API_KEY>"
}
}
}
}Environment variables
BRAVE_API_KEYSERPER_API_KEYTAVILY_API_KEY
Replace the placeholders with your own credentials and keep them out of version control.