Connecting Agents
Agent Brain supports MCP clients and REST clients. MCP is the easiest path for coding agents that support tool servers. REST is useful for scripts, custom agents, and integrations.
MCP endpoint
Use this endpoint for Claude Code, Codex, Cursor, Gemini CLI, and other MCP-capable clients:
http://localhost:3100/mcp
Example configuration:
{
"mcpServers": {
"agent-brain": {
"type": "http",
"url": "http://localhost:3100/mcp"
}
}
}
REST endpoint
Use REST when MCP is not available:
http://localhost:9090/api/v1
Store a memory:
curl -X POST http://localhost:9090/api/v1/remember \
-H 'Content-Type: application/json' \
-d '{
"content": "Auth uses JWT with 24h expiry. Refresh tokens are stored in Redis.",
"type": "decision",
"importance": 0.8,
"tags": ["auth", "jwt", "redis"]
}'
Recall context:
curl -X POST http://localhost:9090/api/v1/recall \
-H 'Content-Type: application/json' \
-d '{"query": "how does authentication work?"}'
Verification
After connecting an agent, ask it to check available tools or store a small test memory. Then confirm the memory appears in the desktop Knowledge Explorer.