
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 分