Integrations
CrewAI
Give a CrewAI agent persistent, governed memory with MemClaw over MCP.
MemClaw is MCP-native, so a CrewAI agent can pick up
the full memclaw_* tool surface through crewai-tools'
MCPServerAdapter.
pip install crewai "crewai-tools[mcp]"from crewai import Agent
from crewai_tools import MCPServerAdapter
server_params = {
"url": "https://memclaw.net/mcp",
"transport": "streamable-http",
# Use an agent-scoped key in production (see Per-agent keys below).
"headers": {"X-API-Key": "mc_xxx"},
}
# MCPServerAdapter is a context manager — it opens the connection and
# exposes the memclaw_* tools for the duration of the block.
with MCPServerAdapter(server_params) as mcp_tools:
agent = Agent(
role="Memory-backed assistant",
goal="Remember and recall facts across sessions.",
backstory="I persist what I learn to MemClaw and recall it on demand.",
tools=mcp_tools,
verbose=True,
)
Note the transport string is streamable-http (with a hyphen) here — that's
the value crewai-tools expects.
Always bind a real agent_id to the credential. For anything beyond a
prototype, give each agent its own agent-scoped key — see
Per-agent keys — so trust gating, fleet
membership, and per-agent keystones apply.
Prefer REST?
If you don't want to run an MCP client, wrap MemClaw's
POST /api/v1/memories and
POST /api/v1/recall as CrewAI tools with the
@tool decorator from crewai.tools. See REST for
the request shapes.