OctoCounts MCP Server
Count code, comment and blank lines in public GitHub repos and compare two repos or refs
- Pricing
- Open source
- Platforms
- CLI, Web
- Runs
- Locally
- Version
- 0.2.0
- Listing updated
- 1 day ago
About OctoCounts MCP Server
OctoCounts MCP Server is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.
The server calls the OctoCounts API, whose Rust backend downloads a compressed archive of a public repository rather than cloning it, skips folders such as node_modules, vendor and .git, and counts with tokei. Branches and tags are resolved to a pinned commit hash, so a count is reproducible for the same commit, engine version and counting rules, and results are cached by those same keys.
Two tools are exposed. One analyzes a repository for files, lines, code, comments, blanks and languages; the other compares two repositories or two refs of one. Both take an optional respect_gitattributes flag that excludes repository-declared generated and vendored files, and compare output states whether the two counting policies are compatible. Requests use bounded retries, long polling and a five-minute deadline, and errors keep job IDs and recovery URLs.
It runs over stdio through npx, needs no account, and is MIT licensed. The OctoCounts site also offers README badges, a CLI, a browser extension and a pull-request comment integration.
Install
Run in a terminal
claude mcp add octocounts-mcp -- npx -y octocounts-mcpAdd to claude_desktop_config.json
{
"mcpServers": {
"octocounts-mcp": {
"command": "npx",
"args": [
"-y",
"octocounts-mcp"
]
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"octocounts-mcp": {
"command": "npx",
"args": [
"-y",
"octocounts-mcp"
]
}
}
}Add to .vscode/mcp.json
{
"servers": {
"octocounts-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"octocounts-mcp"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"octocounts-mcp": {
"command": "npx",
"args": [
"-y",
"octocounts-mcp"
]
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"octocounts-mcp": {
"command": "npx",
"args": [
"-y",
"octocounts-mcp"
]
}
}
}Tools this server provides (2)
Taken from the project documentation; the running server may differ.
- analyze_repo
- Count files, lines, code, comments, blanks and languages for a public GitHub repo.
- compare_repos
- Compare two public GitHub repos or refs.
What it does
- Repo line counts
- Reports files, code, comments and blanks per language for a public GitHub repo.
- Repo and ref comparison
- Compares two repositories or two refs with deltas.
- Commit-pinned results
- Resolves branches and tags to a commit so counts are reproducible.
- Gitattributes option
- Can exclude generated and vendored files declared in the repository.
- No cloning
- Counts from a compressed archive, skipping dependency folders.
- Cancellable requests
- Supports cancellation and recovery of long-running analyses.
Good for
- Gauge the real size of a dependency before adopting it
- Estimate scope for a code review or audit
- See how far a fork has diverged from upstream
- Measure growth between two releases
Pricing
Open source
Free, no sign-up; MIT licensed
Prices change. Check octocounts.com before you buy.
OctoCounts MCP Server FAQ
Does it clone the repository?
No, it downloads a compressed archive and skips folders like node_modules and .git.
Does it work on private repositories?
The site describes it for public GitHub repositories.
Is it free?
The site calls it free with no sign-up, and the server is MIT licensed.
Why might a live count change?
A branch or tag can move to a new commit, which changes the report.
Is OctoCounts MCP Server free?
Yes. OctoCounts MCP Server is open source, so you can use and self-host it for free.
How do I add OctoCounts MCP Server to Claude Code?
Run this command in your terminal: claude mcp add octocounts-mcp -- npx -y octocounts-mcp
What are the best alternatives to OctoCounts MCP Server?
The closest alternatives to OctoCounts MCP Server are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.
Alternatives to OctoCounts MCP Server

REA
MCP serverCLI and MCP server that lets coding agents reverse engineer apps and binaries
Runs locally- Open source
- 464K GitHub stars
- Developer tools

Codebase Memory
MCP serverLocal MCP server that builds a code knowledge graph for AI coding agents
Runs locally- Open source
- 48.7K GitHub stars
- Knowledge and memory

GitHub
MCP serverOfficial MCP server connecting AI assistants to GitHub repos, issues and workflows
Not checked yet- Remote
- Open source
- 34.5K GitHub stars
- Developer tools

Serena MCP: the IDE for your agent
MCP serverMCP toolkit giving coding agents symbol-level code retrieval and editing
Runs locally- Open source
- 31.5K GitHub stars
- Developer tools

XERJ
MCP serverLocal search engine for AI agents with cited answers over your code and docs
Runs locally- Open source
- 19.2K GitHub stars
- Knowledge and memory

Agent-Native Analytics
MCP serverOpen-source analytics app where an AI agent builds charts and dashboards from your data
- Remote
- Open source
- 7.7K GitHub stars
- Analytics and data