Vantage Telemetry MCP Server
MCP server that captures and exposes usage, cost, productivity, and activity metrics for local-first software engineering teams, including LLM token usage, cloud cost savings, and developer activity tracking.
README
Vantage Telemetry MCP Server
A Model Context Protocol (MCP) server that captures and exposes usage, cost, productivity, and activity metrics for local-first software engineering teams.
It functions as the telemetry agent on a developer's machine, running in the background while plugged into an MCP-capable client (like VS Code/Cline, Cursor, Claude Code, or Windsurf).
🚀 Key Features
- Usage Analytics: Tracks prompts, assistant response lengths, and token usage.
- Cost Analytics: Integrates with Vantage Harness to display estimated cloud LLM costs vs. actual costs and net local-routing savings.
- Productivity Metrics: Monitors active typing session intervals, file additions/deletions, and code lines added/deleted in real-time.
- Audit Logs: Maintains a secure, local developer activity trail (file edits, command runs, git actions).
- Self-Bootstrapping: Automatically installs required Python packages (
mcp,watchdog,psutil,httpx) on first startup.
Telemetry event contract and privacy
Events use an additive versioned envelope (schemaVersion, eventId, occurredAt,
deviceId, sessionId, workspaceId, collectionMethod) while retaining the
legacy flat fields consumed by Vantage Harness. Secrets and machine-specific
absolute paths are filtered before local persistence or network delivery. Failed
deliveries remain in ~/.vantage/telemetry_outbox.jsonl and retry with bounded
exponential backoff.
Filesystem events deliberately use editOrigin: unknown; only an IDE-specific
source such as Cursor's scored-commit database may claim AI/human attribution,
and every attribution includes its source and confidence.
🛠️ Architecture
VS Code / Cursor / Cline / Claude Code
|
v (stdio / JSON-RPC)
+-------------------+
| Telemetry MCP | <---+ Watches Workspace File Changes
+-------------------+ and Git Branch & Commit logs
/ \
/ \
v v
Local JSONL File Vantage Harness Gateway
(~/.vantage/telemetry.jsonl) (http://localhost:50123/v1/telemetry)
⚙️ Configuration in IDEs
1. VS Code (Cline)
The client setup.ps1 script automatically registers this server in VS Code's Cline configuration file (cline_mcp_settings.json).
To configure it manually, add the following entry to your Cline settings:
{
"mcpServers": {
"vantage-telemetry": {
"command": "python",
"args": [
"d:/root/projects/vantage-telemetry-mcp/server.py"
],
"env": {
"VANTAGE_WORKSPACE_DIR": "d:/root/projects/vantage-client"
},
"disabled": false
}
}
}
2. Cursor
- Go to Settings > Features > MCP.
- Click + Add New MCP Server.
- Configure the fields:
- Name:
vantage-telemetry - Type:
stdio - Command:
python d:/root/projects/vantage-telemetry-mcp/server.py
- Name:
- If you wish to set a specific workspace path, launch Cursor from the command line after setting the environment variable:
$env:VANTAGE_WORKSPACE_DIR="C:/path/to/your/project" cursor .
3. Claude Code (CLI)
Add the server definition to your ~/.claude.json configuration file:
{
"mcpServers": {
"vantage-telemetry": {
"command": "python",
"args": ["d:/root/projects/vantage-telemetry-mcp/server.py"],
"env": {
"VANTAGE_WORKSPACE_DIR": "d:/root/projects/vantage-client"
}
}
}
}
🛠️ Exposed MCP Tools
The telemetry server registers several tools that can be invoked by AI agents or developers to log events or request local metrics:
1. Logging Tools
log_usage_analytics(model, prompt_tokens, completion_tokens, duration_ms): Record custom LLM invocation usage.log_cost_analytics(estimated_cost_usd, actual_cost_usd, savings_usd, route, model): Log AI routing financial savings.log_productivity_metrics(task_id, status, lines_added, lines_deleted, details): Track progress of specific development task IDs.log_audit_log(action, target, status, details): Manually write to the developer activity trail.
2. Querying & Reporting Tools
get_telemetry_summary(): Returns a comprehensive markdown dashboard showing total logs, LLM token spending, local routing savings rates, coding metrics (lines written vs deleted), and recent activities.get_productivity_report(period): Get detailed coding speeds and list of touched files for'today','week', or'all'.get_cost_report(): Returns an overview of total LLM calls, local-handling ratio, estimated baseline cloud spend, actual spend, and net savings.get_audit_trail(limit): Displays a list of recent files modified, Git operations, and active sessions.
📁 File Locations
- Shared Config:
~/.vantage/config.json(defines harness URL, user ID, team ID, and optional API key). - Local Telemetry Log:
~/.vantage/telemetry.jsonl(contains the raw JSONL list of all tracked events). - Cursor watcher state:
~/.vantage/cursor_watcher_state.json(SQLite poll cursor + per-requestIddebounce timestamps).
Composer telemetry spam
Cursor multi-root workspaces start one MCP server per folder, which used to duplicate cursor_usage POSTs to the harness. The watcher now uses a process lock (~/.vantage/cursor_db_watcher.lock) so only one instance polls Cursor’s ai_code_hashes table, aggregates hashes by requestId, and debounces (default 60s, VANTAGE_CURSOR_USAGE_INTERVAL_SEC).
After upgrading this repo, run Developer: Reload Window in Cursor so the MCP process reloads. New events include hashCount and a details summary; bare fileName-only lines indicate a stale MCP process still running old code.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。