productmetrics

v0.1.0
io.github.CloudCorpRecords/productmetrics Checked 38 minutes ago Published 1 month ago

PostHog projects, insights, flags and experiments as MCP tools.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_projects

List PostHog projects the API key can access.

get_project

Retrieve a PostHog project by ID, or the configured default project.

ParameterTypeDescription
project_idstringOptional ID of the PostHog project to retrieve; when omitted, the POSTHOG_PROJECT_ID environment fallback is used.

list_insights

List insights in a PostHog project.

ParameterTypeDescription
limitnumberOptional maximum number of insights to return, sent as the limit query parameter.
project_idstringOptional ID of the PostHog project to list insights from; when omitted, the POSTHOG_PROJECT_ID environment fallback is used.

get_insight

Retrieve a single PostHog insight by ID.

ParameterTypeDescription
insight_id *stringThe ID of the PostHog insight to retrieve.
project_idstringOptional ID of the PostHog project the insight belongs to; when omitted, the POSTHOG_PROJECT_ID environment fallback is used.

query_insight

Run a PostHog insight and return its query results.

ParameterTypeDescription
insight_id *stringThe ID of the PostHog insight to run; the request forces a refresh with refresh=true.
project_idstringOptional ID of the PostHog project the insight belongs to; when omitted, the POSTHOG_PROJECT_ID environment fallback is used.

run_hogql_query

Run a HogQL query against a PostHog project.

ParameterTypeDescription
query *stringThe HogQL query text to run against the project.
project_idstringOptional ID of the PostHog project to run the query against; when omitted, the POSTHOG_PROJECT_ID environment fallback is used.

list_feature_flags

List feature flags in a PostHog project.

ParameterTypeDescription
limitnumberOptional maximum number of feature flags to return, sent as the limit query parameter.
project_idstringOptional ID of the PostHog project to list feature flags from; when omitted, the POSTHOG_PROJECT_ID environment fallback is used.

get_feature_flag

Retrieve a single PostHog feature flag by ID.

ParameterTypeDescription
flag_id *stringThe ID of the PostHog feature flag to retrieve.
project_idstringOptional ID of the PostHog project the flag belongs to; when omitted, the POSTHOG_PROJECT_ID environment fallback is used.

create_feature_flag

Create a feature flag in a PostHog project.

ParameterTypeDescription
key *stringThe unique key of the new feature flag.
activebooleanOptional initial active state of the new feature flag.
namestringOptional human-readable name for the new feature flag.
project_idstringOptional ID of the PostHog project to create the flag in; when omitted, the POSTHOG_PROJECT_ID environment fallback is used.

update_feature_flag

Update a PostHog feature flag by ID.

ParameterTypeDescription
flag_id *stringThe ID of the PostHog feature flag to update.
activebooleanOptional new active state: true activates the flag, false deactivates it.
namestringOptional new human-readable name for the flag; omitted fields are left unchanged.
project_idstringOptional ID of the PostHog project the flag belongs to; when omitted, the POSTHOG_PROJECT_ID environment fallback is used.

list_experiments

List experiments in a PostHog project.

ParameterTypeDescription
limitnumberOptional maximum number of experiments to return, sent as the limit query parameter.
project_idstringOptional ID of the PostHog project to list experiments from; when omitted, the POSTHOG_PROJECT_ID environment fallback is used.

get_experiment

Retrieve a single PostHog experiment by ID.

ParameterTypeDescription
experiment_id *stringThe ID of the PostHog experiment to retrieve.
project_idstringOptional ID of the PostHog project the experiment belongs to; when omitted, the POSTHOG_PROJECT_ID environment fallback is used.