API Meter

Per-customer API usage analytics: sign up, get ingest snippets, read usage by customer and endpoint.

我該用這個嗎

品質與安全性

A
說明品質
100%
結構描述完整度
89%
命名品質
100%
汙染風險
100%
權限相符程度
100%
協定合規性
100%

根據工具定義與協定合規性的自動化分析。

上下文成本

~599Token(工具定義)
~953 B典型回應大小
極小的注意力影響(128k 上下文的 0.47%)

這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。

安裝

一鍵安裝

將以下內容加入你的 `claude_desktop_config.json` 檔案:

{
  "mcpServers": {
    "api-meter": {
      "url": "https://api-meter-lab.pages.dev/mcp"
    }
  }
}

遠端端點

https://api-meter-lab.pages.dev/mcpstreamable-http

它能做什麼

工具清單

工具(4)

🟢 唯讀🟡 寫入🔴 刪除⚪ 未知
🟡create_account(email, api_name, origin_url)

Sign up an API for API Meter (free to 250K requests/month). Returns the slug, ingest key, dashboard key and proxy URL. Keys are shown once: store them. Limited to 5 signups per hour per network.

輸入結構描述

{
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "description": "Contact email for the API owner (stored hashed)"
    },
    "api_name": {
      "type": "string",
      "description": "API name, 2-60 chars"
    },
    "origin_url": {
      "type": "string",
      "description": "Public https origin of the API, e.g. https://api.example.com"
    }
  },
  "required": [
    "email",
    "api_name",
    "origin_url"
  ]
}
🟢get_ingest_snippet(framework, slug)

Copy-paste server code that reports each request (method, route, status, latency, customer, plan) to API Meter. Batched, fail-open, never blocks your API.

輸入結構描述

{
  "type": "object",
  "properties": {
    "framework": {
      "type": "string",
      "enum": [
        "express",
        "hono",
        "fastapi",
        "flask",
        "django",
        "go",
        "curl"
      ]
    },
    "slug": {
      "type": "string",
      "description": "Optional: your slug, filled into the snippet"
    }
  },
  "required": [
    "framework"
  ]
}
🟢get_usage(slug, dashboard_key, month, group_by, limit)

Monthly (UTC) usage for one API, grouped by customer, endpoint or plan. Includes an agent bucket: requests whose plan label ends in '-agent' (AI agent / bot traffic, counted and billed like any request).

輸入結構描述

{
  "type": "object",
  "properties": {
    "slug": {
      "type": "string"
    },
    "dashboard_key": {
      "type": "string",
      "description": "msd_... key from signup"
    },
    "month": {
      "type": "string",
      "description": "YYYY-MM, default current UTC month"
    },
    "group_by": {
      "type": "string",
      "enum": [
        "customer",
        "endpoint",
        "plan"
      ],
      "default": "customer"
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 200,
      "default": 25
    }
  },
  "required": [
    "slug",
    "dashboard_key"
  ]
}
🟢export_usage(slug, dashboard_key, month, view, format)

Billing-ready monthly usage rows (same as /api/export): view=detail (customer x plan x method x endpoint) or view=customers. Returns JSON rows, or CSV text with format=csv.

輸入結構描述

{
  "type": "object",
  "properties": {
    "slug": {
      "type": "string"
    },
    "dashboard_key": {
      "type": "string"
    },
    "month": {
      "type": "string"
    },
    "view": {
      "type": "string",
      "enum": [
        "detail",
        "customers"
      ],
      "default": "detail"
    },
    "format": {
      "type": "string",
      "enum": [
        "json",
        "csv"
      ],
      "default": "json"
    }
  },
  "required": [
    "slug",
    "dashboard_key"
  ]
}

社群

為此伺服器評分

證據

近期觀測

已驗證未記錄版本4 個工具