ExMCP.FeatureFlags (ex_mcp v0.10.0)

View Source

Feature flag system for controlling rollout of new MCP features.

This module provides a centralized way to check if specific features are enabled, allowing for gradual rollout and easy rollback.

Summary

Functions

Get all feature flags and their current status.

Check if a specific feature is enabled.

Functions

all()

@spec all() :: map()

Get all feature flags and their current status.

Examples

iex> ExMCP.FeatureFlags.all()
%{
  protocol_version_header: false,
  structured_output: false,
  oauth2_auth: false
}

enabled?(arg1)

@spec enabled?(atom()) :: boolean()

Check if a specific feature is enabled.

Features

  • :protocol_version_header - Enforce MCP-Protocol-Version header validation
  • :structured_output - Enable structured tool output with schema validation
  • :oauth2_auth - Enable OAuth 2.1 authorization

Examples

iex> ExMCP.FeatureFlags.enabled?(:protocol_version_header)
false

iex> Application.put_env(:ex_mcp, :protocol_version_required, true)
iex> ExMCP.FeatureFlags.enabled?(:protocol_version_header)
true