INNER CODE UNIT · Python
_serve
feder-cr/Jobs_Applier_AI_Agent_AIHawk · src/aihawk/cli.py:105
def _serve() -> None:
"""The MCP server over stdio: the whole of `aihawk` with no subcommand.
stdout is the protocol channel, so nothing is printed there. A person at a
terminal gets one line on stderr saying what is waiting; a client gets the
protocol and nothing else.
"""
if sys.stdin.isatty():
click.echo("aihawk: MCP server over stdio, waiting for a client. "
"For the interface: aihawk ui --openrouter-key ...", err=True)
from .mcp.server import main as serve
serve()
@main.command()
@click.option("--openrouter-key", default=None,
help="OpenRouter API key (or env OPENROUTER_API_KEY). Required: "
"the interface does not start without a model.")