PostHog capability
Read a PostHog feature flag definition
Read a feature flag definition to inspect its key, active state, and rollout rules. To check what a given user receives, evaluate the flag with that user’s context.
Documentation reviewed
Ways to do it
API
GET /api/projects/{project_id}/feature_flags/{id}/
Retrieve the flag definition and its filters by numeric ID.
- Requirements
- Project ID, numeric feature flag ID, and a personal API key with feature_flag:read permission.
- Limitations
- The endpoint requires the numeric ID. Resolve it first when you only have the flag key.
Example
curl --fail -H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
"$POSTHOG_HOST/api/projects/$PROJECT_ID/feature_flags/$FLAG_ID/"MCP
feature-flag-get-definition-by-key
Retrieve the configuration for a flag using its key in an MCP tool call.
- Requirements
- An authenticated PostHog MCP client with access to the project, the flag key, and this tool enabled.
- Limitations
- The result describes the flag definition. A per-user value still needs an evaluation with user properties.
Interface
PostHog → Feature flags → flag
Open the flag to inspect release conditions, variant settings, and rollout percentages.
- Requirements
- Project access that allows viewing the flag.
- Limitations
- The page displays configuration. To see a user-specific value, evaluate against a user or group context.