Skip to content

MCP Server Feature Flag Validation Bug #145

@sreuter

Description

@sreuter

MCP Server Feature Flag Validation Bug

Issue: The MCP server has incorrect validation when adding or editing feature flags with filters using the "equals" operator.

Current behavior: When attempting to update a feature flag with a property filter that uses operator: "exact" with multiple values (as an array), the MCP server throws a validation error: operator "exact" is not valid for value type "array"

Expected behavior: PostHog's API and UI support using the "equals" operator with multiple values. The MCP server should accept this configuration as valid.

Example:
Attempting to update a feature flag to match users with emails like [email protected], [email protected], and [email protected] using:

{
  "filters": {
    "groups": [{
      "properties": [{
        "key": "email",
        "value": ["[email protected]", "[email protected]", "[email protected]"],
        "operator": "exact"
      }],
      "rollout_percentage": 100
    }]
  }
}

This is rejected by the MCP server's validation, even though it's a valid PostHog feature flag configuration.

Impact: Users cannot add or edit feature flags with multiple values using the "equals" operator through the MCP server, forcing them to use the UI instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions