MCP LensMCP context accounting for AI coding clients. MCP Lens automatically collects MCP tool usage from Claude Code, Codex, and Gemini CLI, then shows you what each server and tool actually costs versus how often you use it. What it does
Zero configJust install and go. MCP Lens auto-detects which clients are installed, reads their logs (read-only), and backfills past sessions on startup. There is nothing to set up and no account required. Settings
Definition tokensResponse-token accounting works out of the box. To also measure how many tokens each tool's definition costs (its schema, injected into every prompt), run:
This probes your configured MCP servers and records definition token counts, which then appear in the report and sidebar recommendations. |