> ## Documentation Index
> Fetch the complete documentation index at: https://docs.enkryptai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get MCP Hub API Usage Summary

> Self-service usage insights for your organization's gated MCP Hub API calls over a time window — totals, the success count, a per-endpoint breakdown (plus the top endpoints), a per-project breakdown, an HTTP status-class split, and a daily time-series. Returns **aggregate counts only** — no request or response data is exposed.

Access is restricted to the organization **owner or an admin**; a 403 is returned otherwise. Results are cached for a few minutes and the endpoint is rate-limited per API key — **2 requests/second, 20/minute, 120/hour, 500/day** — so it is safe to poll for dashboards. These limits are specific to this endpoint and apply on every plan (including enterprise); exceeding them returns `429` with `RateLimit-*` / `Retry-After` headers.

**Enterprise data-license feature:** requires MCP Hub API access enabled for your organization, otherwise returns `403`. Contact support@enkryptai.com.



## OpenAPI

````yaml GET /mcp-hub/usage
openapi: 3.0.0
info:
  title: Enkrypt AI APIs
  version: 2.0.0
servers:
  - url: https://api.enkryptai.com
security:
  - apiKeyAuth: []
tags:
  - name: Guardrails
  - name: Code of Conduct
  - name: Endpoints
  - name: Datasets
  - name: Redteam
  - name: Deployments
  - name: AI Proxy
  - name: Leaderboard
  - name: Archived
  - name: MCP Hub
    description: >-
      MCP Hub vulnerability scanning APIs. Submitting scans (the POST endpoints)
      is open to all authenticated callers. The scan **retrieval** APIs — Get
      Scan Job Status, Get Complete Scan Results, List Scans, and Get MCP Hub
      Scan Statistics (the GET endpoints) — are an **enterprise data-license
      feature**: they require your organization to have MCP Hub API access
      enabled by Enkrypt, otherwise they return `403`. Contact us at
      support@enkryptai.com to enable access.
  - name: MCP Registry Servers
  - name: MCP Gateways
  - name: MCP Playground
paths:
  /mcp-hub/usage:
    get:
      tags:
        - MCP Hub
      summary: Get MCP Hub API Usage Summary
      description: >-
        Self-service usage insights for your organization's gated MCP Hub API
        calls over a time window — totals, the success count, a per-endpoint
        breakdown (plus the top endpoints), a per-project breakdown, an HTTP
        status-class split, and a daily time-series. Returns **aggregate counts
        only** — no request or response data is exposed.


        Access is restricted to the organization **owner or an admin**; a 403 is
        returned otherwise. Results are cached for a few minutes and the
        endpoint is rate-limited per API key — **2 requests/second, 20/minute,
        120/hour, 500/day** — so it is safe to poll for dashboards. These limits
        are specific to this endpoint and apply on every plan (including
        enterprise); exceeding them returns `429` with `RateLimit-*` /
        `Retry-After` headers.


        **Enterprise data-license feature:** requires MCP Hub API access enabled
        for your organization, otherwise returns `403`. Contact
        support@enkryptai.com.
      operationId: mcp_hub_usage_summary
      parameters:
        - name: period
          in: query
          required: false
          description: >-
            Relative window ending now. One of `24h`, `7d`, `30d`, `90d`.
            Ignored when `start`/`end` are supplied. Defaults to `30d`.
          schema:
            type: string
            enum:
              - 24h
              - 7d
              - 30d
              - 90d
            default: 30d
        - name: start
          in: query
          required: false
          description: >-
            Start of a custom window (RFC3339). When set, overrides `period`.
            The window is capped at 90 days.
          schema:
            type: string
            format: date-time
        - name: end
          in: query
          required: false
          description: >-
            End of a custom window (RFC3339). Defaults to now. The window is
            capped at 90 days.
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: Aggregate usage summary for the organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MCPHubUsageSummaryResponse'
        '401':
          $ref: '#/components/responses/MCPHubUnauthorized'
        '403':
          $ref: '#/components/responses/MCPHubForbiddenNoAccess'
        '429':
          $ref: '#/components/responses/MCPHubRateLimited'
components:
  schemas:
    MCPHubUsageSummaryResponse:
      title: MCPHubUsageSummaryResponse
      type: object
      description: >-
        Aggregate-only usage summary for the calling organization. No raw call
        records are returned.
      properties:
        org_id:
          type: string
          format: uuid
        window:
          $ref: '#/components/schemas/MCPHubUsageWindow'
        total_calls:
          type: integer
          example: 12345
        successful_calls:
          type: integer
          description: Calls that returned a 2xx status.
          example: 12000
        by_endpoint:
          type: array
          description: Per-endpoint call counts, ordered by calls descending.
          items:
            $ref: '#/components/schemas/MCPHubUsageEndpointStat'
        top_endpoints:
          type: array
          description: The five most-called endpoints (a subset of by_endpoint).
          items:
            $ref: '#/components/schemas/MCPHubUsageEndpointStat'
        by_project:
          type: array
          description: Per-project call counts, ordered by calls descending.
          items:
            $ref: '#/components/schemas/MCPHubUsageProjectStat'
        by_status_class:
          type: array
          description: Call counts grouped by HTTP status class.
          items:
            $ref: '#/components/schemas/MCPHubUsageStatusStat'
        by_day:
          type: array
          description: Daily call counts across the window (UTC), ordered by day ascending.
          items:
            $ref: '#/components/schemas/MCPHubUsageDayStat'
        generated_at:
          type: string
          format: date-time
    MCPHubUsageWindow:
      title: MCPHubUsageWindow
      type: object
      description: The resolved time window the summary covers.
      properties:
        start:
          type: string
          format: date-time
        end:
          type: string
          format: date-time
        label:
          type: string
          description: The window label (e.g. 30d) or 'custom'.
          example: 30d
    MCPHubUsageEndpointStat:
      title: MCPHubUsageEndpointStat
      type: object
      description: Call counts for one gated MCP Hub endpoint.
      properties:
        endpoint:
          type: string
          description: >-
            Gated endpoint name (e.g. scans_list, scan_status, scan_results,
            dashboard_stats, servers_list, servers_job_status, servers_summary).
          example: scans_list
        calls:
          type: integer
          example: 5000
        successful:
          type: integer
          description: Calls that returned a 2xx status.
          example: 4900
    MCPHubUsageProjectStat:
      title: MCPHubUsageProjectStat
      type: object
      description: Call counts for one project within the organization.
      properties:
        project_name:
          type: string
          example: default
        calls:
          type: integer
          example: 3200
    MCPHubUsageStatusStat:
      title: MCPHubUsageStatusStat
      type: object
      description: Call counts for one HTTP status class.
      properties:
        status_class:
          type: integer
          description: HTTP status class (200, 400, 500, ...; 0 = unknown).
          example: 200
        calls:
          type: integer
          example: 12000
    MCPHubUsageDayStat:
      title: MCPHubUsageDayStat
      type: object
      description: Call counts for one UTC day.
      properties:
        day:
          type: string
          description: UTC day (YYYY-MM-DD).
          example: '2026-06-20'
        calls:
          type: integer
          example: 420
        successful:
          type: integer
          example: 410
    MCPHubAuthErrorResponse:
      title: MCPHubAuthErrorResponse
      type: object
      description: Error envelope returned by the MCP Hub auth/permission failures.
      properties:
        detail:
          type: string
    MCPHubForbiddenResponse:
      title: MCPHubForbiddenResponse
      type: object
      description: >-
        Error envelope returned when the caller's organization lacks MCP Hub API
        access (enterprise data-license feature).
      properties:
        code:
          type: integer
          example: 403
        error:
          type: string
          example: Forbidden
        message:
          type: string
          example: >-
            MCP Hub APIs are an enterprise feature not enabled for your
            organization. Contact us at support@enkryptai.com for access.
        request_id:
          type: string
        time:
          type: number
  responses:
    MCPHubUnauthorized:
      description: Unauthorized — missing or invalid Authorization header
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MCPHubAuthErrorResponse'
    MCPHubForbiddenNoAccess:
      description: >-
        Forbidden — your organization does not have access to the MCP Hub APIs.
        These retrieval/list endpoints are an enterprise data-license feature;
        contact support@enkryptai.com to enable access.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MCPHubForbiddenResponse'
    MCPHubRateLimited:
      description: >-
        Too Many Requests — the per-API-key rate limit for this endpoint was
        exceeded (2/second, 20/minute, 120/hour, 500/day). Retry after the
        window resets (see the RateLimit-* / Retry-After response headers).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MCPHubAuthErrorResponse'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: apikey

````