Platform Analytics
34 lines

Plan overview

MCP Fleet Overview

Aggregate the last 30 days of MCP telemetry across every server and category into a single ranked table of calls, errors, connections, and active users.

Best for

Platform PMs · DevOps · Leadership

Runs with

BigQuery · Fleet ranking · Connection status

At a glance

04

Outputs

01

Capabilities

03

Teams

Core outputs

Ranked server table

Error rates

Connection status

Active users

Capability requirements

MCP

What it solves

There's no quick, repeatable snapshot of which MCP servers are actually driving usage and where errors and dormant connections concentrate.

Delivers a one-shot snapshot of the entire MCP fleet.

Highlights dormant connections and error concentration instantly.

Returns a typed table ready to pipe into a dashboard or BI tool.

Workflow

1

Run one read-only BigQuery aggregation across the MCP catalog.

2

Rank servers by call volume with error and connection-status columns.

3

Return a typed, chart-ready records table for the fleet.

Implementation

Review the underlying FML plan — the sessions, tools, and typed schemas that define this workflow — and see exactly how it is instructed for repeatable execution.

FML Plan

mcpops-active.fml

34 lines

Copy
require mcp BigQuery

session("mcp_analytics") {
    use mcp BigQuery

    call("execute_sql_readonly") -> vars:bq_result {
        projectId = "barndoor-production"
        query     = "SELECT mcp_name, mcp_category, COUNT(DISTINCT tenant_id) AS tenant_count, SUM(total_tool_calls) AS total_calls, SUM(total_errors) AS total_errors, SAFE_DIVIDE(SUM(total_errors), NULLIF(SUM(total_tool_calls), 0)) AS error_rate, MAX(last_tool_call) AS last_tool_call, COUNTIF(connected_but_never_called) AS connections_never_called, SUM(active_users) AS total_active_users, COUNT(DISTINCT IF(status = 'Active', mcp_id, NULL)) AS active_connections, COUNT(DISTINCT IF(status = 'Pending', mcp_id, NULL)) AS pending_connections, COUNT(DISTINCT IF(status = 'Error', mcp_id, NULL)) AS error_connections FROM `barndoor-production.gtm_analytics.mcp_block` WHERE DATE(last_tool_call) >= DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY) OR last_tool_call IS NULL GROUP BY mcp_name, mcp_category ORDER BY total_calls DESC LIMIT 50"
    }

    + The BigQuery query has executed successfully. Here is the raw JSON result:
      {{ .vars.bq_result | json }}

    - Parse the BigQuery result into the structured schema below. 
      The data contains an array of rows where each row has columns in the exact order as the schema fields (mcp_name, mcp_category, tenant_count, total_calls, total_errors, error_rate, last_tool_call, connections_never_called, total_active_users, active_connections, pending_connections, error_connections).
      Convert string representations of numbers to their appropriate int/float types.

    schema {
        records: {
            mcp_name: string
            mcp_category: string
            tenant_count: int
            total_calls: int
            total_errors: int
            error_rate: float
            last_tool_call: string
            connections_never_called: int
            total_active_users: int
            active_connections: int
            pending_connections: int
            error_connections: int
        }[]
    }
}