Ismail-2001/mcp-token-auditor
A high-performance, multi-agent observability engine designed for the Model Context Protocol (MCP). It provides a non-blocking, transparent proxy layer that implements deterministic token attribution, real-time context-window alerting, and heuristic-driven static analysis to optimize LLM metadata overhead at scale.
Platform-specific configuration:
{
"mcpServers": {
"mcp-token-auditor": {
"command": "npx",
"args": [
"-y",
"mcp-token-auditor"
]
}
}
}Add the config above to .claude/settings.json under the mcpServers key.
[](https://opensource.org/licenses/MIT) [](https://www.python.org/downloads/) [](https://modelcontextprotocol.io)
MCP Token Auditor is a production-grade, multi-agent proxy intelligence layer designed for high-throughput observability of MCP (Model Context Protocol) tool consumption. It acts as an transparent observer between MCP clients and servers, providing deterministic token counting, real-time alerting, and static analysis for tool optimization.
---
graph TD
Client[MCP Client] <--> ProxyAgent[Agent 2: Proxy Interceptor]
ProxyAgent <--> Server[MCP Server]
ProxyAgent -- "Ingest (Async Task)" --> Orchestrator[Agent 1: Orchestrator]
subgraph "Intelligence Plane"
Orchestrator --> Audit[Agent 3: Token Audit]
Audit --> Alert[Agent 4: Alert Monitor]
Audit --> Advisor[Agent 5: Compression Advisor]
Audit[(SQLite Audit Log)]
Advisor -- "Strategy" --> SharedSchema[Shared Schema Insights]
end
subgraph "Observability Plane"
Audit -- "Stream" --> Dashboard[Agent 6: Dashboard Broadcast]
Dashboard -- "WebSockets" --> UI[React/Web Dashboard]
end---
<5ms overhead on the critical path.tiktoken (o200k_base) with MD5-keyed caching for sub-millisecond token counts.CALL_SPIKE, SERVER_DRIFT, and context window thresholds.Loading reviews...