"""MCP server for starfyi."""

from __future__ import annotations

from typing import Any

from mcp.server.fastmcp import FastMCP

from starfyi.api import StarFYI

mcp = FastMCP("starfyi")


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