PaywallDataAgent
MCP server extension for querying Paywall data from Azure Data Explorer (Kusto). Provides a suite of tools for paywall telemetry analysis — funnel metrics, purchase data, A/B test results, and more — directly from VS Code via the Model Context Protocol (MCP).
Features
- Query paywall telemetry data from Azure Data Explorer (Kusto)
- Funnel analysis: sessions → UI shown → purchase clicked → purchase success
- Purchase metrics, conversion rates, and entry point breakdowns
- A/B test experiment lookup and flight-based analysis
- Table schema exploration for Android and iOS paywall tables
- Export query results to formatted Excel files
- Built-in KQL validation to prevent dangerous or malformed queries
- Platform-aware context with sample queries for Android and iOS
| Tool |
Description |
get_sample_queries |
Returns schema, table descriptions, clusters, and sample KQL queries filtered by platform. Call this first before writing any query. Covers funnel analysis, purchase counts, conversion rates, session data, entry points, A/B tests, error analysis, and general telemetry. |
validate_kql |
Validates a KQL query before execution — checks for blocked commands and syntax errors. Always call before query_kusto_live. |
query_kusto_live |
Executes a validated KQL query on Azure Data Explorer. Returns row count, column names, a result file path, and a preview of the first 20 rows. Use for funnel analysis, purchase metrics, session counts, A/B test results, etc. |
kusto_list_tables |
Lists all tables in the Kusto database for a given platform (android or ios). |
kusto_get_schema |
Returns column names and types for a specific Kusto table. |
export_to_excel |
Exports Kusto query results to a formatted .xlsx file in ~/Downloads. Pass the result_file path from query_kusto_live. |
search_experiment |
Fuzzy-searches for an A/B test experiment by partial name. Returns top matches with IDs. |
get_experiment_allocations |
Returns full experiment details: audiences, progression steps, running status, flight allocation IDs, and bucket ranges. Use after search_experiment to get treatment/control IDs for funnel queries. |
Typical Workflows
Paywall Funnel Analysis
get_sample_queries — load context and sample patterns
- Ask filtering questions (platform, date range, app, device, entry point)
validate_kql — validate the constructed query
query_kusto_live — execute and get results
export_to_excel — (optional) save results to Excel
A/B Test Experiment Analysis
search_experiment — find the experiment by name
get_experiment_allocations — get treatment/control allocation IDs
get_sample_queries — load context for building the flight-based query
validate_kql → query_kusto_live — execute the query
Requirements
- Python 3.10+
- VPN access to Kusto clusters
- Azure CLI (
az login) for authentication
Getting Started
- Install the extension
- Connect to VPN
- Run
az login in your terminal
- The MCP server starts automatically on activation
| |