Skip to main content
Droid ships a first-party hooks system in the same shape Claude Code uses, so it gets both MCP tools and native auto-capture from one command.

Setup

1

Start agentmemory

2

Wire MCP and hooks

The adapter detects ~/.factory/, backs up mcp.json, merges the entry, verifies it, and merges the hook manifest into ~/.factory/hooks.json.
3

Restart droid

Start a new droid session and run /mcp to list configured servers.
4

Verify

Run one prompt, then check the Sessions tab at http://localhost:3113; with hooks installed the session and its tool calls appear without any tool invocation by the agent.

What connect writes

Droid’s schema requires an explicit type per entry; the adapter adds "type": "stdio" to the standard block:
~/.factory/mcp.json
Project-scoped overrides live at <repo>/.factory/mcp.json.

What --with-hooks writes

--with-hooks merges the bundled hooks.droid.json manifest into ~/.factory/hooks.json. Five events fire: SessionStart, UserPromptSubmit, PreToolUse (matcher Edit|Create|Read|Glob|Grep), PostToolUse, and SessionEnd. The merge is idempotent: re-installs replace only entries whose command points under the bundled scripts/ directory, preserving your own hooks. The hooks installer runs even when MCP is already wired. connect also upserts a memory-usage guideline block into the global ~/.factory/AGENTS.md. Skip with --no-guidelines.
Hook entries reference absolute paths under the installed package’s plugin/ directory. Re-run agentmemory connect droid --with-hooks after upgrading agentmemory to refresh them.

Troubleshooting

The installer resolves the bundled plugin/ directory of the installed @agentmemory/agentmemory package and skips hook install when it is missing. Reinstall the package and re-run; MCP wiring is applied regardless.
Droid reads ~/.factory/mcp.json at session start. Open a new session. If a project-level .factory/mcp.json exists in the repo, it overrides the user-level file; add the entry there too.
Adapter source: src/cli/connect/droid.ts. Hook manifest: plugin/hooks/hooks.droid.json.
Last modified on August 15, 2026