# Hugy: full reference for AI agents > Everything an agent needs to connect to Hugy's MCP server. Short version: https://hugy.ai/llms.txt Hugy is a user-owned memory for AI agents, stored as markdown files (for example USER.md and MEMORY.md). Agents connect over MCP. Files are encrypted in transit and at rest. ## Step 0: the user creates a token (required for every client) 1. The user signs in at https://hugy.ai/app/ (free; Hugy emails a sign-in link). 2. Under "Connect your agents", the user creates a named token for this agent, for example "Claude Duet", and copies it. Hugy shows it only once. 3. Use it below in place of ``. Treat it like a password: anyone who has it can read and write the user's memory files until it is revoked. The user can revoke any token in the app. There is no OAuth flow. An agent cannot create a token by itself; ask the user for one. ## Connection details - Endpoint: `https://hugy.ai/app/mcp` (MCP Streamable HTTP, JSON-RPC 2.0, protocol version 2025-06-18) - Header auth: `Authorization: Bearer ` - URL auth (for clients without custom headers): `https://hugy.ai/app/mcp/`. Because this address contains the token, keep it private. ## Per-client steps ### Meta Muse (beta, not yet verified) 1. Add Hugy as a connected service (custom MCP connector) if your Muse plan offers one. 2. Use the single connector address: `https://hugy.ai/app/mcp/` 3. Status: the token-in-URL form works on the Hugy server, but we have not yet confirmed a full connection from Muse. ### Claude Duet 1. Claude Duet uses the connectors on your Claude account. In Claude, open Settings, then Connectors, and add a custom connector. 2. Server URL: `https://hugy.ai/app/mcp` 3. Authentication: bearer token, with your Hugy token as the value. ### OpenAI Dots (paid ChatGPT Pro, Business or Enterprise plans only) 1. If your plan allows custom connectors, add one with server URL `https://hugy.ai/app/mcp`. 2. Use your Hugy token as the bearer token. ### Grok Bot (works with the token-in-URL form) 1. Add Hugy as an MCP connector using the single connector address: `https://hugy.ai/app/mcp/` 2. Status: works. A Grok Bot connection with this token-in-URL form completed initialize and tools/list on October 27, 2026. Keep this address private, since it contains your token. ### OpenClaw Add Hugy under `mcp.servers` in your OpenClaw config: ```json { "mcp": { "servers": { "hugy": { "url": "https://hugy.ai/app/mcp", "headers": { "Authorization": "Bearer " } } } } } ``` ### Hermes Add Hugy under `mcp_servers` in your Hermes config: ```yaml mcp_servers: hugy: url: "https://hugy.ai/app/mcp" headers: Authorization: "Bearer " ``` ### Any other MCP client Point it at `https://hugy.ai/app/mcp` with the bearer header, or at `https://hugy.ai/app/mcp/` if it cannot send headers. ## Tools - `list_files`: list the user's memory files with size and last update. - `read_file(name)`: read one file, e.g. USER.md or MEMORY.md. - `write_file(name, content)`: create or replace a file with full new content. - `append_memory(text, file?)`: append one dated fact or preference (defaults to MEMORY.md). - `search(query)`: case-insensitive text search across all files. Recommended: read USER.md and MEMORY.md at the start of a task, and save durable facts with `append_memory`. ## Check it worked Ask the agent: "Read my Hugy USER.md file." Then ask it to remember something, and open https://hugy.ai/app/ to see the new line in MEMORY.md. ## Protocol details - Transport: MCP Streamable HTTP. Send JSON-RPC 2.0 requests with POST to the endpoint. Responses are `application/json`. - `initialize` returns serverInfo `{"name":"hugy","title":"Hugy memory","version":"0.1.0"}`, protocolVersion `2025-06-18`, and capabilities `{"tools":{"listChanged":false}}`. The server returns an `Mcp-Session-Id` header. - CORS is open (`Access-Control-Allow-Origin: *`) for the Authorization, Content-Type, Mcp-Session-Id and Mcp-Protocol-Version headers. - Without a valid token the server answers HTTP 401 with `WWW-Authenticate: Bearer realm="hugy"` and JSON-RPC error code -32001: "Unauthorized: add a Hugy token from https://hugy.ai/app/". Example: ``` curl -s https://hugy.ai/app/mcp \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' ``` ## Files and limits - File names: letters, numbers, `.`, `_` and `-`, up to 64 characters, ending in `.md` (for example USER.md, MEMORY.md). - Each file: UTF-8 text, at most 256 KB. - Request bodies: at most 1 MB. ## Tool input schemas (from tools/list) ```json [ { "name": "list_files", "description": "List the user's Hugy memory files (markdown) with size and last update.", "inputSchema": { "type": "object", "properties": {}, "required": [] }, "annotations": { "readOnlyHint": true } }, { "name": "read_file", "description": "Read one Hugy markdown file, e.g. USER.md or MEMORY.md.", "inputSchema": { "type": "object", "properties": { "name": { "type": "string", "description": "File name ending in .md" } }, "required": [ "name" ] }, "annotations": { "readOnlyHint": true } }, { "name": "write_file", "description": "Create or replace a Hugy markdown file with the full new content.", "inputSchema": { "type": "object", "properties": { "name": { "type": "string" }, "content": { "type": "string" } }, "required": [ "name", "content" ] }, "annotations": { "destructiveHint": true } }, { "name": "append_memory", "description": "Append one dated fact or preference you learned about the user to MEMORY.md (or another file).", "inputSchema": { "type": "object", "properties": { "text": { "type": "string" }, "file": { "type": "string", "description": "Optional, defaults to MEMORY.md" } }, "required": [ "text" ] } }, { "name": "search", "description": "Case-insensitive text search across all of the user's Hugy files. Returns matching lines.", "inputSchema": { "type": "object", "properties": { "query": { "type": "string" } }, "required": [ "query" ] }, "annotations": { "readOnlyHint": true } } ] ``` ## REST API (used by hugy-sync.py) Base `https://hugy.ai/app/api`, same bearer token: `GET /files`, `GET /files/{name}`, `PUT /files/{name}` with body `{"content": "..."}`. Script: https://hugy.ai/app/hugy-sync.py ## Security and privacy Files are encrypted in transit and at rest. They are never sold and never used to train models. Hugy is not end-to-end encrypted. Users can see, edit, export or delete anything, and revoke any token at any time. Privacy Policy: https://hugy.ai/privacy/ ## Coordination (also at https://hugy.ai/agents/coordination.md) You are an AI agent. Hugy is your user's memory, stored as markdown files. Every agent the user connects reads and writes the same files. Save what you learn into Hugy; read what other agents saved out of Hugy. ### 1. Connect 1. Ask the user for a Hugy token. They create one at https://hugy.ai/app/ under "Connect your agents". You cannot create one yourself. There is no OAuth. 2. Connect to the MCP endpoint one of two ways: - Header: `https://hugy.ai/app/mcp` with `Authorization: Bearer ` - Token in URL (if your client cannot send headers): `https://hugy.ai/app/mcp/` 3. Verify: call `list_files`. You should get the user's file list. A 401 means the token is wrong or revoked; ask the user for a new one. 4. Never repeat the token in chat, files or logs. Client-specific steps: https://hugy.ai/AGENTS.md ### 2. Session protocol - Start: `read_file` USER.md and MEMORY.md. If a handoff file exists (see below), read it too. - During the task: `search` Hugy before asking the user something they may have told another agent. - End: `append_memory` each new durable fact or preference, one per call. Skip anything temporary. ### 3. Coordinate with other agents Tools: `list_files`, `read_file`, `write_file`, `append_memory`, `search`. Nothing else. Suggested shared files (a convention, not a requirement): - `USER.md`: the user's profile. The user owns it. Read it; change it only when the user asks. - `MEMORY.md`: append-only facts and preferences. - `TASKS.md` or `HANDOFF.md` (optional): work passed from one agent to another. - Per-agent notes: `agent-.md`, for example `agent-claude-duet.md`. File names cannot contain `/`; use letters, numbers, `.`, `_` and `-`, ending in `.md`. Rules: 1. Tag every entry with your platform name and the date, for example `[2026-10-27 Meta Muse] Prefers metric units.` 2. Prefer `append_memory` (it takes an optional `file`) over `write_file`, so you don't overwrite other agents. 3. Before `write_file`, `read_file` the latest version in the same step, then write the whole file back with your change, keeping everyone else's content. 4. Never store secrets: no passwords, tokens, keys or card numbers. 5. Respect the user's edits. If the user changed or deleted something, do not put it back. 6. When you finish someone else's handoff item, append a dated line saying it is done rather than deleting it. Hugy has no locking and no real-time sync. Two agents writing the same file at the same time can overwrite each other. These rules are a convention that agents follow; Hugy does not enforce them. Every connected agent can read and write every file. ### 4. Example handoff 1. Meta Muse learns the user is vegetarian. It calls `append_memory` with `[2026-10-27 Meta Muse] Vegetarian; no fish.` 2. Muse starts a dinner plan it can't finish and calls `append_memory` with `file: "HANDOFF.md"` and `[2026-10-27 Meta Muse] Open: book a table for 4 on Friday. Vegetarian options needed.` 3. Later the user opens Claude Duet. Duet reads USER.md, MEMORY.md and HANDOFF.md, and already knows both. 4. Duet does the task, then appends `[2026-10-28 Claude Duet] Done: Friday booking handled.` to HANDOFF.md. The user can open https://hugy.ai/app/ at any time to see, edit, export or delete any of it. Meta Muse, Claude Duet, OpenAI Dots, Grok Bot, OpenClaw and Hermes are names of their respective owners, used as descriptive labels only. Hugy is not affiliated with them.