> ## 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: Redteam
    description: >-
      Red Team API: submit red-team / threat-modeling / playground / eval runs,
      then poll run status, records, results and compliance. Also two-phase
      threat modeling (categories + data), dataset retrieval, model health,
      findings and risk mitigation. The previous task-based Red Team API is
      under **Archived**.
  - 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
  - name: Skill Scanner
    description: >-
      Skill Scanner APIs: submit an agent skill (a directory inside a git
      repository) for security scanning, then read the verdict, the risk level
      and the full report. Scanning is asynchronous — a scan takes roughly 30–90
      seconds, so `POST /skill-hub/scan` returns a `scan_id` you poll.


      You see your organization's scans and nobody else's. The identity comes
      from your API key, never from your request — sending `user_email` is a
      `400`.


      For an organization or project API key, scans are filed under the
      **organization**, so every member sees every scan the organization has
      run, whichever project or member submitted it. For an individual account
      it is simply your own scans. Either way List Skill Scans needs no
      parameter to say who you are.
  - name: Compliance
    description: >-
      Compliance APIs: connect a ChatGPT Enterprise workspace, then keep reading
      its compliance logs and scanning every message through one of your saved
      guardrails.


      Every endpoint here — reads as well as writes — requires the **governance
      officer** role on the project your API key belongs to. The organization
      owner is **not** exempt: an owner who has not been granted the role gets
      `403` like anyone else. An individual (non-organization) account cannot
      hold the role at all, so compliance is an organization-only feature today.


      A scan is addressed by name in the `X-Enkrypt-Scan` header, within the
      project its API key belongs to. Message text is never stored: Get
      Compliance Message fetches it live from the provider, and only while the
      provider still holds it.
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

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.