Skip to content

Add blocklist for community registry MCP servers#447

Merged
cutecatfann merged 2 commits intomainfrom
blocklist_servers
Mar 18, 2026
Merged

Add blocklist for community registry MCP servers#447
cutecatfann merged 2 commits intomainfrom
blocklist_servers

Conversation

@cutecatfann
Copy link
Contributor

What I did

  • Added --exclude flag to docker mcp catalog-next create for filtering servers when creating catalogs from a community registry
  • The flag accepts server names (can be specified multiple times) and is only valid with --from-community-registry
  • Excluded servers are tracked in the skip statistics and displayed in the stderr summary output
  • Added test coverage for single-server exclusion, multi-server exclusion, and exclusion of non-existent names (no-op)

This is the mcp-gateway side of the server blocklist feature. The ai-mcp CI pipeline passes --exclude flags (derived from server-overrides.yaml) to this command when mirroring the community registry, allowing Docker to remove servers for takedown requests, security vulnerabilities, or policy violations.

The mcp-gateway changes must be merged and released first, since the ai-mcp CI workflow depends on the --exclude flag being available in docker mcp catalog-next create. The MCP_GATEWAY_VERSION in both workflow files is currently pinned to v0.40.0, that version needs to be bumped to whatever release includes the --exclude flag before the ai-mcp workflow changes will work end-to-end.

How to use

To block a server, add it to server-overrides.yaml in ai-mcp:

  some-vulnerable-server:
    blocked: true

The server will be excluded from all pipeline stages (build, generate, upload, catalog, community registry mirror) on the next CI run. See docs/runbook.md for full details including verification steps.

Testing

  • go test ./pkg/catalog_next/ -run TestCreateFromCommunityRegistry -v all 5 community registry tests pass
  • go test ./pkg/catalog_next/ -v full suite passes
  • go vet ./... clean
  • Verify --exclude without --from-community-registry returns an error
  • Verify --exclude with --from-community-registry correctly omits named servers from the resulting catalog

@cutecatfann cutecatfann requested a review from a team as a code owner March 17, 2026 19:26
@cutecatfann cutecatfann changed the title Blocklist servers Add blocklist for community registry MCP servers Mar 17, 2026
@cutecatfann cutecatfann marked this pull request as draft March 17, 2026 19:26
@cutecatfann cutecatfann self-assigned this Mar 17, 2026
@cutecatfann cutecatfann marked this pull request as ready for review March 17, 2026 20:40
@cutecatfann cutecatfann requested a review from jchangx March 17, 2026 20:42

for _, serverResp := range servers {
if slices.Contains(excludeServers, serverResp.Server.Name) {
skippedByType["excluded"]++
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super nit: "blocked" is maybe more explicit

@cutecatfann cutecatfann merged commit 5a6e192 into main Mar 18, 2026
8 checks passed
@cutecatfann cutecatfann deleted the blocklist_servers branch March 18, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants