MCP Clients
Connect Model Context Protocol clients over SSE or stdio.
The MemexAI service exposes the same core tool engine over Model Context Protocol. REST and MCP share path validation, tool execution, revisions, and access logs.
SSE transport
http://localhost:8080/v1/mcp/sse?userId=user_123&actor=claude&apiKey=dev-agent-keyuserId defaults to default, and actor defaults to mcp-client.
The API key can be sent as:
Authorization: Bearer ...apiKeyquery parametertokenquery parameter
Query auth exists for MCP clients that cannot set headers on SSE GET requests.
Messages for SSE sessions are posted back to:
http://localhost:8080/v1/mcp/messages?connectionId=...Stdio transport
Build the service first:
bun run build:serviceThen run the compiled service in stdio mode:
DATABASE_URL=postgresql://memexai:memexai@localhost:5433/memexai \
MEMEX_API_KEY=dev-agent-key \
node apps/service/dist/index.js --stdio --user-id user_123 --actor claude-desktopExposed tools
MCP clients can call the same memory tools as the REST and direct-mode APIs:
memory_memorizememory_searchmemory_listmemory_readmemory_writememory_patchmemory_smart_read