Listed from the MCP registry; nobody on Odel publishes it.
Analyze and compare public GitHub repo line counts (SLOC) via OctoCounts, from any MCP client.
Runs on your machine from its package; the steps are below.

At most: only reads or looks up information.
Odel charges nothing per call. The publisher may charge for its own service.
Runs locally over stdio
This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).
Run
npx -y octocounts-mcp
MCP client config
{
"mcpServers": {
"octocounts-mcp-server": {
"command": "npx",
"args": [
"-y",
"octocounts-mcp"
]
}
}
}
GitHub shows language bars. OctoCounts shows the actual line counts.
GitHub's sidebar shows language percentages, but misses actual file and line counts. OctoCounts adds this missing SLOC (Source Lines of Code) view to public repos without cloning.
Install the extension for stats directly on GitHub, or use the web app for public GitHub repositories. It downloads the repo archive, runs tokei, and caches the results without downloading Git history.
| Surface | Use it for |
|---|---|
| Web app | Analyze public GitHub repositories and share a live report or a fixed saved result. |
| Browser extension | Show SLOC directly inside GitHub's repository sidebar in Chrome, Edge, or Firefox. |
| Public stats | See aggregate report totals, largest repos, language coverage, and source breakdown. |
| GitHub Action | Comment SLOC changes on pull requests. |
| CLI | Run npx octocounts https://github.com/owner/repo --json. |
| MCP server | Give agents and developer assistants access to SLOC reports. |
| README badges | Add a live SLOC badge that links to the repository report page. |
| Research | Original research: a 10-repository study of how test/doc/generated-file filtering affects SLOC counts. |
Sometimes you just want to know whether a repo is 2k lines, 200k lines, or a weekend-devouring monolith. GitHub already has the repo, the language stats, and the sidebar. OctoCounts fills in the missing numbers.
Live repository links follow the latest cached public report. Fixed result links bind a saved report and commit, but saved records are subject to cache retention and may expire or be replaced; export JSON or text for long-term archival.
Every OctoCounts surface — the web app, badges, the browser extension, the CLI, the MCP server, and the indexed public report pages — counts under one default scope: documentation, test, and generated files are excluded from the code count.
The exclusion is directory-based. Alongside the always-ignored build/VCS directories (node_modules, target, dist, build, vendor, …), the default scope drops these directories wherever they appear in the tree:
| Excluded | Directories |
|---|---|
| Docs | doc, docs, documentation |
| Tests | test, tests, __tests__, fixtures |
| Generated | gen, generated, .generated |
Know the boundaries of the rule:
README.md, JSON lockfiles, and Rust #[cfg(test)] modules inline in source files are all included.includeDocs / includeTests / includeGenerated toggles) count the whole repository when enabled; such runs produce a different measurement of the same repo and are pinned as their own saved results.A 10-repository study of how this filtering moves SLOC counts is on the research page.
| Layer | Tech |
|---|---|
| Backend | Rust · Axum · Tokio · SQLx · Postgres · tokei |
| Frontend | React · TypeScript · Vite · TanStack Query |
| Infra | Cloudflare Pages (Pages Functions SSR) · GHCR image + sloc-infra dual VPS (VPS-A/VPS-B) + Cloudflare Tunnel · Postgres on VPS-B (nightly backups to VPS-A) · Docker Compose (local dev only) |
Drop a live SLOC badge into any README:
<!-- Default branch — full SLOC summary -->
[](https://octocounts.com/github/:owner/:repo)
<!-- Specific branch -->
[](https://octocounts.com/github/:owner/:repo/tree/:branch)
<!-- Specific tag (pinned to that tag) -->
[](https://octocounts.com/github/:owner/:repo/tree/:tag)
<!-- Specific commit SHA (pinned to that commit) -->
[](https://octocounts.com/github/:owner/:repo/commit/:sha)
Add ?lang=<language> to any of the above to get a per-language badge instead:
<!-- Lines of code for a single language -->
[](https://octocounts.com/github/:owner/:repo)
[](https://octocounts.com/github/:owner/:repo/tree/:branch)
Language names are case-insensitive (rust, Rust, and RUST all work). If a language is not found in the report the badge shows —. While a fresh analysis is running the badge shows ··· — most badge CDNs will retry automatically.
| Cache behaviour | Header |
|---|---|
| Default branch / branch | max-age=300, s-maxage=86400, stale-while-revalidate=3600 |
| Tag / commit | max-age=300, s-maxage=604800 |
POST /api/analyze { "repoUrl": "...", "refName": "main" }
GET /api/jobs/:id
GET /api/reports/:id
GET /api/stats
GET /badge/:owner/:repo
GET /badge/:owner/:repo/branch/:branch
GET /badge/:owner/:repo/tag/:tag
GET /badge/:owner/:repo/commit/:sha
All badge routes accept an optional ?lang=<language> query parameter that switches the response from the full SLOC summary badge to a per-language shields.io-style badge.
See how-to-run-and-deploy.md for local development setup, host-native instructions, GitHub token configuration, and production deployment.
Popular public repositories are listed in data/popular-repos.txt. The scheduled workflow seed-popular-repos.yml refreshes that curated inventory weekly.
refresh-github-trending.yml discovers GitHub's daily Trending repositories, validates and publishes the current snapshot to /trending, and pre-generates their stable /github/:owner/:repo SLOC reports. Trending provenance stays separate from real /popular access counts; no date-stamped archive pages are generated.