Skip to content

ElevenLabs

ElevenLabs Agents connect to AutoMem through the same remote MCP sidecar used by other cloud platforms (ChatGPT, Claude.ai). ElevenLabs supports custom HTTP headers, making it the only cloud platform that can use the more secure header-based authentication.


The MCP sidecar bridges ElevenLabs voice agents to AutoMem’s HTTP API:

graph TB
    subgraph "Remote MCP (HTTP/SSE Transport)"
        EL["ElevenLabs Agents Platform"]
        SIDECAR["MCP Sidecar — POST /mcp / GET /mcp/sse"]
        AUTOMEM["AutoMem API :8001"]

        EL -->|"HTTPS + Bearer token"| SIDECAR
        SIDECAR -->|"HTTP"| AUTOMEM
    end

  1. A deployed AutoMem service
  2. The MCP sidecar deployed and accessible over HTTPS
  3. An ElevenLabs account with Agents access

The sidecar is included in the AutoMem Railway one-click template. See Claude.ai (Web) for full deployment instructions.

Required environment variables:

VariablePurpose
AUTOMEM_API_URLAutoMem service URL
AUTOMEM_API_TOKENDefault token for API authentication
PORTListen port (default: 8080)

ElevenLabs-specific note: The SSE transport heartbeat (every 20 seconds) is specifically designed to keep connections alive past ElevenLabs’ 30-second idle timeout. Ensure the sidecar deployment does not have its own idle timeout shorter than 30 seconds.


Configure the MCP server in your ElevenLabs Agent settings:

Section titled “Option 1: Header-Based Authentication (Recommended)”

ElevenLabs supports custom HTTP headers, so you can use the more secure Authorization header:

  • Server URL: https://your-mcp-bridge.up.railway.app/mcp/sse
  • Custom Header Name: Authorization
  • Custom Header Value: Bearer YOUR_AUTOMEM_TOKEN

Or using Streamable HTTP:

  • Server URL: https://your-mcp-bridge.up.railway.app/mcp
  • Custom Header Name: Authorization
  • Custom Header Value: Bearer YOUR_AUTOMEM_TOKEN

SSE transport:

https://your-mcp-bridge.up.railway.app/mcp/sse?api_token=YOUR_AUTOMEM_TOKEN

Streamable HTTP:

https://your-mcp-bridge.up.railway.app/mcp?api_token=YOUR_AUTOMEM_TOKEN

ElevenLabs voice agents benefit from memory in several ways:

User preference recall — Remember communication preferences across sessions:

recall_memory(
tags: ["preference", "elevenlabs"],
limit: 5
)

Context continuity — Resume conversations with context from previous sessions:

recall_memory(
query: "last conversation with this user",
time_query: "last 7 days"
)

Knowledge persistence — Store facts the user shares:

store_memory(
content: "User's name is Alex. Prefers brief responses.",
type: "Preference",
importance: 0.9,
tags: ["elevenlabs", "user-preferences"]
)

All six AutoMem tools are accessible to ElevenLabs agents:

ToolDescription
store_memoryStore voice-captured information
recall_memoryFind relevant memories for current conversation
associate_memoriesCreate relationships between related memories
update_memoryUpdate existing memory content or metadata
delete_memoryRemove a specific memory
check_database_healthVerify AutoMem service is running

ElevenLabs has a 30-second idle timeout on SSE connections. The sidecar handles this automatically:

  • SSE heartbeats sent every 20 seconds (within the 30s timeout window)
  • Heartbeat format: : ping\n\n (SSE comment, not a data event)
  • Anti-buffering headers set: X-Accel-Buffering: no, Cache-Control: no-cache

If you observe connection drops:

  1. Check that no intermediate proxy is buffering the SSE stream
  2. Verify the proxy passes through SSE headers
  3. Consider using Streamable HTTP (/mcp) instead of SSE (/mcp/sse)

Test the connection through your ElevenLabs agent:

"Check the health of the AutoMem service"

Test memory:

"Remember that I prefer concise responses."
"What are my preferences?"

  1. Verify sidecar health: curl https://your-mcp-bridge.up.railway.app/health
  2. Check TLS certificate is valid
  3. Ensure port 443 is reachable from ElevenLabs’ servers
  1. For header auth: verify the header name is exactly Authorization and value is Bearer YOUR_TOKEN
  2. For URL auth: verify token is URL-encoded if it contains special characters
  3. Test token: curl -H "Authorization: Bearer $TOKEN" https://your-mcp-bridge.up.railway.app/health

Connection drops during agent conversation

Section titled “Connection drops during agent conversation”

The SSE heartbeat (every 20 seconds) should prevent ElevenLabs’ 30-second timeout. If drops persist:

  • Switch to Streamable HTTP (/mcp) — lower latency, no idle timeout issues
  • Check sidecar logs for session expiration (sessions expire after 1 hour of inactivity)

Memory service unreachable (sidecar returns 502)

Section titled “Memory service unreachable (sidecar returns 502)”

Verify AUTOMEM_API_URL in sidecar environment variables points to the correct AutoMem service. On Railway, use the internal hostname: http://memory-service.railway.internal:8001.


Other cloud platforms using the same MCP sidecar: