Skip to main content

MCP Remote Connection

🔗 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 a bearer token:

const eventSource = new EventSource(
'https://mcp.lanonasis.com/sse?client_id=my-client&token=YOUR_TOKEN'
);

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 for libraries that support custom headers):

    Authorization: Bearer YOUR_TOKEN
  2. Query Parameter Authentication:

    https://mcp.lanonasis.com/sse?token=YOUR_TOKEN

📡 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 ConnectionToken
https://dashboard.lanonasis.comAccount & ManagementAuth
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?token=YOUR_TOKEN');

// 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/memories/search', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'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!