"""MCP server for quakefyi."""

from __future__ import annotations

from typing import Any

from mcp.server.fastmcp import FastMCP

from quakefyi.api import QuakeFYI

mcp = FastMCP("quakefyi")


@mcp.tool()
def search_quakefyi(query: str) -> dict[str, Any]:
    """Search quakefyi.com for content matching the query."""
    with QuakeFYI() as api:
        return api.search(query)
