Google Indexing API MCP Server

Integrations
  • Provides tools for interacting with Google's Indexing API, which allows submitting URLs to Google's index and checking the indexing status of specific URLs programmatically.

MCP 服务器

该项目是针对给定 OpenAPI URL 的 MCP(多代理对话协议)服务器 - https://api.apis.guru/v2/specs/googleapis.com/indexing/v3/openapi.json ,使用 AG2 的MCP 构建器自动生成。

先决条件

  • Python 3.9+
  • pip 和 uv

安装

  1. 克隆存储库:
    git clone <repository-url> cd mcp-server
  2. 安装依赖项: .devcontainer/setup.sh脚本使用pip install -e ".[dev]"来安装依赖项。如果您没有使用 dev 容器,则可以手动运行此命令。
    pip install -e ".[dev]"
    或者,您可以使用uv
    uv pip install --editable ".[dev]"

发展

该项目使用ruff进行 linting 和格式化,使用mypy进行静态类型检查,使用pytest进行测试。

代码检查和格式化

要检查 linting 问题:

ruff check

格式化代码:

ruff format

这些命令也可以通过scripts/lint.sh脚本获得。

静态分析

运行静态分析(mypy、bandit、semgrep):

./scripts/static-analysis.sh

该脚本还在.pre-commit-config.yaml中配置为预提交钩子。

运行测试

要运行覆盖测试:

./scripts/test.sh

这将运行 pytest 并生成覆盖率报告。如果需要合并报告和清理,可以使用:

./scripts/test-cov.sh

预提交钩子

该项目使用.pre-commit-config.yaml中定义的预提交钩子。要安装钩子:

pre-commit install

每次提交之前钩子都会自动运行。

运行服务器

MCP 服务器可以通过mcp_server/main.py脚本启动。它支持多种传输模式(例如stdiosse )。

启动服务器(例如,在 stdio 模式下):

python mcp_server/main.py stdio

可以使用环境变量来配置服务器:

  • CONFIG_PATH :JSON 配置文件的路径(例如mcp_server/mcp_config.json )。
  • CONFIG :包含配置的 JSON 字符串。
  • SECURITY :安全参数的环境变量(例如 API 密钥)。

有关如何加载这些内容的详细信息,请参阅mcp_server/main.py中的if __name__ == "__main__":块。

tests/test_mcp_server.py文件演示了如何以编程方式启动服务器并与之交互以进行测试。

构建和发布

该项目使用 Hatch 进行构建和发布。要构建项目,请执行以下操作:

hatch build

发布项目:

hatch publish

这些命令也可以通过scripts/publish.sh脚本获得。

-
security - not tested
F
license - not found
-
quality - not tested

MCP 服务器可以与 Google 的 Indexing API 进行交互,允许代理通过自然语言命令向 Google 提交 URL 以供索引或从搜索结果中删除。

  1. 先决条件
    1. 安装
      1. 发展
        1. 代码检查和格式化
        2. 静态分析
        3. 运行测试
        4. 预提交钩子
      2. 运行服务器
        1. 构建和发布

          Related MCP Servers

          • A
            security
            F
            license
            A
            quality
            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.
            Last updated -
            3
            39
            52
            TypeScript
          • A
            security
            A
            license
            A
            quality
            A headless browser MCP server that allows AI agents to fetch web content and perform Google searches without API keys, supporting various output formats like Markdown, JSON, HTML, and text.
            Last updated -
            2
            4
            TypeScript
            MIT License
          • A
            security
            F
            license
            A
            quality
            An MCP protocol server that enables web search functionality using the Tavily API, allowing AI assistants to perform internet searches in real-time.
            Last updated -
            4
            2
            Python
          • -
            security
            F
            license
            -
            quality
            An MCP server that integrates with SerpApi to retrieve search results from multiple search engines including Google, Bing, Yahoo, and others, enabling fast access to both live and archived search data.
            Last updated -
            Python

          View all related MCP servers

          ID: 53lc3ghnjs