we

web-search

An MCP server that enables free web searching using Google search results, with no API keys required.

#MCP server# Google search# API-free
Publisherweb-search
Submitted date4/13/2025

Unleashing LLMs: A DIY Web Search MCP Server for Context-Aware AI

Empower your Large Language Models (LLMs) with real-time web search capabilities using this open-source Model Context Protocol (MCP) server. By leveraging Google search results without the need for API keys, this server provides a seamless and cost-effective way to inject up-to-date information into your AI applications.

Core Capabilities

  • Google-Powered Web Search: Access the vast knowledge base of the internet through Google search.
  • API Key-Free Operation: Eliminate the hassle and cost associated with API keys.
  • Structured Data Output: Receive search results in a structured format, including titles, URLs, and concise descriptions, optimized for LLM consumption.
  • Configurable Result Limits: Fine-tune the number of search results returned to balance relevance and processing overhead.

Quick Start Guide

1. Installation

Begin by cloning the repository and installing the necessary dependencies:

git clone [repository_url] cd [repository_directory] npm install

Next, build the server for optimal performance:

npm run build

2. MCP Integration

Integrate the server into your MCP-enabled environment. Below are configuration examples for VSCode (Claude Dev Extension) and Claude Desktop:

VSCode (Claude Dev Extension):

{ "mcpServers": { "web-search": { "command": "node", "args": ["/path/to/web-search/build/index.js"] } } }

Claude Desktop:

{ "mcpServers": { "web-search": { "command": "node", "args": ["/path/to/web-search/build/index.js"] } } }

Note: Replace /path/to/web-search/ with the actual path to your server directory.

3. Usage

The server exposes a search tool with the following parameters:

{ "query": string, // The search query "limit": number // Optional: Number of results to return (default: 5, max: 10) }

To utilize the tool within your LLM application, use the use_mcp_tool function:

use_mcp_tool({ server_name: "web-search", tool_name: "search", arguments: { query: "your search query", limit: 3 // optional } })

The server will respond with a JSON array containing structured search results:

[ { "title": "Example Search Result", "url": "https://example.com", "description": "Description of the search result..." } ]

Important Considerations

This server relies on web scraping Google search results, which introduces certain limitations:

  • Rate Limiting: Google may impose temporary blocks if excessive requests are detected. Implement reasonable search frequency and utilize the limit parameter judiciously. Consider adding delays between searches to mitigate this risk.
  • Result Accuracy: The server's functionality depends on Google's HTML structure, which is subject to change. Some results may lack descriptions or other metadata. Complex search operators may not function as expected.
  • Legal Compliance: This tool is intended for personal use. Adhere to Google's terms of service and implement appropriate rate limiting to ensure responsible usage.

Contributing

We welcome contributions to enhance the functionality and robustness of this MCP server. Submit issues and enhancement requests to help us improve this valuable resource for the LLM community.

Visit More

View All