npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cc-usage-mcp

v1.0.0

Published

Claude Code usage tracking MCP server - cross platform (Win/Mac/Linux)

Readme

cc-usage-mcp

Claude Code 用量追踪 MCP 服务器,支持 Windows / macOS / Linux。

解析本地 ~/.claude/projects/ 下的 JSONL 会话文件,统计 token 用量和费用。

功能

  • usage_summary - 按项目/模型/日期汇总用量和费用,支持时间范围筛选
  • usage_today - 查看今日用量
  • usage_session - 查看指定会话或最近会话的用量
  • usage_cost_estimate - 估算指定 token 数量的费用

安装

npm install
npm run build

配置

在 Claude Code 的 MCP 设置中添加:

方式一:项目级配置 (.claude/settings.json)

{
  "mcpServers": {
    "cc-usage": {
      "command": "node",
      "args": ["d:/temp/ikun-cc-usage-mcp/dist/index.js"]
    }
  }
}

方式二:全局配置 (~/.claude/settings.json)

{
  "mcpServers": {
    "cc-usage": {
      "command": "node",
      "args": ["/path/to/cc-usage-mcp/dist/index.js"]
    }
  }
}

路径根据你的系统调整:

  • Windows: "d:/temp/ikun-cc-usage-mcp/dist/index.js"
  • macOS/Linux: "/home/user/cc-usage-mcp/dist/index.js"

支持的模型计价

| 模型 | Input | Output | Cache Write | Cache Read | |------|-------|--------|-------------|------------| | claude-opus-4-6 | $15/M | $75/M | $18.75/M | $1.5/M | | claude-sonnet-4-6 | $3/M | $15/M | $3.75/M | $0.3/M | | claude-haiku-4-5 | $0.8/M | $4/M | $1/M | $0.08/M |