Skip to main content

Google Search MCP Server - A Python implementation using FastMCP for Google Custom Search API integration

Project description

Google Search MCP Service

这是一个MCP(模型上下文协议)服务,提供对 Google Custom Search API 的访问。它允许您与 Google 搜索进行交互,并检索网页内容和搜索结果。

功能

  • 搜索

    • search 执行 Google 搜索
    • read_webpage 提取网页内容
  • 搜索功能

    • 自定义搜索结果数量
    • 支持多种搜索参数
    • 返回标题、链接、摘要等信息
  • 网页内容提取

    • 提取网页文本内容
    • 清理HTML标签
    • 获取页面元数据
    • 支持多种内容格式
  • 网络支持

    • HTTP 代理支持
    • SOCKS 代理支持
    • 自定义请求头
    • 超时控制

安装

# 克隆仓库
git clone https://github.com/your-repo/google-search-mcp.git
cd google-search-mcp

# 创建并激活虚拟环境
uv sync

使用(如Claude客户端)

URL: https://mcpcn.com/docs/quickstart/user/

claude_desktop_config.json

{
    "mcpServers": {
        "google-search": {
            "command": "uv",
            "args": [
                "--directory",
                "/Users/Desktop/google-search-mcp", # 替换为你的目录
                "run",
                "google-search-mcp"
            ],
            "env": {
                "GOOGLE_API_KEY": "your_api_key_here", # 替换为你的 Google API 密钥
                "GOOGLE_SEARCH_ENGINE_ID": "your_engine_id_here" # 替换为你的搜索引擎ID
            }
        }
    }
}

or

{
    "mcpServers": {
        "google-search": {
            "command": "uvx",
            "args": [
                "google-search-mcp"
            ],
            "env": {
                "GOOGLE_API_KEY": "your_api_key_here", # 替换为你的 Google API 密钥
                "GOOGLE_SEARCH_ENGINE_ID": "your_engine_id_here" # 替换为你的搜索引擎ID
            }
        }
    }
}

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

google_search_mcp-0.1.0.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

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

google_search_mcp-0.1.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file google_search_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: google_search_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.11

File hashes

Hashes for google_search_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 23e531f70b750da80986e777ce8614dfb59ba948cb302048374caa54134dd8ee
MD5 d117c686a6b953ccdb444ff1a477d88e
BLAKE2b-256 fce9489ab3b332792dce18e5a7cf1dee5cde9973fef439e092ee9ee0e0ce67f4

See more details on using hashes here.

File details

Details for the file google_search_mcp-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for google_search_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 692eb88026dc98d59ca70329d20dc3ab4e228efac45ca699b1df7bbe3e73c4d8
MD5 b570665383035aa048f3f1364f14e6bd
BLAKE2b-256 5c3482efc5cc03841ea26fa329cd4f3abf643c3002ff852177117518c5c532d1

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