Skip to main content
Glama
llmkit-mcp-server

llmkit-mcp-server

by smigolsmigol

@f3d1/llmkit-mcp-server

KI-Kostenverfolgung für Claude Code, Cline, Cursor und Claude Desktop. 11 Tools für Ausgabenabfragen, Budgets, lokale Sitzungskosten und Agenten-Attribuierung über 11 LLM-Anbieter hinweg.

Teil von LLMKit, einem Open-Source-API-Gateway mit Kostenverfolgung und Budgetdurchsetzung.

Schnellstart

Fügen Sie dies zu Ihrer .mcp.json (Claude Code) oder .cursor/mcp.json (Cursor) hinzu:

{
  "mcpServers": {
    "llmkit": {
      "command": "npx",
      "args": ["@f3d1/llmkit-mcp-server"],
      "env": {
        "LLMKIT_API_KEY": "llmk_your_key_here"
      }
    }
  }
}

Die lokalen Tools (llmkit_local_*) funktionieren sofort ohne API-Schlüssel. Sie erkennen automatisch Claude Code-, Cline- und Cursor-Daten auf Ihrem Computer. Für die Proxy-Tools erstellen Sie einen kostenlosen Schlüssel im Dashboard.

Related MCP server: Langfuse MCP Server

Tools

Proxy-Tools (benötigen API-Schlüssel)

Tool

Was es tut

llmkit_usage_stats

Ausgaben, Anfragen, Top-Modelle für einen Zeitraum

llmkit_cost_query

Kosten gruppiert nach Anbieter, Modell, Sitzung oder Tag

llmkit_budget_status

Budgetlimits und verbleibendes Guthaben

llmkit_session_summary

Letzte Sitzungen mit Kosten, Dauer, Modellen

llmkit_list_keys

Alle Schlüssel mit Status und Erstellungsdatum

llmkit_health

Proxy-Ping mit Antwortzeit

Lokale Tools (kein Schlüssel erforderlich)

Erkennen automatisch installierte KI-Codierungstools und aggregieren Daten von allen.

Tool

Was es tut

llmkit_local_session

Aktuelle Sitzungskosten über alle erkannten Tools hinweg

llmkit_local_projects

Kumulierte Kosten über alle Projekte und Sitzungen hinweg

llmkit_local_cache

Analyse der Einsparungen durch Prompt-Caching

llmkit_local_forecast

Monatliche Prognose vs. Max-Abonnement

llmkit_local_agents

Subagenten-Kostenattribuierung (Claude Code)

SessionEnd-Hook

Automatisches Protokollieren der Sitzungskosten beim Beenden von Claude Code:

{
  "hooks": {
    "SessionEnd": [
      {
        "type": "command",
        "command": "npx @f3d1/llmkit-mcp-server --hook"
      }
    ]
  }
}

Umgebungsvariablen

Variable

Erforderlich

Beschreibung

LLMKIT_API_KEY

Nein

API-Schlüssel für Proxy-Tools. Lokale Tools funktionieren ohne ihn.

LLMKIT_PROXY_URL

Nein

Proxy-URL (Standard ist der gehostete Dienst)

LLMKIT_CLINE_DIR

Nein

Pfad zum Cline-Datenverzeichnis überschreiben

Unterstützte Tools

Die lokalen Tools erkennen Daten von:

  • Claude Code (~/.claude/projects/)

  • Cline (VS Code, Insiders, VSCodium, Cursor, Windsurf globalStorage)

  • WSL-Installationen (scannt alle Distributionen über UNC-Pfade unter Windows)

  • VS Code Server / Cursor Server (Remote-SSH/WSL-Erweiterungen)

Lizenz

MIT

Available Tools

11 tools
llmkit_budget_statusA
Read-onlyIdempotent

Check budget limits and remaining balance

Inputs: budgetId. Returns: budgets

llmkit_cost_queryB
Read-onlyIdempotent

Query cost breakdown grouped by provider, model, session, or day

Inputs: groupBy (required), days, provider, model. Returns: groupBy, days, breakdown

llmkit_healthA
Read-onlyIdempotent

Check proxy health and response time

Inputs: no named parameters. Returns: status, responseTimeMs

llmkit_list_keysA
Read-onlyIdempotent

List all API keys with status and creation date

Inputs: no named parameters. Returns: keys

llmkit_local_agentsA
Read-onlyIdempotent

Subagent cost attribution for the current Claude Code session. Shows which agents cost the most.

Inputs: no named parameters. Returns: sessionId, totalCostUsd, mainConversationCostUsd, subagentsTotalCostUsd, +2 more

llmkit_local_cacheA
Read-onlyIdempotent

Cache savings analysis across all detected AI coding tools. Shows how much prompt caching saved.

Inputs: no named parameters. Returns: savings, totalSavedUsd

llmkit_local_forecastA
Read-onlyIdempotent

Monthly cost projection based on local AI tool usage. Compares to Max subscription.

Inputs: no named parameters. Returns: projectedMonthlyUsd, dailyAverageUsd, totalTrackedUsd, totalSessions, +1 more

llmkit_local_projectsA
Read-onlyIdempotent

Cumulative cost across all projects and sessions from all detected AI coding tools, ranked by spend.

Inputs: no named parameters. Returns: projects, totalCostUsd

llmkit_local_sessionA
Read-onlyIdempotent

Current session cost across all detected AI coding tools (Claude Code, Cline). No API key needed.

Inputs: no named parameters. Returns: sessions, totalCostUsd, sourceCount

llmkit_session_summaryA
Read-onlyIdempotent

Get recent proxy sessions with cost, duration, and models used

Inputs: sessionId, limit. Returns: sessions

llmkit_usage_statsC
Read-onlyIdempotent

Get usage statistics (spend, requests, top models) for a time period

Inputs: period. Returns: period, requests, totalSpendUsd, inputTokens, +4 more

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 11 tools

    Disambiguation4/5

    Tools are mostly distinct, targeting different aspects like budget, cost breakdown, health, keys, local session, etc. However, llmkit_cost_query, llmkit_usage_stats, and llmkit_session_summary have overlapping purposes (cost/spend/usage data) which could cause some confusion.

    Naming Consistency5/5

    All tools follow a consistent pattern with the 'llmkit_' prefix and descriptive noun phrases separated by underscores, e.g., llmkit_budget_status, llmkit_cost_query. No mixing of conventions.

    Tool Count5/5

    With 11 tools, the count is well within the recommended 3-15 range. Each tool covers a distinct aspect of proxy cost monitoring and management, justifying its inclusion.

    Completeness4/5

    The tool surface covers major monitoring needs: health, budget, cost, keys, sessions, and local attribution. However, it lacks management capabilities (e.g., create/update keys or budgets) and could include actions like setting usage limits, which are minor gaps for a read-only analytics server.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      D
      maintenance
      Enables interaction with Google Cloud services including billing cost analysis, log querying, and metrics monitoring through natural language commands. Provides comprehensive tools for managing GCP resources, analyzing costs, detecting anomalies, and retrieving operational insights.
      40
      1
      Apache 2.0
    • A
      license
      B
      quality
      D
      maintenance
      Enables querying Langfuse analytics, cost metrics, and usage data across multiple projects. Provides tools for trace analysis, model/service cost breakdowns, and daily usage trends through natural language queries.
      24
      73 npm
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables querying and analyzing AWS cost and usage data through the AWS Cost Explorer API. Supports cost comparisons, forecasting, dimension filtering, and cost change driver analysis with streamable HTTP deployment to Amazon Bedrock Agentcore Runtime.
      -
    • A
      license
      B
      quality
      C
      maintenance
      An MCP server for unified cost tracking and analysis across AWS, OpenAI, and Anthropic. It enables users to query expenditures, compare costs across providers, and analyze usage trends through natural language.
      10
      MIT