Overview
DeployStack implements three distinct limits to control MCP server installations at the team level:mcp_server_limit- Total MCP server installationsnon_http_mcp_limit- Catalog STDIO servers onlygithub_mcp_limit- GitHub-deployed servers only
Limit Types Summary
| Limit Field | Purpose | What It Counts | Default | Database Location |
|---|---|---|---|---|
mcp_server_limit | Total installations | All MCP server installations | 5 | teams.mcp_server_limit |
non_http_mcp_limit | Catalog STDIO servers | STDIO servers from catalog only | 1 | teams.non_http_mcp_limit |
github_mcp_limit | GitHub deployments | Self-deployed GitHub servers | 1 | teams.github_mcp_limit |
1. Total Installations Limit (mcp_server_limit)
Definition
The maximum total number of MCP server installations a team can have, regardless of source or transport type.Key Details
- Default Value: 5
- Database Field:
teams.mcp_server_limit(integer) - What It Counts: ALL installations in
mcpServerInstallationstable for the team - Includes: Catalog STDIO, catalog HTTP/SSE, and GitHub-deployed servers
How to Calculate
Count all rows in themcpServerInstallations table where team_id matches:
Where Enforced
- GitHub Deployment:
services/backend/src/routes/teams/deploy/deploy.ts:256-272 - Installation Creation:
services/backend/src/services/mcpInstallationService.ts
Example Scenario
2. Catalog STDIO Servers Limit (non_http_mcp_limit)
Definition
The maximum number of STDIO servers from the curated catalog that a team can install.Key Details
- Default Value: 1
- Database Field:
teams.non_http_mcp_limit(integer) - What It Counts: STDIO servers where
source IN ('official_registry', 'manual') - Purpose: Limit resource-intensive STDIO processes from the global catalog
- Excludes: HTTP/SSE servers, GitHub-deployed servers
How to Calculate
- Get all installations for the team
- Join to
mcpServerstable - Filter by
transport_type = 'stdio' - Filter by
source IN ('official_registry', 'manual') - Count the results
Where Enforced
- Installation Creation:
services/backend/src/services/mcpInstallationService.ts:551-607 - Not Checked In: GitHub deployment route (GitHub servers have their own limit)
Example Scenario
3. GitHub Deployments Limit (github_mcp_limit)
Definition
The maximum number of self-deployed GitHub MCP servers a team can have.Key Details
- Default Value: 1
- Database Field:
teams.github_mcp_limit(integer) - What It Counts: Servers where
source = 'github' - Purpose: Limit self-serve deployments
- Transport Type: Always STDIO (HTTP/SSE deployments not supported)
- Excludes: Catalog servers (manual and official_registry)
How to Calculate
- Get all installations for the team
- Join to
mcpServerstable - Filter by
source = 'github' - Count the results
Where Enforced
- GitHub Deployment:
services/backend/src/routes/teams/deploy/deploy.ts:289-297 - Not Checked In: Installation creation route (can’t install GitHub servers from catalog)
Example Scenario
Why Limits Don’t Overlap
The three limits are independent because thesource field creates mutually exclusive categories:
Source Field Values
| Source Value | Created By | Counted Against |
|---|---|---|
official_registry | Automatic sync from registry.modelcontextprotocol.io | non_http_mcp_limit (if STDIO) |
manual | Global admin via /api/mcp/servers/global | non_http_mcp_limit (if STDIO) |
github | Team admin via /api/teams/{teamId}/deploy | github_mcp_limit |
Key Principle
- Catalog servers (
non_http_mcp_limit) havesource IN ('official_registry', 'manual') - GitHub servers (
github_mcp_limit) havesource = 'github' - These are mutually exclusive - a server cannot have multiple source values
Limit Validation Logic
When updating team limits, DeployStack enforces a cross-field validation to ensure logical consistency:Validation Rule
Why This Makes Sense
- A team could install
non_http_mcp_limitcatalog STDIO servers - A team could deploy
github_mcp_limitGitHub servers - These don’t overlap (different
sourcevalues) - Total installations =
non_http_mcp_limit + github_mcp_limit - Therefore:
mcp_server_limit >= non_http_mcp_limit + github_mcp_limit
Example
Complete Server Type Matrix
| Server Type | visibility | owner_team_id | source | transport_type | Counts Against |
|---|---|---|---|---|---|
| Catalog - STDIO | global | null | official_registry / manual | stdio | mcp_server_limit + non_http_mcp_limit |
| Catalog - HTTP | global | null | official_registry / manual | http | mcp_server_limit only |
| Catalog - SSE | global | null | official_registry / manual | sse | mcp_server_limit only |
| GitHub Deploy | team | <team_id> | github | stdio (always) | mcp_server_limit + github_mcp_limit |
Database Schema Reference
Teams Table
File:services/backend/src/db/schema-tables/teams.ts
MCP Server Installations Table
File:services/backend/src/db/schema-tables/mcp-installations.ts
MCP Servers Table
File:services/backend/src/db/schema-tables/mcp-catalog.ts
For New Developers
Common Questions
Q: How do I calculate the total number of MCP servers for a team? A: Query themcpServerInstallations table and count rows where team_id matches:
Q: How do I differentiate between catalog and GitHub servers? A: Check the
source field in the mcpServers table:
'official_registry'or'manual'= Catalog server (curated by global admin)'github'= GitHub deployment (self-deployed by team)
Q: How do I count STDIO servers for a team? A: Join
mcpServerInstallations to mcpServers and count where transport_type = 'stdio':
Q: Where are the limits enforced in the codebase? A:
- Total installations:
services/backend/src/routes/teams/deploy/deploy.ts:256-272 - Catalog STDIO:
services/backend/src/services/mcpInstallationService.ts:551-607 - GitHub deployments:
services/backend/src/routes/teams/deploy/deploy.ts:289-297
Q: Can GitHub deployments use HTTP or SSE transport? A: No. GitHub deployments always use
transport_type = 'stdio'. HTTP and SSE transports are only supported for catalog servers with remote endpoints.
Q: What happens when a team reaches a limit? A: The backend throws an error with a descriptive message:
Code Examples
Calculate Total Installations
Calculate Catalog STDIO Servers
Calculate GitHub Deployments
Check All Limits Before Installation
Related Documentation
- Teams - Team management and structure
- MCP Catalog - MCP server catalog system
- Roles and Permissions - Role-based access control
- Database Management - Database schema and operations
- GitHub Deployment Guide (coming soon) - Deploying MCP servers from GitHub
This guide provides the technical foundation for understanding and working with team MCP server limits in DeployStack. For questions or clarifications, refer to the source code files mentioned throughout this document or reach out to the team via Discord.

