Files
mcphub/env.example
airano-ir 43fd2201a0 feat(v3.13.0): settings live DB reads, remove Directus/Appwrite, admin stats
Settings fixes:
- MAX_SITES_PER_USER, USER_RATE_LIMIT_PER_MIN/HR now read from DB settings
  table (DB > ENV > default), so dashboard/settings changes apply without
  restart. Sync cache refreshed on every save or delete.
- /api/me reports the live DB value for max_sites_per_user.

Admin improvements:
- Admin users bypass per-user rate limiting entirely (role=admin or ADMIN_EMAILS).
- Admin Overview now shows platform stats: registered users, new users (7d),
  total user sites, available tools.

Plugin cleanup:
- Appwrite and Directus plugins removed from the active registry (8 plugins
  now: WordPress, WooCommerce, WordPress Specialist, Gitea, n8n, Supabase,
  OpenPanel, Coolify). Plugin code is retained for future re-enabling.
- Settings page plugin visibility list updated to match.

Mobile onboarding:
- Stepper steps on narrow viewports stack vertically with correct full border
  and rounded corners on each step.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 23:33:20 +02:00

123 lines
4.7 KiB
Plaintext

# ===================================
# MCP Hub — Environment Configuration
# ===================================
#
# MINIMUM TO START: Set MASTER_API_KEY, then add sites via the web dashboard.
# Full docs: https://github.com/airano-ir/mcphub/blob/main/docs/getting-started.md
#
# After editing, run:
# docker compose up -d
# curl http://localhost:8000/health # verify server
# open http://localhost:8000/dashboard # web dashboard
# ===================================
# ============================================
# REQUIRED
# ============================================
# Master API key for authentication (also used to log into the dashboard)
# Generate with: python -c "import secrets; print(secrets.token_urlsafe(32))"
MASTER_API_KEY=your-secure-key-here
# Encryption key for user credentials (REQUIRED for Live Platform / Track E)
# Generate with: python -c "import os, base64; print(base64.b64encode(os.urandom(32)).decode())"
ENCRYPTION_KEY=
# Dashboard session secret (REQUIRED for production)
# Generate with: python -c "import secrets; print(secrets.token_hex(32))"
DASHBOARD_SESSION_SECRET=
# ============================================
# PLUGIN VISIBILITY (Track F.1)
# ============================================
# Comma-separated list of plugins visible to public (OAuth) users.
# Admin users always see all plugins regardless of this setting.
# Default (if not set): wordpress,woocommerce,supabase,openpanel,gitea
# ENABLED_PLUGINS=wordpress,woocommerce,supabase,openpanel,gitea
#
# Plugin notes:
# wordpress_specialist — F.19 specialist tool surface (51 tools across
# read / editor / settings / install / admin tiers). Companion-
# backed (Airano MCP Bridge v2.18.0+ on the WP side). No Docker
# socket needed. Currently admin-only; will become public with
# a tier system in F.19.4 (companion v3.0 wp.org republish).
# Replaced the deprecated wordpress_advanced plugin (sunset
# 2026-05-04 in F.19.3.2-.3).
# ============================================
# ADMIN SYSTEM (Track F.4)
# ============================================
# Comma-separated list of emails that get admin role on OAuth login.
# These users see the full admin dashboard (projects, API keys, health, etc.)
# If not set, OAuth users only get the standard user dashboard.
# ADMIN_EMAILS=admin@example.com,boss@company.com
# Disable Master Key login to the web dashboard (default: false).
# When true, only OAuth users (with admin email) can access admin dashboard.
# Master Key still works for MCP endpoints — only dashboard login is affected.
# DISABLE_MASTER_KEY_LOGIN=false
# ============================================
# SITES
# ============================================
# Sites are managed via the web dashboard (DB-based).
# After starting the server, open the dashboard to add sites:
# http://localhost:8000/dashboard
#
# Supported plugins: WordPress, WooCommerce, Supabase, OpenPanel,
# Gitea, n8n, Appwrite, Directus, WordPress Advanced
# ============================================
# OAUTH (optional — for ChatGPT/Claude auto-registration)
# ============================================
# Only needed if you want ChatGPT or Claude to auto-register via OAuth.
# For local testing with API key auth, you can skip these.
# OAUTH_JWT_SECRET_KEY=your-jwt-secret
# OAUTH_BASE_URL=https://your-public-domain.com
# ============================================
# OAUTH SOCIAL LOGIN (optional — for user registration)
# ============================================
# Enable GitHub and/or Google login for the Live Platform.
# Create OAuth apps:
# GitHub: https://github.com/settings/developers → New OAuth App
# - Callback URL: https://your-domain.com/auth/callback/github
# Google: https://console.cloud.google.com/apis/credentials → Create OAuth Client
# - Callback URL: https://your-domain.com/auth/callback/google
# GITHUB_CLIENT_ID=
# GITHUB_CLIENT_SECRET=
# GOOGLE_CLIENT_ID=
# GOOGLE_CLIENT_SECRET=
# PUBLIC_URL=https://mcp.example.com
# SESSION_EXPIRY_HOURS=168
# === SITE MANAGEMENT (E.3) ===
# MAX_SITES_PER_USER=10
# USER_RATE_LIMIT_PER_MIN=30
# USER_RATE_LIMIT_PER_HR=500
# ============================================
# COOLIFY (admin-only — F.17)
# ============================================
# Coolify instance for AI-driven deployment management.
# Create an API token in Coolify: Keys & Tokens → API tokens
# COOLIFY_URL=https://coolify.example.com
# COOLIFY_TOKEN=your-api-token-here
# ============================================
# ADVANCED (optional — defaults are fine)
# ============================================
# Logging
LOG_LEVEL=INFO
# Database path (default: data/mcphub.db)
# DATABASE_PATH=/app/data/mcphub.db
# Rate limits (per client)
# RATE_LIMIT_PER_MINUTE=60
# RATE_LIMIT_PER_HOUR=1000
# RATE_LIMIT_PER_DAY=10000