
OctoCounts MCP Server
io.github.huanglizhuo由 GitHub 账号 huanglizhuo 发布v0.2.0更新于 Oct 24, 2026
Analyze and compare public GitHub repo line counts (SLOC) via OctoCounts, from any MCP client.
概览
本地 MCP 服务器,让助手通过 OctoCounts 分析并比较公开 GitHub 仓库的代码行数(SLOC)。
- 可以做什么
- 分析公开 GitHub 仓库:统计文件数、总行数、代码、注释、空行与语言
- 比较两个公开 GitHub 仓库或 ref,并说明计数策略是否一致、差值为净体积变化
- 可选通过 respect_gitattributes 参数排除仓库声明的生成文件与第三方依赖文件
- 返回绑定已保存 ID 与提交 SHA 的报告链接,出错时保留任务 ID 与恢复链接
- 适用场景
- 适合需要让助手在不自行克隆仓库的情况下,按代码行、注释和语言评估某个公开 GitHub 代码库规模,或对比两个仓库或 ref 的场景。
- 运行要求
- 以 stdio 在本地运行,通常通过 npx 启动 octocounts-mcp 包(需要 Node.js),也可用 node 从本地代码检出运行。需要访问 OctoCounts API 的网络;可选环境变量 OCTOCOUNTS_API_BASE 默认指向托管 API。未声明需要账号或身份验证。
安装
在 SourceWeft 中
- 打开 控制台中的 OctoCounts MCP Server,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
OctoCounts MCP Server
Expose OctoCounts SLOC reports to AI coding tools (Claude, Cursor, and any MCP client).
Tools:
analyze_repo: count files, lines, code, comments, blanks, and languages for a public GitHub repo.compare_repos: compare two public GitHub repos or refs.
Usage
Run via npx (no install needed):
Or from a local checkout:
OCTOCOUNTS_API_BASE defaults to https://api.octocounts.com.
Local protocol smoke test:
The server speaks MCP over stdio with newline-delimited JSON-RPC messages (one JSON object per line).
License
MIT
Reliable analyses and repository declarations
Both tools accept optional boolean respect_gitattributes (default false). Enabling it excludes repository-declared generated and vendored files under the canonical profile. Compare output includes counting_policy_compatibility: same, different or unknown, and explains that deltas are net size changes. Report links pin saved IDs and commit SHAs.
Analysis requests use bounded safe retries, long-polling and a five-minute total deadline. Errors retain job IDs and recovery URLs. Stdio clients may send notifications/cancelled with the original requestId; HTTP requests cancel their waits when disconnected. Cancellation stops client waiting; accepted backend jobs can still finish and be recovered. Saved records can expire from the cache.
来源:mcp/README.md,提交 20168a8
工具
0版本历史
3- v0.2.0最新Oct 1, 2026
- v0.1.2Oct 1, 2026
- v0.1.1Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分