# Connect to Hugy

1. Ask the user for a Hugy token. They create a named token at https://hugy.ai/app/ under "Connect your agents". Hugy shows it once. You cannot create one; there is no OAuth.
2. Connect to the MCP endpoint (Streamable HTTP, JSON-RPC 2.0):
   - Header: `https://hugy.ai/app/mcp` with `Authorization: Bearer <YOUR_TOKEN>`
   - Token in URL, if your client cannot send headers: `https://hugy.ai/app/mcp/<YOUR_TOKEN>`. Keep this URL private.
3. Verify: call `list_files`. A list (possibly empty) means you are connected.
4. HTTP 401 with error -32001 means the token is missing, wrong or revoked. Ask the user for a new one.

Per-client steps: https://hugy.ai/AGENTS.md
Full docs index: https://hugy.ai/agents/index.md
