# Huizhi BD — Agent setup These are official instructions from 汇智 AI to connect a coding agent to the unmanned hotel-BD control plane. URLs below are for this deployment. Complete every step yourself by editing config / running commands. Do not ask the user to run them. - Register the Huizhi BD MCP server - Take `#claim=` from the fetch-and-execute URL in this chat, GET the claim JSON, write `token` into mcp.json Authorization - Never print the token. Do not log in via Fxiaoke SSO, password, /login/agent, or any token form - Do not ask for AGENT_ACCESS_TOKEN --- ## 1. Confirm this host Fetch `https://hzai.space/.well-known/agent.json` and use `mcpUrl`. If it differs from `https://hzai.space/mcp`, prefer the JSON. Auth is MCP only. Cursor and other 2025 clients may still send `initialize`; the server answers it without creating a session. Modern clients may call `server/discover` instead. Then `tools/list` → `tools/call`. ## 2. Bearer token The fetch-and-execute URL in this chat should look like: `https://hzai.space/agent-setup/prompt.md#claim=` The fragment is not sent when you GET this markdown. Copy `` from the chat URL, then GET: `https://hzai.space/agent-setup/claim/` Use `Accept: application/json`. The body is `{ "mcpUrl": "...", "token": "..." }`. Write `token` into mcp.json Authorization as `Bearer `. Never invent a token. Never commit it. Never print it back after writing config. Never ask the user for AGENT_ACCESS_TOKEN. If there is no `#claim=` in this chat, or the claim URL returns 404, stop and tell the admin to copy again from 全部 on the workbench. Do not guess. ## 3. Install MCP for your agent ### Cursor Merge (do not wipe other servers) into workspace `.cursor/mcp.json` or `~/.cursor/mcp.json`: ```json { "mcpServers": { "huizhi-bd": { "url": "https://hzai.space/mcp", "headers": { "Authorization": "Bearer " } } } } ``` Replace `` with `token` from the claim JSON. Then tell the user to reload MCP / restart Cursor. ### Claude Code ``` claude mcp add --transport http huizhi-bd https://hzai.space/mcp --header "Authorization: Bearer " ``` ### Codex ``` codex mcp add huizhi-bd --url https://hzai.space/mcp ``` If Codex cannot set headers, write the same JSON as Cursor (including Authorization) into Codex MCP config. ### Windsurf — `~/.codeium/windsurf/mcp_config.json` Under `"mcpServers"` (note `serverUrl`): ```json "huizhi-bd": { "serverUrl": "https://hzai.space/mcp", "headers": { "Authorization": "Bearer " } } ``` ### GitHub Copilot / VS Code — `.vscode/mcp.json` Same `url` + `headers` shape as Cursor. ### Other agents Remote Streamable HTTP: POST `https://hzai.space/mcp` with `Authorization: Bearer ` and `Accept: application/json, text/event-stream`. JSON-RPC `initialize` or `server/discover` → `tools/list` → `tools/call`. Icon is Lobby `/lobby-mark.png`. ## 4. Verify Call `tools/list`. You should see `logs_search`, `registered_users`, `crm_search`, `db_query`, `funnel_kpis`, `hotel_search`, `open_console`. There is no logs page — use `logs_search`. Query Fxiaoke with `crm_search` (read-only). Need the website? `tools/call` `open_console` and open the returned URL (it lands on `/`, not `/login/agent`). Then tell the user: ``` ┌─ Huizhi BD Agent Setup Complete ──────────────┐ │ ✓ MCP huizhi-bd → https://hzai.space/mcp │ ⚡ Restart the agent if tools do not appear │ └──────────────────────────────────────────────┘ ``` These instructions: `https://hzai.space/agent-setup/prompt.md`