Lanonasis MCP Server
Enterprise MCP server with memory management, API key control, and system health tools, ready for Claude integration with Supabase.
README
Lanonasis MCP Server - Standalone Enterprise Edition
Memory-aware AI assistant with 17+ enterprise tools for production deployment. Standards-compliant MCP stdio interface with Supabase integration.
๐ Features
17+ Production-Ready Tools
- Memory Management: Create, search, update, delete memories with vector embeddings
- API Key Management: Enterprise-grade key rotation and access control
- System Tools: Health monitoring, authentication, organization management
- Project Management: Multi-tenant project organization
- Configuration Management: Dynamic settings and feature flags
Enterprise Capabilities
- ๐ SSL/TLS Security: Supabase SSL certificate integration
- ๐ Health Monitoring: Comprehensive health checks and metrics
- ๐ Zero Downtime: Hot reloads and graceful shutdowns
- ๐ Scalable: PM2 process management with auto-restart
- ๐ Multi-Protocol: Stdio, HTTP, WebSocket, Server-Sent Events
๐ Quick Start
Prerequisites
- Node.js 18+
- PM2 (for production deployment)
- Nginx (for reverse proxy)
- Valid Supabase project
Local Development
# Clone and setup
git clone https://github.com/lanonasis/onasis-mcp-server.git
cd onasis-mcp-server
# Install dependencies
npm install
# Configure environment
cp .env.example .env.production
# Edit .env.production with your Supabase credentials
# Start development server
npm run dev
# Test MCP connection
npm run test
Production Deployment
# Deploy to VPS (srv896342.hstgr.cloud)
./scripts/deploy-to-vps.sh
# Deploy with Nginx configuration
./scripts/deploy-to-vps.sh --configure-nginx
# Configure SSL certificate
ssh -p 2222 root@168.231.74.29
certbot --nginx -d mcp.lanonasis.com
๐๏ธ Architecture
Service Endpoints
๐ mcp.lanonasis.com
โโโ /mcp โ Stdio MCP server (port 3001)
โโโ /sse โ Server-Sent Events (port 3003)
โโโ /health โ Health monitoring
โโโ /ws โ WebSocket (port 3002)
Directory Structure
lanonasis-mcp-server/
โโโ src/
โ โโโ index.js # Main stdio MCP server
โ โโโ http-bridge.js # HTTP interface (optional)
โ โโโ lib/ # Shared libraries
โ โ โโโ websocket-mcp-handler.js
โ โ โโโ enhanced-api-gateway.js
โ โโโ config/
โ โโโ prod-ca-2021.crt # Supabase SSL certificate
โโโ scripts/
โ โโโ deploy-to-vps.sh # Production deployment
โ โโโ test-mcp-connection.js
โ โโโ test-memory-operations.js
โโโ docs/ # Documentation
โโโ ecosystem.config.js # PM2 configuration
โโโ package.json # Dependencies and scripts
๐ง Configuration
Environment Variables
# Server Configuration
NODE_ENV=production
PORT=3001
MCP_WS_PORT=3002
MCP_SSE_PORT=3003
# Lanonasis Supabase Integration
ONASIS_SUPABASE_URL=https://api.lanonasis.com
ONASIS_SUPABASE_ANON_KEY=your_key_here
ONASIS_SUPABASE_SERVICE_KEY=your_service_key_here
SUPABASE_SSL_CERT_PATH=/opt/certs/prod-ca-2021.crt
# Security & Performance
CORS_ORIGINS=https://lanonasis.com,https://mcp.lanonasis.com
MCP_RATE_LIMIT=100
MCP_MAX_CONNECTIONS=1000
PM2 Configuration
// ecosystem.config.js
module.exports = {
apps: [{
name: 'lanonasis-mcp-server',
script: './src/index.js',
instances: 1,
autorestart: true,
max_memory_restart: '512M',
env_production: {
NODE_ENV: 'production',
PORT: 3001
}
}]
};
๐ ๏ธ Available Tools
Memory Management (6 tools)
create_memory- Create memory with vector embeddingsearch_memories- Semantic vector searchget_memory- Retrieve specific memoryupdate_memory- Update existing memorydelete_memory- Remove memorylist_memories- Paginated memory listing
API Key Management (4 tools)
create_api_key- Generate new API keylist_api_keys- List active keysrotate_api_key- Rotate existing keydelete_api_key- Revoke API key
System & Health (7 tools)
get_health_status- System health checkget_auth_status- Authentication statusget_organization_info- Organization detailscreate_project- New project creationlist_projects- Project listingget_config- Configuration retrievalset_config- Dynamic configuration
๐งช Testing & Monitoring
Health Checks
# Local health check
curl http://localhost:3001/health
# Production health check
curl https://mcp.lanonasis.com/health
# Response format
{
"status": "healthy",
"services": {
"mcp": "running",
"supabase": "connected",
"websocket": "ready"
},
"uptime": "24h 15m",
"version": "1.0.0",
"tools_count": 17
}
Performance Monitoring
# PM2 monitoring dashboard
pm2 monit
# Service logs
pm2 logs lanonasis-mcp-server
# System metrics
pm2 show lanonasis-mcp-server
MCP Protocol Testing
# Test MCP connection
npm run test
# Test memory operations
npm run test:memory
# Manual stdio test
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | node src/index.js
๐ Security Features
SSL/TLS Configuration
- Supabase SSL certificate integration
- TLS 1.2+ enforcement
- HSTS headers
- XSS protection headers
Access Control
- JWT-based authentication
- API key management with rotation
- Rate limiting (100 req/15min)
- CORS policy enforcement
Data Protection
- Environment variable encryption
- Secure secret management
- Audit logging
- Connection timeout controls
๐ Claude Integration
MCP Configuration
{
"mcpServers": {
"lanonasis-mcp": {
"command": "node",
"args": ["/path/to/lanonasis-mcp-server/src/index.js"],
"env": {
"ONASIS_SUPABASE_URL": "https://api.lanonasis.com",
"ONASIS_SUPABASE_ANON_KEY": "your_key_here"
}
}
}
}
Remote MCP Connection
{
"mcpServers": {
"lanonasis-mcp-remote": {
"command": "curl",
"args": ["-X", "POST", "https://mcp.lanonasis.com/mcp"],
"env": {
"AUTHORIZATION": "Bearer your_api_key"
}
}
}
}
๐ Deployment Scenarios
Development
npm run dev # Local development with hot reload
Testing
npm run test # Run all tests
npm run test:memory # Test memory operations only
Production
./scripts/deploy-to-vps.sh # Deploy to production VPS
Docker (Future)
docker build -t lanonasis-mcp-server .
docker run -p 3001:3001 lanonasis-mcp-server
๐ CI/CD Pipeline
GitHub Actions
name: Deploy Lanonasis MCP
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Deploy to VPS
run: ./scripts/deploy-to-vps.sh
Automated Deployments
- Trigger: Push to main branch
- Process: Test โ Build โ Deploy โ Health Check
- Rollback: Automatic on failure (< 5 minutes)
- Notifications: Slack/Discord integration ready
๐ Support & Documentation
Resources
- Documentation:
/docsdirectory - API Reference: mcp.lanonasis.com/docs
- Health Dashboard: mcp.lanonasis.com/health
- Issue Tracker: GitHub Issues
Community
- Discord: Lanonasis Community
- Docs: docs.lanonasis.com
- Status: status.lanonasis.com
๐ License
MIT License - see LICENSE file for details.
๐ Production Ready Features
โ
Standards Compliant - Full MCP protocol support
โ
Enterprise Security - SSL, JWT, rate limiting
โ
High Availability - PM2, health checks, auto-restart
โ
Monitoring - Comprehensive logging and metrics
โ
Scalable - Multi-protocol, load balancer ready
โ
Documented - Complete API documentation
โ
Tested - Unit tests and integration tests
โ
Deployable - One-command production deployment
๐ฏ Ready for Claude integration with 17+ enterprise tools!
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.