经 AI Skill Hub 精选评估,代码使用跟踪器 获评「推荐使用」。这款MCP工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 7.5 分,适合有一定技术背景的用户使用。
代码使用跟踪器 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
代码使用跟踪器 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/douglasmonsky/codex-usage-tracker
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"-------": {
"command": "npx",
"args": ["-y", "codex-usage-tracker"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 代码使用跟踪器 执行以下任务... Claude: [自动调用 代码使用跟踪器 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"_______": {
"command": "npx",
"args": ["-y", "codex-usage-tracker"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
python -m pip install --user pipx
python -m pipx ensurepath
pipx install codex-usage-tracking
codex-usage-tracker setup
codex-usage-tracker serve-dashboard --open
Use your normal Python launcher for your platform: python3 is common on macOS/Linux, and py may be preferable on Windows. On macOS with Homebrew, brew install pipx is also fine. If codex-usage-tracker is not found after installing with pipx, open a new terminal or add the binary directory printed by pipx ensurepath to your PATH.
serve-dashboard refreshes active-session usage before opening by default. Use --no-refresh only when you intentionally want to inspect the cached local index.
Package naming: the PyPI distribution is codex-usage-tracking; the installed command is codex-usage-tracker; the GitHub repository remains douglasmonsky/codex-usage-tracker. The codex-usage-tracker PyPI name is not this project, so avoid similarly named packages when following these docs.
Source install for development or branch testing:
pipx install "git+https://github.com/douglasmonsky/codex-usage-tracker.git"
setup installs or refreshes the local Codex plugin wrapper, initializes local config templates when needed, refreshes the aggregate index, runs codex-usage-tracker doctor, and tells you whether Codex needs a restart for plugin discovery.
Want Codex to do it for you? Paste: Install codex-usage-tracking with pipx, run codex-usage-tracker setup, and open the Codex Usage Tracker dashboard.
After plugin discovery, Codex can use the companion usage skill to refresh local aggregates, call the MCP tools, and explain usage patterns conversationally. Examples: MCP And Codex Skills.
<p align="center"> <a href="docs/assets/plugin-thread-leaderboard.png"><img src="docs/assets/plugin-thread-leaderboard.png?v=thread-leaderboard" alt="Synthetic Codex chat preview showing the companion skill ranking threads by token usage after refreshing the local aggregate index." width="86%"></a> </p>
If you only want plugin registration after installing the package:
codex-usage-tracker install-plugin
More install paths: Install Guide.
Open a Codex session on your machine and paste this:
Install and configure Codex Usage Tracker.
Install the PyPI distribution codex-usage-tracking with pipx. The installed command should be codex-usage-tracker. Use pipx install "git+https://github.com/douglasmonsky/codex-usage-tracker.git" only for branch testing or if PyPI is temporarily unavailable.
If pipx is missing, install it with the platform's Python launcher or use a local virtual environment.
After installation, run codex-usage-tracker setup and serve-dashboard --open.
Verify the dashboard opens locally and tell me the dashboard URL plus whether I need to restart Codex for plugin discovery.
This is optional. The normal shell install above is the fastest trusted path for most users.
<p align="center"> <a href="docs/assets/plugin-prompts.png"><img src="docs/assets/plugin-prompts.png?v=short-prompts" alt="Codex Usage Tracker companion prompts for opening the dashboard, finding the heaviest thread, and showing a thread leaderboard." width="49%"></a> <a href="docs/assets/dashboard-calls.png"><img src="docs/assets/dashboard-calls-preview.png?v=usage-dashboard" alt="Codex Usage Tracker dashboard showing filters, usage totals, call rows, and call details." width="49%"></a> </p>
Local-first dashboard, Codex plugin, and companion skill for understanding where your Codex tokens and usage credits are going.
Unofficial project: Codex Usage Tracker is an independent open-source project. It is not made by, affiliated with, endorsed by, sponsored by, or supported by OpenAI. OpenAI and Codex are trademarks of OpenAI; this project only reads local log files from your machine.
Codex Usage Tracker reads the JSONL logs already written by Codex, indexes aggregate usage counters into SQLite, and gives you a dashboard, CLI, and MCP tools for investigating real usage patterns. It keeps prompts, assistant messages, tool output, pasted secrets, and raw transcript content out of SQLite, CSV exports, and generated dashboard HTML.
Built for developers using Codex locally who want to know which threads, models, subagents, and long chats are driving usage without uploading logs anywhere. The public PyPI package is codex-usage-tracking, and it installs the codex-usage-tracker command.
After install, you get a localhost dashboard, a local SQLite aggregate index, CLI reports, MCP tools, and a companion Codex skill for asking questions like "what drove my usage this week?"
codex-usage-tracker update-pricing
codex-usage-tracker update-rate-card
codex-usage-tracker setup
codex-usage-tracker serve-dashboard --open
Then:
Live enabled while working, or click Refresh after a Codex run finishes.Insights and scan the Needs Attention cards.Time presets or calendar fields to focus on today, this week, the last 7 days, this month, or a custom range.Threads to see how a conversation grew and whether subagent or auto-review work attached to it.Call Details.Load context only when aggregate fields are not enough; context is fetched on demand from the local source JSONL and is not saved into SQLite or the dashboard.Optional allowance context:
codex-usage-tracker parse-allowance "5h 79% 6:50 PM Weekly 33% Jun 7"
The tracker cannot read your logged-in ChatGPT plan or live remaining usage automatically. Allowance values are only as accurate as the values you manually copy from Codex Settings, /status, or another trusted usage display. Details: Pricing, Credits, And Allowance.
有用的开源工具,易于使用
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
AI Skill Hub 点评:代码使用跟踪器 的核心功能完整,质量良好。对于Claude Desktop / Claude Code 用户来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | codex-usage-tracker |
| 原始描述 | 开源MCP工具:Local-first dashboard for understanding where your Codex tokens and usage credit。⭐10 · Python |
| Topics | codexchatgptpython |
| GitHub | https://github.com/douglasmonsky/codex-usage-tracker |
| License | MIT |
| 语言 | Python |
收录时间:2026-06-09 · 更新时间:2026-06-09 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端