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 搜索进行交互,并检索网页内容和搜索结果。

功能

  • 搜索

    • 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.1.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.1-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: google_search_mcp-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 ba7ae688d87b1555b8f6a02abbcf719771e3d93153f72223cb1c6a914b0d4fda
MD5 2bbbe60eecca34dc01a63c7abdfca39c
BLAKE2b-256 699f3e761e2caa10951d276cded28e627ae9576adab9e1048942a2dae4acdc0e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for google_search_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5ce7feb22fa68f9acdca5ed350c8e1173ec33ca33665e3d5ffffc7066eed5dd7
MD5 ebecc5e1e80b398367f5876b4eb3efb4
BLAKE2b-256 f9e6e550a69204e38d626cd5a98eeeec2cbb1189668620c3c6679a7a16f8d617

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