MCP Server Setup Guide¶
Complete guide for self-hosting the Fluvie MCP server.
Prerequisites¶
- Docker and Docker Compose (recommended), OR
- Dart SDK 3.0+ for manual installation
- Port 8080 available (or configure alternate)
Docker Installation (Recommended)¶
Step 1: Clone Repository¶
Step 2: Configure Environment¶
Edit .env with your settings:
# Server Configuration
PORT=8080
HOST=0.0.0.0
# Documentation path (relative to mcp-server directory)
DOCS_PATH=../doc
# Logging: debug, info, warning, error
LOG_LEVEL=info
Step 3: Build and Run¶
# Development mode (rebuilds on changes)
docker-compose up
# Production mode (background)
docker-compose up -d
# View logs
docker-compose logs -f fluvie-mcp
Step 4: Verify¶
Expected response:
{
"status": "healthy",
"version": "1.0.0",
"indexes": {
"docs": { "status": "ready", "count": 87 },
"templates": { "status": "ready", "count": 30 }
}
}
Production Deployment with HTTPS¶
For production with automatic HTTPS certificates:
Step 1: Configure Domain¶
Point your domain (e.g., mcp.fluvie.dev) to your server's IP.
Step 2: Set Environment¶
Step 3: Start with Traefik¶
This starts: - Fluvie MCP server - Traefik reverse proxy with Let's Encrypt
Your server is now available at https://your-domain.com/mcp
Manual Installation (Without Docker)¶
Step 1: Install Dart¶
# macOS
brew install dart
# Linux (Ubuntu/Debian)
sudo apt-get update
sudo apt-get install dart
# Or use the official installer
# https://dart.dev/get-dart
Step 2: Clone and Setup¶
Step 3: Configure¶
Create .env or set environment variables:
Step 4: Run¶
# Development
dart run bin/server.dart
# Production (compiled)
dart compile exe bin/server.dart -o bin/server
./bin/server
Configuration Reference¶
| Variable | Default | Description |
|---|---|---|
PORT |
8080 | Server port |
HOST |
0.0.0.0 | Bind address |
DOCS_PATH |
./data/docs | Path to documentation |
LOG_LEVEL |
info | Logging level |
ACME_EMAIL |
- | Email for Let's Encrypt |
Updating Documentation¶
The server indexes documentation at startup. To update:
Docker¶
Manual¶
Monitoring¶
Health Check¶
Docker Logs¶
Container Status¶
Troubleshooting¶
Server Won't Start¶
-
Check port availability:
-
Check Docker logs:
-
Verify documentation path exists and is readable
Search Returns No Results¶
- Check document count in
/healthresponse - Verify
DOCS_PATHpoints to correct location - Check logs for indexing errors
HTTPS Not Working¶
- Verify domain DNS is configured
- Check Traefik logs:
- Ensure ports 80 and 443 are open
Connection Refused¶
- Check
HOSTis set to0.0.0.0(notlocalhost) - Verify firewall allows port 8080
- Check container is running:
Performance Tuning¶
For High Traffic¶
Multiple Instances¶
Use a load balancer with multiple server instances:
Security Considerations¶
- Run as non-root: The Dockerfile creates a
fluvieuser - Read-only docs: Mount documentation as read-only (
:ro) - HTTPS: Use Traefik or your own reverse proxy for TLS
- Rate limiting: Configure at reverse proxy level
Next Steps¶
- IDE Integration - Configure your IDE
- MCP Agent Overview - Using the MCP tools