Server Sources
MCP servers in the catalog come from two sources, both using the same three-tier configuration architecture:Official Registry Servers (Automatic)
- Source: Synced automatically from registry.modelcontextprotocol.io
- Schema Creation: Automatic transformation via
RegistrySyncServiceand background jobs - Configuration Mapping: Environment variables from registry automatically categorized into three tiers
- Transport Detection: Automatically derived from
packages(stdio) orremotes(HTTP/SSE) - Maintenance: Updates sync automatically from official registry
Manual Servers (Custom)
- Source: Created manually by global administrators
- Schema Creation: Manual categorization through Configuration Schema Step
- Configuration Mapping: Precise admin control over every element
- Transport: Explicitly configured by administrator
- Maintenance: Manual updates as needed
Architecture Overview
The three-tier system separates MCP server configuration into distinct layers:- Template Level - Fixed arguments and schemas defined in the MCP catalog
- Team Level - Shared team configurations and credentials
- User Level - Personal configurations for individual team members
Lock/Unlock Control System
The system’s core feature is sophisticated lock/unlock controls that determine configuration boundaries: Global Administrator Controls:- Categorization: Classify every config element as Template/Team/User configurable
- Lock States: Set
default_team_lockedandvisible_to_userscontrols - Security Boundaries: Define what can never be changed vs. team/user configurable
- Lock/Unlock Elements: Control what users can modify within schema boundaries
- Credential Management: Manage team secrets with visibility controls
- Users see only unlocked elements they can configure
- Locked elements are inherited but not modifiable
Design Problem
The Multi-User Team Challenge
Traditional MCP configurations assume a single user per installation. DeployStack’s team-based approach requires supporting scenarios like: Team Setup:- Team: “DevOps Team”
- Members: User A, User B
- Total Configurations: 2 different user configurations for the same MCP server
- User A needs personal search preferences (Google, 10 results per page)
- User B needs different preferences (Bing, 20 results per page)
- Both users share the same team API credentials
- Each user may have different cache settings
Solution Architecture
The three-tier system addresses this by:- Template Level: Defines what arguments are fixed vs configurable
- Team Level: Manages shared credentials and team-wide settings
- User Level: Allows individual customization per user
Database Schema
Tier 1: MCP Catalog (mcpServers)
The catalog defines the configuration structure for each MCP server type:
Core Configuration Fields:
Tier 2: Team Installation (mcpServerInstallations)
Team installations manage shared configurations:
Tier 3: User Configuration (mcpUserConfigurations)
Individual user configurations:
Configuration Flow
Runtime Assembly
Configuration Schema Step
Global administrators categorize configuration elements through the Configuration Schema Step:- Extract Elements: Parse Claude Desktop config for all args and env vars
- Categorize Each Element: Assign to Template/Team/User tiers
- Set Lock Controls: Define
default_team_lockedandvisible_to_users - Generate Schema: Create the three-tier schema structure
Runtime Assembly
At runtime, configurations are assembled by merging all three tiers with lock/unlock controls applied:Service Layer
RegistrySyncService
Manages automatic synchronization with the official MCP Registry: Key Responsibilities:- Fetches server list from registry.modelcontextprotocol.io
- Creates job queue batches for progress tracking
- Schedules individual server sync jobs with rate limiting
- Coordinates with
McpServerSyncWorkerfor transformation
- Fetch servers from official registry (with pagination)
- Filter out existing servers (if
skipExistingenabled) - Create job batch for tracking
- Create individual jobs with scheduled delays (rate limiting)
- Job queue processes sequentially via
McpServerSyncWorker
maxServers: Limit number of servers to sync (for testing)skipExisting: Skip servers already in databaseforceRefresh: Force refresh of existing serversrateLimitDelay: Seconds between jobs (default: 2)
McpUserConfigurationService
The service layer provides complete CRUD operations for user configurations: Key Methods:createUserConfiguration()- Create new user config with validationgetUserConfiguration()- Retrieve user config with team access controlupdateUserConfiguration()- Update with schema validationdeleteUserConfiguration()- Remove user configupdateUserArgs()- Partial update for arguments onlyupdateUserEnv()- Partial update for environment variables only
- Team-based access control
- User isolation (users can only access their own configs)
- Schema validation against server-defined schemas
- Input sanitization and type checking
Automatic Schema Transformation
When servers are synced from the official MCP Registry, their configurations are automatically transformed to the three-tier system:Environment Variable Mapping
Registry Format → DeployStack Tiers:- Template Level: Fixed values provided in registry
- Team Level:
isRequired: true+isSecret: true→ Encrypted team secrets - Team Level:
isRequired: true+isSecret: false→ Required team settings - User Level:
isRequired: false→ Optional personal preferences
API_KEY→team_env_schema(encrypted,default_team_locked: true,visible_to_users: false)DEBUG→user_env_schema(unlocked, user-configurable)
Transport Detection
STDIO Servers (packages):- Command and package name →
template_args(locked) - Runtime arguments → Team/user schemas based on registry metadata
- URL →
template_envor embedded in remotes config (locked) - Authentication headers →
team_headers_schema(secrets) - Optional headers →
user_headers_schema(personal preferences) - API keys in URL query params →
team_url_query_params_schema(secrets) - User preferences in query params →
user_url_query_params_schema(customization)
officialRegistryTransforms.ts) handles all automatic mapping without admin intervention.
API Endpoints
API Endpoints
Configuration management through REST API:- Team installations:
/api/teams/{teamId}/mcp/installations/ - User configurations:
/api/teams/{teamId}/mcp/installations/{installationId}/user-configs/ - Schema validation: Built into all endpoints
Schema Examples
Manual Server Schema
Configuration schema created manually by global administrator:Synced Server Schema
Configuration schema automatically transformed from official registry:- Synced servers include
official_nameand registry tracking fields - Synced servers have
packagesarray with original registry format preserved - Schema transformation is automatic based on
isRequiredandisSecretproperties - GitHub metadata automatically populated during sync
Related Documentation
For specific implementation details:- Backend API - Complete API endpoint documentation
- Database Schema - Database structure and relationships
- Job Queue System - Background job processing for registry sync
- Teams - Team management and structure
- MCP Configuration System - User-facing configuration guide
- MCP Installation - Installation and team setup
- MCP Catalog - Official registry integration details

