API documentation · Memory API
Agent Memory MCP
Use Engra Agent Memory from MCP clients (Cursor, Claude Desktop, etc.) via Model Context Protocol Streamable HTTP. See the REST API guide for HTTP integration.
MCP endpoint
Single URL supporting POST / GET / DELETE (stateless JSON mode). Clients send JSON-RPC messages to this endpoint.
https://ai-sass-7pymefszf-keyskulls-projects.vercel.app/api/v1/memory/mcp
Authentication
MCP and REST share the same dashboard API keys (inf_ prefix). Tenant-scoped keys are required; local .env placeholder keys cannot be used for production MCP.
Create an API key
- Open Console → API keys (/dashboard/keys)
- Multi-select scopes under Gateway / Memory groups
- Quick presets: MCP read-only, MCP read/write, Gateway default
- Read-only agents: memory:read only
- For memory_save_atom: add memory:write
- Memory MCP usually needs no Gateway binding
- Copy the inf_… key immediately into your MCP client Authorization header
Scope reference
- memory:read — memory_list_libraries / search / recall / wake-up / list_atoms
- memory:write — memory_save_atom, POST /atoms
Headers
- Authorization: Bearer inf_xxxxxxxx (recommended)
- X-API-Key: inf_xxxxxxxx
- Do not use upstream Gemini/OpenAI keys — those belong in Gateway upstream settings
Transport
- Protocol: MCP Streamable HTTP (2025-11-25)
- Mode: stateless + JSON response (one POST → one JSON body, no long-lived SSE required)
- Standard MCP methods supported: initialize, tools/list, tools/call, etc.
Recommended workflow
- Call memory_list_libraries first to obtain memoryLibraryId
- Use memory_search / memory_recall / memory_wake_up for retrieval
- Use memory_save_atom for synchronous writes
- All tools except list_libraries require memoryLibraryId in arguments
Tools
| Tool | Scope | Description |
|---|---|---|
| memory_list_libraries | memory:read | List memory libraries for the workspace (id, name, slug, persona) |
| memory_search | memory:read | L3 deep semantic search |
| memory_recall | memory:read | L2 topic recall |
| memory_wake_up | memory:read | L0+L1 wake-up stack |
| memory_save_atom | memory:write | Save an atom synchronously (same as ?sync=1) |
| memory_list_atoms | memory:read | Paginated atom list |
Cursor configuration example
{
"mcpServers": {
"engra-memory": {
"url": "https://ai-sass-7pymefszf-keyskulls-projects.vercel.app/api/v1/memory/mcp",
"headers": {
"Authorization": "Bearer inf_xxxxxxxx"
}
}
}
}HTTP integration
Custom MCP clients should follow the Streamable HTTP spec: POST requests need Accept including application/json and text/event-stream. This server primarily responds with application/json.