MCPSERV.CLUB
limklister

Mcp Google Custom Search Server

MCP Server

Perform web searches via Google Custom Search with MCP

Active(71)
1stars
3views
Updated Jan 15, 2025

About

A TypeScript‑based MCP server that lets LLMs query Google Custom Search API, returning formatted titles, URLs and descriptions for up to ten results.

Capabilities

Resources
Access data sources
Tools
Execute functions
Prompts
Pre-built templates
Sampling
AI model interactions

MCP Google Custom Search Server

The MCP Google Custom Search Server turns a simple web‑search API into a first‑class tool for language models. By exposing Google’s Custom Search as an MCP server, developers can give LLMs the ability to query the internet in a controlled, type‑safe manner without leaving the familiar MCP ecosystem. This solves the common pain point of integrating external knowledge sources into conversational agents—providing a single, well‑documented interface that handles authentication, request limits, and result formatting automatically.

At its core the server implements a single tool that accepts a query string and an optional result count. The tool forwards the request to Google’s Custom Search API, then returns a neatly formatted list of titles, URLs and snippets. The server is fully type‑safe, using TypeScript for implementation and Zod for runtime validation of incoming parameters. It also respects the Google API’s limit of ten results per query, defaulting to five when unspecified. Error handling is built in: malformed requests, missing environment variables, or API failures are all reported back to the client with clear messages. This makes it trivial for an LLM to handle failures gracefully and ask follow‑up questions.

Key capabilities include:

  • MCP compliance – works out of the box with Claude Desktop, MCP Inspector, and any other client that follows the JSON‑RPC protocol.
  • Environment‑driven configuration – API keys and search engine IDs are supplied via files, keeping secrets out of code.
  • Result formatting – each search hit is returned as a human‑readable block, easing downstream processing by the LLM.
  • Input validation – Zod guarantees that only valid queries reach Google, preventing accidental over‑querying or injection attacks.

Typical use cases span from building knowledge‑augmented chatbots that can fetch up‑to‑date information, to creating research assistants that surface recent papers or news articles on demand. In a developer workflow, the server can be spun locally during testing and then deployed to a cloud function or container for production use. Because it adheres strictly to MCP, the same tool can be reused across multiple assistants or integrated into larger orchestration pipelines without modification.

What sets this server apart is its blend of simplicity and robustness. By wrapping Google’s powerful Custom Search in a typed, validated MCP endpoint, it removes the friction of API key management and error handling from developers, allowing them to focus on designing richer conversational experiences.