web-search-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@web-search-mcpwhat are the top stories today?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
web-search-mcp
An MCP server that gives IBM BOB live web search via Gemini's built-in grounding, registered as an upstream on the LiteLLM MCP Gateway.
BOB ──► LiteLLM proxy (MCP Gateway) ──► this server ──► LiteLLM proxy ──► Gemini (grounding)LiteLLM connects to this server as an MCP client and re-exposes its tool at LiteLLM's
own /mcp endpoint, so BOB gains search through a config entry rather than a code change.
Instead of returning raw search results, the tool calls a Gemini model through the
LiteLLM proxy with the googleSearchRetrieval grounding tool. Gemini searches the web
internally and returns a synthesised answer with source citations.
One tool is exposed:
Tool | Arguments | Returns |
|
|
|
1. Credentials
Three values are required; the server refuses to start without them.
Gemini API key — from aistudio.google.com → Get API key (starts with
AIza). Set in your LiteLLM config asGEMINI_API_KEY. → used by LiteLLM, not this server directly.LiteLLM API key — the master key set in your LiteLLM proxy config. →
LITELLM_API_KEYMCP auth token — a shared secret you generate yourself:
python -c "import secrets; print(secrets.token_urlsafe(32))"→
MCP_AUTH_TOKEN(this server) andWEB_SEARCH_MCP_TOKEN(LiteLLM env)
Related MCP server: Ask Google MCP Server
2. Run it locally
cp .env.example .env # fill in LITELLM_BASE_URL, LITELLM_API_KEY, MCP_AUTH_TOKEN
uv sync
uv run web-search-mcpIn a second terminal, start the LiteLLM proxy (run from the project root):
export GEMINI_API_KEY=AIzaSy...
export WEB_SEARCH_MCP_TOKEN=<same value as MCP_AUTH_TOKEN>
uvx --from 'litellm[proxy]==1.94.1' litellm --config litellm/config.example.yamlVerify the MCP server:
curl -s localhost:8000/healthz # {"status":"ok"} -- no auth needed
curl -i localhost:8000/mcp # 401, because no token was sentThen inspect the tool interactively:
npx @modelcontextprotocol/inspectorConnect with transport Streamable HTTP to http://127.0.0.1:8000/mcp, add header
Authorization: Bearer <MCP_AUTH_TOKEN>, then call web_search from the Tools tab.
3. Register with LiteLLM
Merge the mcp_servers block from litellm/config.example.yaml
into your LiteLLM config:
mcp_servers:
web_search:
url: "https://your-host/mcp"
transport: http
auth_type: bearer_token
auth_value: os.environ/WEB_SEARCH_MCP_TOKEN
allowed_tools: ["web_search"]web_search should appear in LiteLLM's tool list (UI → MCP Servers, or through
the proxy's /mcp endpoint). Then ask BOB something that requires current information
and check that it calls the tool and cites URLs.
4. Deploy
docker build -t web-search-mcp .
docker run -p 8000:8000 --env-file .env web-search-mcpThe image is platform-agnostic — Code Engine, OpenShift, Kubernetes, Cloud Run. It
binds 0.0.0.0 and honours an injected PORT. Point /healthz at your platform's
liveness probe; it is intentionally unauthenticated so probes work without a token.
Supply LITELLM_BASE_URL, LITELLM_API_KEY, and MCP_AUTH_TOKEN as platform secrets,
never baked into the image.
Layout
src/web_search_mcp/
config.py environment settings; fails fast when required values are missing
gemini_client.py LiteLLM/Gemini grounding client -- knows Gemini, not MCP
cache.py TTL/LRU cache to avoid redundant Gemini calls
server.py MCPServer, the web_search tool, /healthz, ASGI assembly
auth.py bearer-token ASGI middleware
__main__.py uvicorn entrypointRun the tests (fully mocked — no network, no API calls):
uv run pytestNotes for whoever maintains this
Gemini grounding returns an answer, not a list of results. The tool response shape is
{answer, sources}rather than{results[]}. Bob reads the answer and cites the source URLs directly.sourcesmay be empty. Gemini sometimes omits grounding citations even when it used search internally. This is not an error.Error messages tell the model whether retrying can help. A rate limit says wait; a bad API key says an operator must intervene; a proxy timeout says retry shortly.
Auth middleware is pure ASGI, not Starlette's
BaseHTTPMiddleware, because the MCP endpoint streams andBaseHTTPMiddlewarebuffers.streamable_http_app()is used directly, not mounted. It already serves at/mcpand runs its own session-manager lifespan; mounting it under/mcpwould nest the path to/mcp/mcpand drop that lifespan.LiteLLM version: the proxy has a known incompatibility with
mcp>=2.0so it cannot be installed in the same venv as this server. Useuvx --from 'litellm[proxy]==1.94.1'to run it in isolation. Version 1.95.0 has a FastAPI import bug; stay on 1.94.1 until that is resolved upstream.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceAn MCP server that enables AI models to perform Google Web searches using the Gemini API, complete with citations and grounding metadata for accurate information retrieval. It is compatible with Claude Desktop and other MCP clients for real-time web access.13Apache 2.0
- AlicenseAqualityAmaintenanceA stdio MCP server that provides a single tool to query Gemini with Google Search grounding for current web information, returning synthesized answers with source links.1221MIT
- Alicense-qualityDmaintenanceMCP server that integrates Google's Gemini 2.5 Pro with real-time Google Search grounding for current information retrieval.67MIT
- Alicense-qualityDmaintenanceFree, unlimited web search MCP server using Gemini CLI's Google Search grounding to provide cited, live web results for any AI agent.1MIT
Related MCP Connectors
MCP server for Google search results via SERP API
Serper MCP — wraps the Serper Google Search API (serper.dev)
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/damnhotson-tech/google-search-MCP-'
If you have feedback or need assistance with the MCP directory API, please join our Discord server