Navigation
MCP Server: Cline/VS Code Integration + Live Search Research - MCP Implementation

MCP Server: Cline/VS Code Integration + Live Search Research

Maximize coding efficiency with MCP Server: VS Code/Cline/Anthropic integration + live Google Search/link-following research. Code smarter, not harder. #DevPowerhouse" )

Research And Data
4.5(33 reviews)
49 saves
23 comments

37% of users reported increased productivity after just one week

About MCP Server

What is MCP Server: Cline/VS Code Integration + Live Search Research?

MCP Server is a specialized tool designed to integrate with Cline and Visual Studio Code environments, enabling developers and researchers to perform real-time web searches and analyze content programmatically. It leverages Google's search APIs and advanced webpage parsing capabilities to deliver structured data extraction and multi-source comparison. This server acts as a middleware layer, simplifying complex interactions with external APIs while maintaining compatibility with code editing workflows.

How to use MCP Server: Cline/VS Code Integration + Live Search Research?

  1. Setup Environment: Install server dependencies and configure Flask/TypeScript runtime environments as per documentation.
  2. API Authentication: Obtain Google Cloud credentials through their console and populate your api-keys.json file with the generated API key and search engine ID.
  3. Execute Queries: Use tool-specific JSON payloads to trigger searches or content extraction via MCP protocol endpoints. Example commands include filtering results by date/language or comparing multiple URLs in a single request.

MCP Server Features

Key Features of MCP Server: Cline/VS Code Integration + Live Search Research?

  • Granular Search Control: Apply date restrictions (day/week/month), language filters, and safety levels to refine search results.
  • Adaptive Content Parsing: Automatically strips non-essential elements from webpages, returning clean text-based summaries.
  • Batch Processing: Analyze multiple URLs simultaneously for comparative research or competitive analysis.
  • Integrated Error Handling: Detailed error codes and logging for troubleshooting authentication failures or API rate limits.

Use Cases for MCP Server

  • Market intelligence: Monitor industry trends using time-bound keyword searches
  • Academic research: Compare findings across multiple sources to validate data
  • Content automation: Extract structured data for dynamic report generation
  • Real-time monitoring: Set up continuous searches for breaking news or product updates

MCP Server FAQ

FAQ: MCP Server Troubleshooting & Best Practices

How do I resolve "API key invalid" errors?
Verify your credentials in Google Cloud Console and ensure proper JSON formatting in your configuration file.
Can I use this for multilingual content analysis?
Yes, specify hl (language) and lr (results language) parameters in search queries for non-English content.
What's the maximum allowed query length?
Google's API enforces a 32-character limit per search term. Use advanced operators like " " for phrase matching.
Does this require a dedicated server?
No, runs locally as a development tool. Production environments should implement proper rate limiting and caching strategies.

Content

Built For use with Cline + VS Code!

Google Search MCP Server

An MCP (Model Context Protocol) server that provides Google search capabilities and webpage content analysis tools. This server enables AI models to perform Google searches and analyze webpage content programmatically.

Features

  • Advanced Google Search with filtering options (date, language, country, safe search)
  • Detailed webpage content extraction and analysis
  • Batch webpage analysis for comparing multiple sources
  • Environment variable support for API credentials
  • Comprehensive error handling and user feedback
  • MCP-compliant interface for seamless integration with AI assistants

Prerequisites

  • Node.js (v16 or higher)
  • Python (v3.8 or higher)
  • Google Cloud Platform account
  • Custom Search Engine ID
  • Google API Key

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/google-search-mcp.git

cd google-search-mcp
  1. Install Node.js dependencies:

    npm install

  2. Install Python dependencies:

    pip install flask google-api-python-client flask-cors beautifulsoup4 trafilatura markdownify

  3. Build the TypeScript code:

    npm run build

  4. Create a helper script to start the Python servers (Windows example):

    Create start-python-servers.cmd

@echo off
echo Starting Python servers for Google Search MCP...

REM Start Python search server
start "Google Search API" cmd /k "python google_search.py"

REM Start Python link viewer
start "Link Viewer" cmd /k "python link_view.py"

echo Python servers started. You can close this window.

Configuration

API Credentials

You can provide Google API credentials in two ways:

  1. Environment Variables (Recommended):
* Set `GOOGLE_API_KEY` and `GOOGLE_SEARCH_ENGINE_ID` in your environment
* The server will automatically use these values
  1. Configuration File :
* Create an `api-keys.json` file in the root directory:

    {
    "api_key": "your-google-api-key",
    "search_engine_id": "your-custom-search-engine-id"
}

MCP Settings Configuration

Add the server configuration to your MCP settings file:

For Cline (VS Code Extension)

File location: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json

{
  "mcpServers": {
    "google-search": {
      "command": "C:\\Program Files\\nodejs\\node.exe",
      "args": ["C:\\path\\to\\google-search-mcp\\dist\\google-search.js"],
      "cwd": "C:\\path\\to\\google-search-mcp",
      "env": {
        "GOOGLE_API_KEY": "your-google-api-key",
        "GOOGLE_SEARCH_ENGINE_ID": "your-custom-search-engine-id"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

For Claude Desktop App

File location: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "google-search": {
      "command": "C:\\Program Files\\nodejs\\node.exe",
      "args": ["C:\\path\\to\\google-search-mcp\\dist\\google-search.js"],
      "cwd": "C:\\path\\to\\google-search-mcp",
      "env": {
        "GOOGLE_API_KEY": "your-google-api-key",
        "GOOGLE_SEARCH_ENGINE_ID": "your-custom-search-engine-id"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

Running the Server

Method 1: Start Python Servers Separately (Recommended)

  1. First, start the Python servers using the helper script:

    start-python-servers.cmd

  2. Configure the MCP settings to run only the Node.js server:

    {
    "command": "C:\Program Files\nodejs\node.exe",
    "args": ["C:\path\to\google-search-mcp\dist\google-search.js"]

}

Method 2: All-in-One Script

Start both the TypeScript and Python servers with a single command:

npm run start:all

Available Tools

1. google_search

Search Google and return relevant results from the web. This tool finds web pages, articles, and information on specific topics using Google's search engine.

{
  "name": "google_search",
  "arguments": {
    "query": "your search query",
    "num_results": 5, // optional, default: 5, max: 10
    "date_restrict": "w1", // optional, restrict to past day (d1), week (w1), month (m1), year (y1)
    "language": "en", // optional, ISO 639-1 language code (en, es, fr, de, ja, etc.)
    "country": "us", // optional, ISO 3166-1 alpha-2 country code (us, uk, ca, au, etc.)
    "safe_search": "medium" // optional, safe search level: "off", "medium", "high"
  }
}

2. extract_webpage_content

Extract and analyze content from a webpage, converting it to readable text. This tool fetches the main content while removing ads, navigation elements, and other clutter.

{
  "name": "extract_webpage_content",
  "arguments": {
    "url": "https://example.com"
  }
}

3. extract_multiple_webpages

Extract and analyze content from multiple webpages in a single request. Ideal for comparing information across different sources or gathering comprehensive information on a topic.

{
  "name": "extract_multiple_webpages",
  "arguments": {
    "urls": [
      "https://example1.com",
      "https://example2.com"
    ]
  }
}

Example Usage

Here are some examples of how to use the Google Search MCP tools:

Basic Search

Search for information about artificial intelligence

Advanced Search with Filters

Search for recent news about climate change from the past week in Spanish

Content Extraction

Extract the content from https://example.com/article

Multiple Content Comparison

Compare information from these websites:
- https://site1.com/topic
- https://site2.com/topic
- https://site3.com/topic

Getting Google API Credentials

  1. Go to the Google Cloud Console
  2. Create a new project or select an existing one
  3. Enable the Custom Search API
  4. Create API credentials (API Key)
  5. Go to the Custom Search Engine page
  6. Create a new search engine and get your Search Engine ID
  7. Add these credentials to your api-keys.json file

Error Handling

The server provides detailed error messages for:

  • Missing or invalid API credentials
  • Failed search requests
  • Invalid webpage URLs
  • Network connectivity issues

Architecture

The server consists of two main components:

  1. TypeScript MCP Server: Handles MCP protocol communication and provides the tool interface
  2. Python Flask Server: Manages Google API interactions and webpage content analysis

License

MIT

Related MCP Servers & Clients