π 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β
- Visit the LanOnasis Dashboard
- Navigate to API Keys section
- Click Generate New Key
- Copy your API key for MCP configuration
Authentication Methodsβ
The MCP SSE endpoint supports two authentication methods:
-
Header Authentication (Recommended):
X-API-Key: your-LanOnasis-api-key
-
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:
Endpoint | Purpose | Authentication |
---|---|---|
https://mcp.LanOnasis.com/sse | MCP SSE Connection | API Key |
https://api.LanOnasis.com/dashboard | API Key Management | JWT |
https://docs.LanOnasis.com | Documentation | None |
π Example Usageβ
Claude Desktop Integrationβ
- Get API Key: Generate from dashboard
- Configure Claude: Add MCP server configuration
- Connect: Claude will automatically connect on startup
- 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!