"""MCP server for boardgamefyi."""

from __future__ import annotations

from typing import Any

from mcp.server.fastmcp import FastMCP

from boardgamefyi.api import BoardGameFYI

mcp = FastMCP("boardgamefyi")


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