ai-cost-optimizer

Cloudflare Workers MCP server: ai-cost-optimizer

Sollte ich dies verwenden

Qualität und Sicherheit

A
Qualität der Beschreibung
96%
Vollständigkeit des Schemas
96%
Qualität der Benennung
80%
Risiko der Vergiftung
100%
Übereinstimmung der Berechtigungen
100%
Einhaltung des Protokolls
100%

Basierend auf einer automatisierten Analyse der Tool-Definitionen und der Einhaltung des Protokolls.

Kontextkosten

~584Tokens (Tool-Definitionen)
~1.1 KBTypische Antwortgröße
Minimale Auswirkung auf die Aufmerksamkeit (0.46% von 128k Kontext)

Dies ist die ungefähre Anzahl der Tokens, die jedes Mal verbraucht werden, wenn die Tools des Servers in den Kontext eines Modells geladen werden. Höhere Werte verringern die Aufmerksamkeit, die für andere Aufgaben verfügbar ist.

Installieren

Installation mit einem Klick

Fügen Sie dies Ihrer Datei `claude_desktop_config.json` hinzu:

{
  "mcpServers": {
    "ai-cost-optimizer": {
      "url": "https://api.lazy-mac.com/ai-cost-optimizer/mcp"
    }
  }
}

Remote-Endpunkte

https://api.lazy-mac.com/ai-cost-optimizer/mcpstreamable-http

Was es kann

Tool-Inventar

Tools (5)

🟢 Nur lesen🟡 Schreiben🔴 Löschen⚪ Unbekannt
🟢cost_tracker(action, model, inputTokens, outputTokens, team, ...)

Record and retrieve AI API call costs by team. Persists to Cloudflare KV — survives cold starts and scale-out.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "action": {
      "type": "string",
      "enum": [
        "record",
        "get"
      ],
      "description": "\"record\" to log a call, \"get\" to retrieve recent records"
    },
    "model": {
      "type": "string",
      "description": "Model ID (e.g., claude-3-5-sonnet-20241022, gpt-4o, gemini-2.0-flash)"
    },
    "inputTokens": {
      "type": "number",
      "description": "Number of input/prompt tokens consumed"
    },
    "outputTokens": {
      "type": "number",
      "description": "Number of output/completion tokens generated"
    },
    "team": {
      "type": "string",
      "description": "Team or project identifier (default: \"default\")"
    },
    "metadata": {
      "type": "object",
      "description": "Optional key-value metadata (request ID, user, feature flag, etc.)"
    }
  },
  "required": [
    "action"
  ]
}
🟢token_calculator(model, inputTokens, outputTokens)

Calculate cost from token counts for any supported AI model. Stateless — no KV required.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "model": {
      "type": "string",
      "description": "Model ID to price"
    },
    "inputTokens": {
      "type": "number",
      "description": "Input token count"
    },
    "outputTokens": {
      "type": "number",
      "description": "Output token count"
    }
  },
  "required": [
    "model",
    "inputTokens",
    "outputTokens"
  ]
}
🟡budget_alert(action, team, budgetLimit, threshold)

Set and check budget limits for teams. Raises a flag when a configurable spending threshold is reached.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "action": {
      "type": "string",
      "enum": [
        "set",
        "check"
      ],
      "description": "\"set\" to configure a budget, \"check\" to get current status"
    },
    "team": {
      "type": "string",
      "description": "Team identifier"
    },
    "budgetLimit": {
      "type": "number",
      "description": "USD budget cap"
    },
    "threshold": {
      "type": "number",
      "description": "Alert threshold percentage 0–100 (default: 80)"
    }
  },
  "required": [
    "action"
  ]
}
🟢model_breakdown(team, days)

Analyze costs broken down by model for a given team over a configurable time window.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "team": {
      "type": "string",
      "description": "Team identifier"
    },
    "days": {
      "type": "number",
      "description": "Lookback window in days (default: 30)"
    }
  }
}
⚪cost_forecast(team, forecastDays, historicalDays)

Forecast future AI spend based on historical usage patterns using daily-average linear projection.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "team": {
      "type": "string",
      "description": "Team identifier"
    },
    "forecastDays": {
      "type": "number",
      "description": "Days to project ahead (default: 7)"
    },
    "historicalDays": {
      "type": "number",
      "description": "Days of history to base the forecast on (default: 30)"
    }
  }
}

Community

Diesen Server bewerten

Nachweis

Aktuelle Beobachtungen

verifiziertVersion nicht aufgezeichnet5 Tools
verifiziertVersion nicht aufgezeichnet5 Tools