sd2k/MCP Token Analysis

Analyze token usage of MCP servers and compare against baselines

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
commandCommand to start the MCP serveryes
baselinePath to baseline JSON file for comparisonno
threshold-percentMaximum allowed percentage increase in tokensno5
threshold-absoluteMaximum allowed absolute increase in tokensno
anthropic-api-keyAnthropic API key for accurate token counting (falls back to tiktoken if not provided)no
providerToken counting provider (anthropic or tiktoken). Auto-detects if not specified.no
modelModel to use for token countingno
all-providersGenerate baseline with all available providers for cross-environment compatibilitynofalse
outputPath to save the report JSONno
timeoutTimeout in seconds for server startupno30
versionVersion of mcp-tokens to usenolatest
commentPost a PR comment with results (requires github-token for PRs)nofalse
comment-on-passPost a comment even when the check passes (only applies when comment is true)nofalse
max-tool-changesMaximum number of tool changes to show in PR comment (0 for all)no5
github-tokenGitHub token for posting PR comments (required if comment is true)no
namedescription
total-tokensTotal token count
tool-tokensToken count for tools only
providerToken counting provider used
diffToken difference from baseline
diff-percentPercentage difference from baseline
passedWhether the threshold check passed
failure-reasonHuman-readable failure reason if threshold exceeded
baseline-tokensToken count from baseline (for comparison)
tool-changesJSON array of tool changes (added/removed/modified tools with token diffs)
tool-changes-countNumber of tools that changed