Platform Settings

Global platform configuration, platform administrator setup, feature flags, and monitoring platform health.

Platform settings control the global behavior of MCP Hub. These settings are managed by platform administrators and affect all users, organizations, and services across the platform.

Platform Administrator Configuration

Platform administrators are designated via the ADMIN_USERS environment variable in the .env file:

This is a comma-separated list of email addresses. When a user logs in with one of these emails, they are automatically granted the PLATFORM_ADMIN role. Changes to this variable take effect on the next login of each affected user.

Important Notes

  • The platform_role field is set in the database when the user authenticates. If an email is removed from ADMIN_USERS, the user loses admin access on their next login.
  • For immediate revocation without waiting for the next login, update the database directly: UPDATE users SET platform_role = NULL WHERE email = '[email protected]'.
  • The platform role is orthogonal to organization roles – a platform admin can also be an organization Member or Viewer.

Future Roles

The platform role system is designed to support additional roles beyond PLATFORM_ADMIN:

RoleDescriptionStatus
PLATFORM_ADMINFull platform accessAvailable
MODERATORContent moderation, user supportPlanned
SUPPORTCustomer support with read-only accessPlanned
AUDITORRead-only access to audit logsPlanned

Global Configuration

MCP Hub is configured entirely through environment variables. The following categories control platform-wide behavior:

Server Configuration

VariableDefaultDescription
SERVER_HOST0.0.0.0Bind address for the web server
SERVER_PORT8080Port for the web server

Database Configuration

VariableDescription
DB_HOSTPostgreSQL host
DB_PORTPostgreSQL port (default: 5432, Docker dev: 15432)
DB_USERDatabase username
DB_PASSWORDDatabase password
DB_NAMEDatabase name (default: mcphub)

Cache and Rate Limiting

VariableDescription
REDIS_HOSTRedis host
REDIS_PORTRedis port (default: 6390 in Docker dev)

Redis is used for session storage, access tokens, and rate limiting counters. Rate limits are enforced per plan:

PlanAPI Rate Limit
Anonymous15 requests/minute
Free30 requests/minute
PRO300 requests/minute
EnterpriseCustom (up to 5000 requests/minute)

Storage Configuration

VariableDescription
S3_ENDPOINTS3-compatible endpoint (MinIO in development)
S3_ACCESS_KEY_IDS3 access key
S3_SECRET_ACCESS_KEYS3 secret key
S3_BUCKET_SOURCESBucket for source tarballs
S3_BUCKET_ANALYSISBucket for analysis results

Two S3 buckets are used: one for MCP source code tarballs and one for analysis results and generated reports. The minio-init container in development creates these buckets automatically.

Authentication

VariableDescription
AUTH0_DOMAINAuth0 tenant domain
AUTH0_CLIENT_IDOAuth2 client ID
AUTH0_CLIENT_SECRETOAuth2 client secret
AUTH0_CALLBACK_URLOAuth2 callback URL

Worker and AMQP

VariableDescription
AMQP_URLLavinMQ connection URL
AMQP_EXCHANGEMain exchange name (default: mcp.jobs)
WORKER_POLL_INTERVALScheduler polling interval
WORKER_MAX_CONCURRENTMaximum concurrent jobs per worker

Registry Integration

VariableDescription
REGISTRY_URLURL of the mcp-registry service
REGISTRY_SERVICE_TOKENJWT service token for hub-to-registry authentication

Admin Dashboard

The admin dashboard at /admin provides a high-level overview of platform health and activity.

Statistics Cards

  • Total Users: Total registered users and active count.
  • Organizations: Total organizations and active count.
  • Total MCPs: Registered MCPs with public/private breakdown.
  • Activity (Last 24h): Recent platform events with 7-day and 30-day trends.

User Distribution

A visual breakdown showing the percentage of users on each plan (Free, PRO, Enterprise), useful for understanding revenue distribution and conversion rates.

Quick Actions

Direct navigation links to:

  • Manage Users: /admin/users
  • Manage Organizations: /admin/orgs
  • Audit Logs: /admin/audit

Organization Management

Platform administrators can manage all organizations from /admin/orgs:

  • View all organizations: List with name, slug, plan, status, member count, and creation date.
  • Organization details: View members, activity, areas, and configuration.
  • Change organization plan: Upgrade or downgrade between Free, PRO, and Enterprise.
  • Suspend organization: Temporarily disable access for all members (requires a reason).
  • Activate organization: Restore access after suspension.
  • Delete organization: Soft-delete the organization (data preserved for compliance).

Global Audit Log

The platform audit log at /admin/audit records all administrative actions across the platform:

GET /api/v1/admin/audit

Supports filtering by:

  • Action type: user.suspend, org.create, mcp.delete, etc.
  • Date range: Events within a specific time period.
  • Pagination: Page and limit parameters.

Action Categories

User actions: user.create, user.update, user.suspend, user.activate, user.delete, user.plan_update, user.role_change, user.bulk_suspend, user.bulk_activate

Organization actions: org.create, org.update, org.suspend, org.activate, org.delete, org.plan_update

MCP actions: mcp.create, mcp.update_metadata, mcp.delete, mcp.assign_tags, mcp.featured

Category/Tag actions: category.create, category.update, category.delete, tag.create, tag.update, tag.delete

Each audit event includes the administrator who performed the action, the affected resource, a timestamp, and metadata with action-specific details.

Health Monitoring

Health Check Endpoints

MCP Hub exposes health check endpoints for monitoring and orchestration:

EndpointPurposeChecks
GET /healthzLiveness probeApplication is running
GET /readyzReadiness probeDatabase and Redis connectivity

Service Ports

In a full deployment, three services run simultaneously:

ServicePortPurpose
Web (hub-web)8080Dashboard and REST API
Worker (hub-worker)8082Job processing (health/metrics)
Scheduler8081Git polling

All three services must be running for the complete certification pipeline to function. The web service handles user-facing requests, the scheduler detects new commits, and the worker processes analysis jobs.

Infrastructure Services

ServicePortPurpose
PostgreSQL15432 (dev)Primary database
Redis6390 (dev)Cache, sessions, rate limiting
MinIO9000/9001S3-compatible storage
LavinMQ5672/15672AMQP message queue

The LavinMQ management UI at port 15672 provides visibility into message queues, job distribution, and dead letter queues.

Security Best Practices

  1. Limit platform administrators: Keep the ADMIN_USERS list as short as possible.
  2. Rotate secrets: Periodically rotate AUTH0_CLIENT_SECRET, REGISTRY_SERVICE_TOKEN, S3 credentials, and the session secret.
  3. Monitor audit logs: Review the admin audit log regularly for unexpected actions.
  4. Use separate environments: Keep development and production configurations strictly separated, especially Auth0 and Stripe credentials.
  5. Never log secrets: The platform is designed to never log secret values. Verify this behavior when adding custom logging.
  6. Secure the .env file: Ensure the environment file has restricted permissions and is never committed to version control.