"""MCP server for zipfyi."""

from __future__ import annotations

from typing import Any

from mcp.server.fastmcp import FastMCP

from zipfyi.api import ZipFYI

mcp = FastMCP("zipfyi")


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