tokentrail-mcp

v1.0.8
@rajatpal96/tokentrail-mcp Checked 4 days ago Published 3 months ago

Model Context Protocol (MCP) Server for TokenTrail AI Usage & Observability

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

usage_today

Get today's total AI agent token consumption, request count, and estimated cost across the organization.

ParameterTypeDescription
organizationIdstringOrganization identifier (optional)

usage_this_week

Get this week's AI agent token consumption, cost breakdown, and top agents.

ParameterTypeDescription
organizationIdstringOrganization identifier (optional)

usage_this_month

Get this month's AI agent token metrics and cost summary.

ParameterTypeDescription
organizationIdstringOrganization identifier (optional)

usage_current_session

Get real-time token consumption, latency, and cost for a specific active coding session.

ParameterTypeDescription
sessionId *stringSession ID to inspect

usage_by_agent

Break down AI consumption across agents (Claude Code, GitHub Copilot, Gemini/Antigravity, Codex, Grok).

ParameterTypeDescription
rangestringTime range (default 30d)

usage_by_model

Break down AI consumption and cost by model (Claude 3.7 Sonnet, GPT-4o, Gemini 2.5 Pro, etc.).

ParameterTypeDescription
rangestringTime range (default 30d)

usage_by_project

Break down AI spend and token usage by repository or project name.

ParameterTypeDescription
rangestringTime range (default 30d)

cost_today

Get today's total estimated spend in USD across all AI coding assistants.

cost_this_month

Get this month's estimated USD spend vs budget allocation.

budget_status

Check organization monthly budget limit, current spend, and remaining allocation percentage.

top_expensive_sessions

List the most expensive AI coding sessions with agent names, token counts, and USD cost.

ParameterTypeDescription
limitnumberMax sessions to return (default 5)

track_usage_event

Directly record a token consumption or execution event from Antigravity/IDE into central AgentMeter.

ParameterTypeDescription
agent *stringAgent identifier (e.g. gemini-antigravity, claude-code)
completionTokens *numberNumber of completion tokens
model *stringModel name (e.g. gemini-2.5-pro, claude-3-7-sonnet)
promptTokens *numberNumber of prompt tokens
projectIdstringRepository / Project identifier
sessionIdstringSession identifier