Agent Setup
Connect your first AI agent to Memax using MCP, hooks, or CLI piping.
Choose your integration method
Memax supports three integration tiers, ordered by recommendation:
| Method | Setup | Best for |
|---|---|---|
| MCP Server | 5 lines in config | Always-on recall + push (recommended) |
| Hooks | One CLI command | Ambient context injection |
| CLI Piping | Shell scripting | One-off queries, scripts |
MCP Server (recommended)
The MCP (Model Context Protocol) server gives your agent direct tool access to Memax. The agent decides when to recall or push — no manual intervention needed.
Run the interactive setup:
memax setup claude-codeOr manually add to ~/.claude.json:
{
"mcpServers": {
"memax": {
"command": "npx",
"args": ["-y", "memax-cli", "mcp", "serve"]
}
}
}Your Claude Code agent now has access to memax_recall, memax_push, memax_search, and other tools.
Add to your Cursor MCP configuration (.cursor/mcp.json):
{
"mcpServers": {
"memax": {
"command": "npx",
"args": ["-y", "memax-cli", "mcp", "serve"]
}
}
}Any MCP-compatible client can connect to the Memax MCP server:
npx memax-cli mcp serveThis starts a stdio-based MCP server that exposes the standard Memax tools.
Available MCP tools
| Tool | Description |
|---|---|
memax_recall | Semantic search for relevant memories |
memax_push | Store new knowledge |
memax_search | Browse memories by category, tags, or filters |
memax_get | Retrieve a specific memory by ID |
memax_forget | Delete a memory |
memax_capture | Capture and store content from URLs |
memax_topics | List knowledge topics |
Hooks
Hooks inject context before every agent prompt. This is useful for always-on context like project briefs and team conventions.
memax hook install claude-codeThis creates a Claude Code hook that runs memax recall with the user's prompt, injecting relevant context under <memax-context> tags.
MCP + hooks work well together. MCP handles on-demand recall and push. Hooks provide ambient context injection on every prompt.
CLI Piping
The universal fallback. Works with any agent or workflow:
# Pipe context into an agent
memax recall "how does deployment work?" | pbcopy
# Use in scripts
CONTEXT=$(memax recall "auth system design")
echo "Given this context: $CONTEXT, explain the auth flow"For detailed integration guides per agent, see the Integrations section.