
OctoCounts MCP Server
io.github.huanglizhuoPublished by GitHub account huanglizhuov0.2.0Updated Oct 24, 2026
Analyze and compare public GitHub repo line counts (SLOC) via OctoCounts, from any MCP client.
Overview
Local MCP server that lets an assistant analyze and compare line counts (SLOC) of public GitHub repositories through OctoCounts.
- What you can do
- Analyze a public GitHub repo: count files, lines, code, comments, blanks and languages
- Compare two public GitHub repos or refs, with a note on whether counting policies match and that deltas are net size changes
- Optionally exclude repository-declared generated and vendored files via a respect_gitattributes flag
- Return report links pinned to saved IDs and commit SHAs, with job IDs and recovery URLs on errors
- When to use it
- Useful when you want an assistant to size up a public GitHub codebase or compare two repos or refs by lines of code, comments and languages without cloning them yourself.
- Requirements
- Runs locally over stdio, typically via npx with the octocounts-mcp package (Node.js required) or from a local checkout with node. Network access to the OctoCounts API; the optional OCTOCOUNTS_API_BASE variable defaults to the hosted API. No account or authentication is declared.
Installation
In SourceWeft
- Open OctoCounts MCP Server in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
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.
Source: mcp/README.md at commit 20168a8
Tools
0Version history
3- v0.2.0LatestOct 1, 2026
- v0.1.2Oct 1, 2026
- v0.1.1Sep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts