Skip to main content

MCP Server for web search via Gemini's grounding API

Project description

MCP Search Server

A Model Context Protocol (MCP) server that provides web search capabilities via Gemini's grounding API.

Features

  • 🔍 Real-time web search powered by Google Gemini
  • ⚡ Built-in caching (5 min TTL)
  • 🎯 Structured search results (Title + URL + Summary)
  • 🌍 Multi-language support

Installation

pip install mcp-search-server

Configuration

Set environment variables:

export MCP_SEARCH_URL="http://localhost:8045/v1/messages"
export MCP_SEARCH_API_KEY="your-api-key"
export MCP_SEARCH_MODEL="gemini-3-flash"  # or gemini-3-pro-high
export MCP_SEARCH_CACHE_TTL="300"  # seconds

Usage

As MCP Server (with Zed, Claude Desktop, etc.)

{
  "mcpServers": {
    "mcp-search": {
      "command": "python",
      "args": ["-m", "mcp_search"],
      "env": {
        "MCP_SEARCH_URL": "http://localhost:8045/v1/messages",
        "MCP_SEARCH_API_KEY": "your-api-key",
        "MCP_SEARCH_MODEL": "gemini-3-flash"
      }
    }
  }
}

As Python Library

import asyncio
from mcp_search import do_search

result = asyncio.run(do_search(
    query="latest AI news",
    max_results=5,
    model="gemini-3-flash"
))
print(result)

Tool Parameters

Parameter Type Required Description
query string Search keywords
max_results integer Number of results (default: 8)
model string Model ID (default: gemini-3-flash)

Requirements

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_gemini_search-0.2.0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_gemini_search-0.2.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file mcp_gemini_search-0.2.0.tar.gz.

File metadata

  • Download URL: mcp_gemini_search-0.2.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for mcp_gemini_search-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f605b646d5e4bf3c1cb590b5b76e20c1d41ae614f47def358aacfe01e35de37e
MD5 f79d4b0f9d1a6e311200c61212c49a87
BLAKE2b-256 1e2653e4c45f92100847da2c1ca4de6d38f101da0255ac8bd0e8e3df47dae39e

See more details on using hashes here.

File details

Details for the file mcp_gemini_search-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_gemini_search-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f1a2902ada15f1028b53ea8ded166e5b41a663c0d6081488c8b606adce7e028a
MD5 92fba999097b02a49c93c1dcf1208533
BLAKE2b-256 d3ca6fa5841e9a5e8bac43dadef9e1bd6c8a529359c6447c2856d7a730d08192

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page