Skip to content

Support querying custom event properties - #1

Merged
chrmod merged 1 commit into
ghosteryfrom
feat/custom-properties
Jul 24, 2026
Merged

Support querying custom event properties#1
chrmod merged 1 commit into
ghosteryfrom
feat/custom-properties

Conversation

@chrmod

@chrmod chrmod commented Jul 24, 2026

Copy link
Copy Markdown
Member

Goal

Let the MCP query Plausible custom event properties, generically — no property names are hardcoded, so any site can slice by whatever its own tracker sends.

  • Break down by a custom property: get_breakdown accepts a dimension of event:props:<name> (e.g. event:props:destination_host) alongside the standard dimensions.
  • Filter by a custom property on every query tool (get_breakdown, get_timeseries, get_conversions, compare_periods) via a new property_filters input, e.g. [{ "property": "plan", "operator": "is", "values": ["pro"] }]. Operators: is, is_not, contains, contains_not; entries combine with AND.

Shared schema + filter builders live in src/schemas.ts; server instructions now document the event:props: convention to steer clients away from malformed queries.

Branched off main so it can also go upstream to getsentry/plausible-mcp later; this PR lands it on ghostery for deployment.

Test plan

In an MCP client pointed at the deployed server:

  • Ask for a breakdown by a custom property your site sends (e.g. "break down visitors by destination_host") and confirm the rows are grouped by that property's values.
  • Ask to filter a query by a custom property value (e.g. "daily visitors where plan is pro") and confirm the numbers are scoped to that value.
  • Confirm existing queries (top pages, sources, conversions) are unchanged.

Break down by any event:props:<name> dimension and filter any query
tool by custom property values, so sites can slice by the properties
their own tracker sends.
@chrmod
chrmod merged commit a3ac12e into ghostery Jul 24, 2026
1 check passed
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.

1 participant