{
  "markdown": "# usetrail\n\nThe MCP server for **[Trail](https://usetrail.dev)** - it gives your coding agent your team's\ntracker and the project's durable memory, scoped to the folder you have open.\n\nYour agent stops working blind. It reads what is open, writes what it did, and records what it\nlearned the hard way - in the same board your team looks at, not in a scratch file that only\nthat session can see.\n\nThis package is the **client**. It talks to your Trail account over the REST API; there is no\ndatabase here. Dependencies are `@modelcontextprotocol/sdk`, `zod` and the built-in `fetch`.\n\n## Quick start\n\n```bash\n# 1. connect this machine to your Trail account (opens your browser; no token to copy)\nnpx -y usetrail@latest login\n\n# 2. register it with your agent - this example is Claude Code\nclaude mcp add trail -s user -- npx -y usetrail@latest\n```\n\nNo account yet? Create one at [usetrail.dev](https://usetrail.dev) - the free plan covers three\nprojects and three people.\n\n**Not tied to one agent.** This is a plain MCP server over stdio, speaking the three protocol\nversions in use today. Any MCP-compatible client can run it; only the registration command\ndiffers, and each client documents its own.\n\n**Prefer a local checkout?** Clone it instead, and the connector keeps itself up to date on its\nown (see [Updating](#updating)):\n\n```bash\ngit clone https://github.com/arsprengel/trail-mcp.git ~/.trail-mcp\nnpm --prefix ~/.trail-mcp install --omit=dev\nnode ~/.trail-mcp/bin.js login\nclaude mcp add trail -s user -- node ~/.trail-mcp/bin.js\n```\n\nOn Windows, write the real path instead of `~`: the registration stores the argument verbatim\nand Node does not expand it.\n\n## What your agent gets\n\n**The tracker** - `list_items`, `get_item`, `add_item`, `update_item`, `move_item`, `get_next`,\n`delete_item`. Real items on your team's board, with type, status, priority, assignees and\nhistory. Work the agent picks up shows as in progress and closes when it is done, so the board\nis not a story someone has to retell.\n\n**Project memory** - `list_memory`, `get_memory`, `add_memory`, `update_memory`, `review_memory`.\nThe durable knowledge of a project: the deploy that has a trap in it, the decision nobody should\nrelitigate, the command that is not in any README. Shared by everyone on the project, human or\nagent. A new session reads it before acting instead of rediscovering it.\n\n**Reminders** - `add_reminder`, `list_reminders`, `update_reminder`, `delete_reminder`. Things with\na date that must not be silently missed - and the agent closes or reschedules them itself once the\ndate arrives.\n\n**Attachments** - `add_attachment`, `get_attachment`. Files that belong to an item.\n\n## Which project it writes to\n\nTrail holds many projects. The connector uses **the folder you have open** as the project - the\nfolder name, or whatever a `.trail` file next to it says, or the `TRAIL_PROJECT` variable. So\nthe agent writes to the right project without being told, and two repositories never bleed into\neach other. To reach across, the agent passes `project` explicitly on the tool.\n\n## Session hook (Claude Code, Gemini CLI, Antigravity)\n\nInstalled for you, once, when you log in - and on the connector's first run, which covers people\nwho paste a token into the registration instead of logging in through the browser. Every session\nthat starts in a project with a tracker gets the open items and the project memory in context from\nthe first message - the agent starts knowing, instead of depending on someone remembering to ask.\nFail-silent by design: no login or no network and the hook stays quiet.\n\nEach tool keeps this in its own place, so the connector writes to the one that tool actually reads:\n\n- **Claude Code** - a session-start hook in `~/.claude/settings.json`.\n- **Gemini CLI** - a session-start hook in `~/.gemini/settings.json`.\n- **Antigravity** - the tools are registered in `~/.gemini/config/mcp_config.json`, which is the\n  file it actually reads: **`gemini mcp add` does not connect Trail in Antigravity**, because that\n  command writes to `~/.gemini/settings.json` instead. Field-tested on Antigravity 2.11 (Windows),\n  of the three things that live in that config folder only the tool registration is honored - the\n  opening-summary hook is not run, and a plugin folder placed exactly where its own documentation\n  says is not read. So on Antigravity the agent gets the tools and the server's working rules, and\n  fetches the project summary itself on the first turn instead of receiving it. The plugin path is\n  built and tested behind a switch, waiting for that to change.\n\n`usetrail status` tells you, per tool found on this machine, whether it is on - so you never have\nto go digging through settings files to find out.\n\nIt never fights you. A tool that isn't on the machine gets nothing created for it, and\n`hooks install` will not fabricate a config for a program you don't have. If you remove it with\n`hooks uninstall`, it does not come back on its own - put it back with:\n\n```bash\nnpx -y usetrail@latest hooks install\n```\n\nClients without a hook mechanism are covered too: the server's own instructions tell the agent\nto fetch the summary itself before acting.\n\n## Your own Trail\n\nPoint it at your server once and it stays pointed:\n\n```bash\nTRAIL_API_URL=https://your-trail npx -y usetrail@latest login\n```\n\nWithout that variable, `login` goes to the hosted service.\n\n## Commands\n\n```bash\nnpx -y usetrail@latest            # start the MCP server over stdio - what your agent runs\nnpx -y usetrail@latest login      # connect this machine (browser confirmation, no token copying)\nnpx -y usetrail@latest status     # server address, current project, whether a token is present\nnpx -y usetrail@latest logout     # delete the saved token\nnpx -y usetrail@latest doctor     # find the install on this machine and unstick auto-updates\n```\n\nThe token is stored at `~/.config/trail/token.json` (mode 600). Revoke it whenever you want from\nthe \"AI token\" panel in the app.\n\n## Configuration\n\n| Variable | What it does |\n| --- | --- |\n| `TRAIL_API_URL` | Your own Trail's address. Saved after the first login. Defaults to the hosted service. |\n| `TRAIL_PROJECT` | Forces the project name (default: the open folder). |\n| `TRAIL_API_TOKEN` | A token directly, skipping the browser login. Useful in CI. |\n| `TRAIL_LANG` | Language of what the connector prints on screen: `pt` or `en`. Without it, your system's language, and English when your system states none. Never changes what the agent reads. |\n\nThe former names (`TETHER_*`) keep working, with no deadline - the product used to be called\nTether, and nothing anyone already configured has to change.\n\n## Updating\n\n**The `@latest` is not decoration.** Registered as `npx -y usetrail@latest`, the connector resolves\nthe published version every time your agent starts a session, so a new release reaches you without\nanyone doing anything. Registered as bare `npx usetrail`, npm reuses whatever copy it cached the\nfirst time - and that machine stays on that version forever. Use `@latest`.\n\nThe cost of `@latest` is about a second at session start, and a network call. Neither matters in\npractice: the connector talks to Trail over the network anyway.\n\nA cloned install updates itself differently: on startup it fires a quiet fast-forward pull in the\nbackground, at most every six hours. The running session keeps the version it loaded; the next one\nstarts updated. No network or a local conflict and nothing happens, silently.\n\nStuck on an old version? `npx -y usetrail@latest doctor` finds the install, reports the version and\nunsticks it.\n\n## Requirements\n\nNode 18 or newer.\n\n## License\n\nMIT. This package is the client - the connector you run on your own machine. Use it, fork it,\nadapt it. The Trail service it talks to is a separate, hosted product.\n",
  "bytes": 7817,
  "sha": "6f36de3843dc542b4b6c5744da0aa1602c3d47c033e76f58b4ec53d852cc3162",
  "repo_slug": "arsprengel/trail-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_dev_usetrail_trail_dbeec4aa/readme"
}