Skip to main content

πŸ”— MCP Remote Connection Guide

Connect external MCP clients (like Claude Desktop) to your LanOnasis Memory Service via mcp.LanOnasis.com/sse.

🎯 Overview​

The MCP Remote SSE endpoint enables external clients to connect to your Memory Service using LanOnasis API keys for authentication. This allows tools like Claude Desktop to access your memory data remotely.

πŸ”§ Configuration​

For Claude Desktop​

Add this configuration to your Claude Desktop MCP settings:

{
"mcpServers": {
"LanOnasis-memory": {
"command": "npx",
"args": [
"@modelcontextprotocol/server-sse",
"https://mcp.LanOnasis.com/sse"
],
"env": {
"MCP_API_KEY": "your-LanOnasis-api-key-here"
}
}
}
}

For Custom MCP Clients​

Connect to the SSE endpoint with API key authentication:

const eventSource = new EventSource(
'https://mcp.LanOnasis.com/sse?client_id=my-client',
{
headers: {
'X-API-Key': 'your-LanOnasis-api-key'
}
}
);

eventSource.onmessage = (event) => {
const data = JSON.parse(event.data);
console.log('MCP Message:', data);
};

πŸ”‘ API Key Authentication​

Getting Your API Key​

  1. Visit the LanOnasis Dashboard
  2. Navigate to API Keys section
  3. Click Generate New Key
  4. Copy your API key for MCP configuration

Authentication Methods​

The MCP SSE endpoint supports two authentication methods:

  1. Header Authentication (Recommended):

    X-API-Key: your-LanOnasis-api-key
  2. Query Parameter Authentication:

    https://mcp.LanOnasis.com/sse?api_key=your-LanOnasis-api-key

πŸ“‘ MCP Protocol Support​

Supported Capabilities​

  • βœ… Resources: Memory entries, topics, search results
  • βœ… Tools: Memory CRUD operations, search, analytics
  • βœ… Prompts: Memory-based prompt templates
  • βœ… Logging: Real-time operation logs
  • βœ… Notifications: Live memory updates

Protocol Messages​

The endpoint implements MCP 2024-11-05 protocol:

{
"jsonrpc": "2.0",
"method": "initialized",
"params": {
"protocolVersion": "2024-11-05",
"capabilities": {
"resources": { "subscribe": true, "listChanged": true },
"tools": { "listChanged": true },
"prompts": { "listChanged": true },
"logging": {}
},
"serverInfo": {
"name": "LanOnasis-memory-service",
"version": "1.0.0"
}
}
}

πŸ”„ Real-time Updates​

Memory Operations​

Receive live updates when memories are created, updated, or deleted:

{
"type": "memory_update",
"operation": "create",
"memoryId": "uuid-here",
"data": { "title": "New Memory", "content": "..." }
}

Tool Results​

Get real-time results from memory operations:

{
"type": "tool_result",
"toolName": "search_memories",
"result": { "memories": [...], "total": 42 },
"requestId": "req-123"
}

Resource Updates​

Monitor changes to memory resources:

{
"type": "resource_update",
"resourceUri": "memory://uuid-here",
"operation": "updated"
}

πŸ›‘οΈ Security Features​

API Key Validation​

  • βœ… Active key verification against database
  • βœ… Expiration date checking
  • βœ… Usage tracking and rate limiting
  • βœ… User-scoped access control

Connection Management​

  • βœ… Automatic connection cleanup
  • βœ… Heartbeat monitoring (30s intervals)
  • βœ… Error handling and reconnection
  • βœ… Connection logging and audit

πŸš€ Production Endpoints​

Once deployed, your MCP remote connection will be available at:

EndpointPurposeAuthentication
https://mcp.LanOnasis.com/sseMCP SSE ConnectionAPI Key
https://api.LanOnasis.com/dashboardAPI Key ManagementJWT
https://docs.LanOnasis.comDocumentationNone

πŸ“‹ Example Usage​

Claude Desktop Integration​

  1. Get API Key: Generate from dashboard
  2. Configure Claude: Add MCP server configuration
  3. Connect: Claude will automatically connect on startup
  4. Use: Access memory commands in Claude conversations

Custom Client Integration​

// Connect to MCP SSE
const mcp = new EventSource('https://mcp.LanOnasis.com/sse', {
headers: { 'X-API-Key': 'your-key' }
});

// Handle memory updates
mcp.addEventListener('message', (event) => {
const message = JSON.parse(event.data);

if (message.type === 'memory_update') {
console.log('Memory updated:', message.memoryId);
// Update your UI or trigger actions
}
});

// Send tool requests (via separate HTTP requests)
async function searchMemories(query) {
const response = await fetch('https://api.LanOnasis.com/api/v1/memory/search', {
method: 'POST',
headers: {
'X-API-Key': 'your-key',
'Content-Type': 'application/json'
},
body: JSON.stringify({ query })
});

return response.json();
}

πŸŽ‰ Ready to Connect​

Your LanOnasis Memory Service now supports remote MCP connections! External clients can connect using your API keys and access your memory data in real-time.

Start connecting your tools and enjoy seamless memory integration across all your applications!