> For the complete documentation index, see [llms.txt](https://mcp.conserver.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mcp.conserver.io/deployment/index.md).

# Overview

Deploy the vCon MCP Server to production environments.

## Overview

This guide covers:

* Production deployment strategies
* Security best practices
* Performance optimization
* Platform-specific guides

## Quick Deployment Options

### Option 1: Docker (Recommended)

```bash
# Pull from ECR Public
docker pull public.ecr.aws/r4g1k2s3/vcon-dev/vcon-mcp:main

# Run container
docker run -d -p 3000:3000 \
  -e SUPABASE_URL=your-url \
  -e SUPABASE_SERVICE_ROLE_KEY=your-service-role-key \
  -e SUPABASE_ANON_KEY=your-anon-key \
  -e MCP_HTTP_STATELESS=true \
  public.ecr.aws/r4g1k2s3/vcon-dev/vcon-mcp:main
```

Or build locally:

```bash
docker build -t vcon-mcp .
docker run -d -p 3000:3000 --env-file .env vcon-mcp
```

### Option 2: Node.js Direct

```bash
# Build
npm run build

# Run
node dist/index.js
```

### Option 3: Kubernetes

```bash
# Apply configuration
kubectl apply -f k8s/deployment.yaml
```

## Documentation Sections

### [Production Setup](/deployment/production.md)

* Environment configuration
* Process management
* Logging and monitoring
* Backup strategies

### [Security](/deployment/security.md)

* Authentication and authorization
* API security
* Database security
* Network security
* Compliance considerations

### [Performance](/deployment/performance.md)

* Database optimization
* Caching strategies
* Query tuning
* Load testing
* Scaling strategies

### [Docker Deployment](/deployment/docker.md)

* Dockerfile configuration
* Docker Compose setup
* Multi-stage builds
* Volume management

### [Kubernetes Deployment](/deployment/kubernetes.md)

* Deployment manifests
* Service configuration
* Ingress setup
* Secrets management

### [Cloud Providers](/deployment/cloud.md)

* AWS deployment
* Google Cloud deployment
* Azure deployment
* Heroku deployment

### [Self-Hosted Supabase](/deployment/self-hosted-supabase.md)

* Complete self-hosted deployment
* Docker Compose stack with all services
* Kong API Gateway configuration
* Embedding job scheduling with Ofelia

## Prerequisites

* Node.js 18 or higher
* PostgreSQL 14+ (or Supabase account)
* Sufficient resources (see requirements)

## System Requirements

### Minimum

* **CPU**: 1 core
* **RAM**: 512 MB
* **Disk**: 1 GB
* **Database**: PostgreSQL 14+

### Recommended

* **CPU**: 2+ cores
* **RAM**: 2 GB+
* **Disk**: 10 GB+
* **Database**: PostgreSQL 15+ with pgvector

## Environment Variables

```bash
# Required
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=your-anon-key

# Optional
SUPABASE_SERVICE_ROLE_KEY=your-service-key
VCON_PLUGINS_PATH=./plugins
VCON_LICENSE_KEY=your-license-key
NODE_ENV=production

# Tool Categories (see below)
MCP_TOOLS_PROFILE=full
```

## Tool Categories for Deployment

Control which tools are available based on deployment type:

### Deployment Profiles

| Profile    | Categories                     | Use Case                     |
| ---------- | ------------------------------ | ---------------------------- |
| `full`     | All                            | Development, full access     |
| `readonly` | read, schema                   | Read-only API, dashboards    |
| `user`     | read, write, schema            | End-user facing applications |
| `admin`    | read, analytics, infra, schema | Admin/monitoring dashboards  |
| `minimal`  | read, write                    | Basic CRUD microservice      |

### Configuration Options

```bash
# Option 1: Use a preset profile
MCP_TOOLS_PROFILE=readonly

# Option 2: Enable specific categories
MCP_ENABLED_CATEGORIES=read,write,schema

# Option 3: Disable specific categories
MCP_DISABLED_CATEGORIES=analytics,infra

# Option 4: Disable individual tools
MCP_DISABLED_TOOLS=delete_vcon,analyze_query
```

### Example: Read-Only Deployment

```bash
# Docker run with read-only profile
docker run -d -p 3000:3000 \
  -e SUPABASE_URL=your-url \
  -e SUPABASE_SERVICE_ROLE_KEY=your-service-role-key \
  -e SUPABASE_ANON_KEY=your-anon-key \
  -e MCP_TOOLS_PROFILE=readonly \
  -e MCP_HTTP_STATELESS=true \
  public.ecr.aws/r4g1k2s3/vcon-dev/vcon-mcp:main
```

### Example: User-Facing with Restricted Delete

```bash
# Allow CRUD but prevent deletion
docker run -d -p 3000:3000 \
  -e SUPABASE_URL=your-url \
  -e SUPABASE_SERVICE_ROLE_KEY=your-service-role-key \
  -e SUPABASE_ANON_KEY=your-anon-key \
  -e MCP_TOOLS_PROFILE=user \
  -e MCP_DISABLED_TOOLS=delete_vcon \
  -e MCP_HTTP_STATELESS=true \
  public.ecr.aws/r4g1k2s3/vcon-dev/vcon-mcp:main
```

## Health Checks

The server provides health check endpoints:

```bash
# Basic health check (REST API)
curl http://localhost:3000/api/v1/health
```

## Monitoring

Key metrics to monitor:

* Request latency
* Database connection pool
* Memory usage
* Error rates
* Search performance

## Next Steps

1. Review [Security](/deployment/security.md) best practices
2. Set up [Performance](/deployment/performance.md) monitoring
3. Choose your deployment platform
4. Configure backups and disaster recovery
