Summary
The install guide installs/symlinks the iai-mcp CLI at ~/.local/bin/iai-mcp, but the installed Claude hook scripts do not include that path in their CLI discovery candidates. In a Claude hook runtime that does not inherit the user's interactive shell PATH, hooks can be reported as ACTIVE while still logging skipped: iai-mcp CLI not found and silently skipping recall/capture work.
Environment
- iai-mcp version:
0.4.2
- iai-mcp commit:
5df9101
- macOS version:
macOS-26.4.1-arm64-arm-64bit
- Python version:
3.12.13
- Node version:
v22.22.1
- MCP host: Claude Code
- Install path: local editable checkout with CLI symlinked at
~/.local/bin/iai-mcp
Steps to reproduce
- Follow the README/install guide with
bash scripts/install.sh.
- Let the installer create the global CLI symlink at
~/.local/bin/iai-mcp.
- Install hooks with
iai-mcp capture-hooks install.
- Run
iai-mcp capture-hooks status.
- Start/use Claude Code in an environment where hook scripts do not inherit an interactive shell
PATH containing ~/.local/bin.
- Check the iai-mcp hook logs under
~/.iai-mcp/logs/.
Expected behaviour
The installed hooks should find the CLI installed by the installer/README without requiring an additional manual cache file or shell PATH inheritance.
Actual behaviour
iai-mcp capture-hooks status reports the hooks are wired and active, but hook execution can log:
skipped: iai-mcp CLI not found
In this state, recall/capture hook work is skipped even though the install guide's CLI symlink exists.
Evidence
The installer creates the symlink:
~/.local/bin/iai-mcp -> <repo>/.venv/bin/iai-mcp
The installed hook scripts locate the CLI using:
IAI_MCP_SESSION_RECALL_CLI / IAI_MCP_SESSION_CAPTURE_CLI
~/.iai-mcp/.cli-path
- hard-coded candidates:
$HOME/IAI-MCP/.venv/bin/iai-mcp
/usr/local/bin/iai-mcp
They do not include:
The local workaround was to create:
with the absolute path:
/Users/dpearson/.local/bin/iai-mcp
After that, hook CLI discovery has a deterministic path independent of ambient shell PATH.
Suspected cause
The installer and the hook templates disagree about the canonical guide-installed CLI location. The installer uses ~/.local/bin, while the hooks only try /usr/local/bin and an uppercase $HOME/IAI-MCP checkout path unless the cache/env override is already populated.
Suggested fix
Any of these should make the guide install self-consistent:
- Add
$HOME/.local/bin/iai-mcp to the hook candidate list.
- Have the installer write
~/.iai-mcp/.cli-path with the symlink target or ~/.local/bin/iai-mcp during install.
- Export
PATH="$HOME/.local/bin:$PATH" inside the installed hook scripts before attempting CLI lookup.
Option 1 or 2 seems preferable because hook success should not depend on the MCP host inheriting an interactive shell PATH.
Summary
The install guide installs/symlinks the
iai-mcpCLI at~/.local/bin/iai-mcp, but the installed Claude hook scripts do not include that path in their CLI discovery candidates. In a Claude hook runtime that does not inherit the user's interactive shellPATH, hooks can be reported asACTIVEwhile still loggingskipped: iai-mcp CLI not foundand silently skipping recall/capture work.Environment
0.4.25df9101macOS-26.4.1-arm64-arm-64bit3.12.13v22.22.1~/.local/bin/iai-mcpSteps to reproduce
bash scripts/install.sh.~/.local/bin/iai-mcp.iai-mcp capture-hooks install.iai-mcp capture-hooks status.PATHcontaining~/.local/bin.~/.iai-mcp/logs/.Expected behaviour
The installed hooks should find the CLI installed by the installer/README without requiring an additional manual cache file or shell PATH inheritance.
Actual behaviour
iai-mcp capture-hooks statusreports the hooks are wired and active, but hook execution can log:In this state, recall/capture hook work is skipped even though the install guide's CLI symlink exists.
Evidence
The installer creates the symlink:
The installed hook scripts locate the CLI using:
IAI_MCP_SESSION_RECALL_CLI/IAI_MCP_SESSION_CAPTURE_CLI~/.iai-mcp/.cli-path$HOME/IAI-MCP/.venv/bin/iai-mcp/usr/local/bin/iai-mcpThey do not include:
The local workaround was to create:
with the absolute path:
After that, hook CLI discovery has a deterministic path independent of ambient shell
PATH.Suspected cause
The installer and the hook templates disagree about the canonical guide-installed CLI location. The installer uses
~/.local/bin, while the hooks only try/usr/local/binand an uppercase$HOME/IAI-MCPcheckout path unless the cache/env override is already populated.Suggested fix
Any of these should make the guide install self-consistent:
$HOME/.local/bin/iai-mcpto the hook candidate list.~/.iai-mcp/.cli-pathwith the symlink target or~/.local/bin/iai-mcpduring install.PATH="$HOME/.local/bin:$PATH"inside the installed hook scripts before attempting CLI lookup.Option 1 or 2 seems preferable because hook success should not depend on the MCP host inheriting an interactive shell PATH.