Skip to main content
Glama
ascentkorea

Hubble MCP Server

by ascentkorea

crawl_google_serp

Search Google for a keyword and retrieve search engine results pages (SERPs) with optional country targeting. Uses the Hubble API to crawl Google SERP data.

Instructions

구글 SERP API 요청

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keywordYes
glNokr

Implementation Reference

  • The main handler function for the 'crawl_google_serp' MCP tool. It sends a POST request to the Hubble API's /google_serp endpoint with a keyword and geolocation parameter, returning the SERP results as text.
    @mcp.tool()
    @async_retry(exceptions=(Exception), tries=2, delay=0.3)
    async def crawl_google_serp(
            keyword: str,
            gl: Literal['kr', 'us', 'jp'] = "kr") -> dict[SerpResponse, Any] | None:
        '''
        구글 SERP API 요청
        '''
        async with httpx.AsyncClient() as client:
            payload = {
                "keyword": keyword,
                "gl": gl
            }
            headers = {"X-API-Key": HUBBLE_API_KEY}
            response = await client.post(
                f"{HUBBLE_API_URL}/google_serp",
                headers=headers,
                json=payload,
                timeout=30.0)
            response.raise_for_status()
            return response.text
  • The SerpResponse Pydantic model defining the response schema for SERP API responses, including request details, cost, remaining credits, and data payload.
    class SerpResponse(BaseResponse):
        """SERP 응답 형식
        """
        request_detail: SerpParameters = Field(description="요청 받았던 파라미터")
        cost: int = Field(default=0, title="", description="")
        remain_credits: int = Field(default=-1, title="", description="")
        data: Optional[List[dict]] = Field(default=None, title="", description="")
  • The SerpParameters Pydantic model defining the input/request parameters for the SERP API (keyword, geolocation, result count, device).
    class SerpParameters(BaseModel):
        """SERP 요청 형식
        """
        keyword: str = Field(min_length=1, title="요청 키워드")
        gl: Optional[Literal["kr", "jp", "us"]] = Field(
            default="kr",
            title="geo location",
        )
        num: Optional[Literal[10, 20]] = Field(
            default=20,
            title="result num",
            description="SERP 에 표출할 결과 개수",
        )
        device: Optional[Literal["mobile"]] = Field(
            default="mobile",
            title="device",
            description="(Deprecated) 요청 환경. mobile만 지원합니다.",
        )
  • data_api.py:381-381 (registration)
    Registration of 'crawl_google_serp' as an MCP tool via the @mcp.tool() decorator on the FastMCP server instance 'mcp'.
    @mcp.tool()
  • The async_retry decorator helper used by crawl_google_serp to retry the API call up to 2 times with a 0.3s delay on failure.
    def async_retry(exceptions=(Exception), tries=3, delay=0.3, logger=None):
        def wrapper(func):
            @wraps(func)
            async def wrapped(*args, **kwargs):
                Tries = []
                for i in range(tries):
                    try:
                        return await func(*args, **kwargs)
                    except exceptions as ex:
                        ex_msg = f"Tries({ex.__class__.__name__}) Cnt: {i+1}, {ex}"
                        Tries.append(ex_msg)
                        if logger:
                            logger.warning(ex_msg)
                        else:
                            print(ex_msg)
                        if delay:
                            await asyncio.sleep(delay)
                raise TooManyTriesException(Tries)
            return wrapped
        return wrapper
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must fully disclose behavior. The phrase 'API 요청' (API request) is vague and does not describe whether the tool returns raw HTML, structured data, handles pagination, requires authentication, or has rate limits. Zero behavioral disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely short (5 words), which might be considered concise, but it achieves conciseness by omitting critical information. It is under-specified, not efficiently compact. Every word is present, but it does not earn its place due to lack of substance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (2 parameters, no output schema, no annotations), the description is completely inadequate. It fails to explain return values, parameter behavior, or usage context. The agent cannot reliably select or invoke this tool based solely on this description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, meaning the schema lacks descriptions for both parameters. The tool description does not compensate; it does not mention the parameters at all. No explanation of keyword (required) or gl (optional with enum values) is given, leaving the agent without hints beyond the schema itself.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description '구글 SERP API 요청' indicates it requests Google SERP (search results page). It specifies a verb ('crawl' from tool name) and resource (SERP), but does not detail what is returned or how it differs from siblings like crawl_google_suggest or crawl_google_trends. Purpose is somewhat clear but lacks specificity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. No context about prerequisites, best use cases, or situations where it should be avoided. This leaves the agent without decision support.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ascentkorea/hubble_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server