Skip to main content
While our SDKs are the recommended way to integrate Jean Memory, we provide a powerful, low-level Model Context Protocol (MCP) API for advanced use cases. This is the same endpoint that enterprise partners like Claude use to integrate Jean Memory as a tool.
When to use the MCP API:
  • You are building an autonomous AI agent.
  • You need to integrate Jean Memory as a callable tool for an existing LLM.
  • You require streaming responses using Server-Sent Events (SSE).

Endpoint

The primary endpoint for all MCP interactions.
POST https://jean-memory-api-virginia.onrender.com/mcp/v2/{client_name}/{user_id}
client_name
string
required
A unique identifier for your application (e.g., my-agent, claude).
user_id
string
required
The unique identifier for the end-user.

Authentication

All requests must include a valid JWT in the Authorization header.
Authorization: Bearer <your_pkce_jwt>
For SDK Users: Our SDKs handle the PKCE flow and JWT tokens automatically. For Custom Clients: You will need to implement a standard PKCE authentication flow to acquire a user-specific JWT token.

The jean_memory Tool

The primary tool for all interactions. It provides intelligent context engineering with configurable depth levels.

Tool Parameters

user_message
string
required
The user’s complete message or query.
is_new_conversation
boolean
required
Set to true only for the very first message in a new conversation.
depth
integer
default:"2"
The desired context depth level.

Example Request

{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "tool_name": "jean_memory",
    "tool_params": {
      "user_message": "What have I been working on recently?",
      "is_new_conversation": false,
      "depth": 2
    }
  },
  "id": "1"
}

Streaming (SSE)

For clients that support streaming, include the Accept: text/event-stream header.
const eventSource = new EventSource(
  `https://jean-memory-api-virginia.onrender.com/mcp/v2/${clientName}/${userId}`,
  {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${token}`,
      'Content-Type': 'application/json',
      'Accept': 'text/event-stream',
    },
    body: JSON.stringify({ ... })
  }
);
Heartbeats: The API sends colon-prefixed comments (:heartbeat) to keep the connection alive. Your client should ignore these.