Connect your Claude Code
alfe claude connect gives the Claude Code you already use access to an Alfe agent.
After you run it, a plain claude session on that machine has Alfe’s tools, recalls
that agent’s memory when it starts, and saves new messages to memory as it goes.
This is different from the Claude Code runtime, where Alfe runs the agent for you. Here, you stay at the keyboard in your own terminal sessions.
Before you start
Section titled “Before you start”You need the following on the machine:
- Claude Code installed, with
claudeon yourPATH. - The Alfe CLI, installed with
npm install -g @alfe.ai/cli. - An agent key in
~/.alfe/config.toml. Generate a setup token on the agent’s Overview tab, then runalfe login --token <SETUP_TOKEN>.
Connect
Section titled “Connect”Run this once:
alfe claude connectIt’s safe to re-run. It does two things:
- Registers the Alfe MCP server in Claude Code at user scope, as
alfe-platform. - Adds memory hooks to
~/.claude/settings.jsonforSessionStart,Stop, andSessionEnd. Your existing settings and hooks stay in place. If the file isn’t valid JSON, the command stops rather than overwrite it.
Verify
Section titled “Verify”Start a new session and list its MCP servers:
claudeThen type /mcp in the session. It should list alfe-platform.
What you get
Section titled “What you get”A connected session gains these capabilities:
- Alfe tools, including memory, voice, messaging, and search.
- Recall at session start. The hook loads relevant memory into the session.
- Capture as you go. The hooks send new user and assistant messages to the agent’s memory when Claude stops and when the session ends.
A hook never breaks your session. If Alfe is unreachable, it does nothing, and it retries the unsaved messages next time.
Disconnect
Section titled “Disconnect”There’s no disconnect command, and alfe remove doesn’t touch
Claude Code. To undo the connection, remove the MCP server:
claude mcp remove --scope user alfe-platformThen delete the alfe claude hook entries from ~/.claude/settings.json.