scc-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@scc-mcp count lines of code in the current directory"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
scc-mcp
An MCP server that exposes
boyter/scc — a fast code-counting and
complexity tool — to LLM agents.
It wraps scc in a small set of read-only tools so an agent can count lines of
code, find the largest or most complex files, break stats down by language, and
estimate project cost without learning the scc CLI.
Requirements
sccinstalled and on yourPATH(it is an external binary, not a Python dependency, and is not installed for you). Verify withscc --version.
Related MCP server: Code Search MCP
Install
uv syncRun
The server speaks MCP over stdio:
uv run scc-mcpTools
All tools are read-only. They default to scanning the current working directory
and return human-readable markdown, or structured JSON when
response_format: "json" is passed. Most accept include/exclude extension and
directory filters.
Tool | Description |
| CLOC (code/comment/blank/lines) per language, plus totals. |
| Top N files sorted by a metric ( |
| CLOC broken down per language/extension. |
| Files ranked by cyclomatic complexity (refactor targets). |
| COCOMO cost / schedule / people estimate. |
| Detailed per-file metrics for a file or filtered subset. |
| Languages scc recognizes and their file extensions. |
Use with opencode
This repo registers the server as a local MCP in opencode.json:
{
"mcp": {
"scc": {
"type": "local",
"command": ["uv", "run", "scc-mcp"],
"enabled": true
}
}
}For other MCP clients, point them at the same uv run scc-mcp command (stdio
transport).
Development
uv run pytest # run the test suite
make build # build sdist + wheel into dist/Tests that shell out to scc are skipped automatically when it is not on
PATH. See AGENTS.md for module layout and conventions.
Available Tools
7 toolsscc_by_extensionCLOC by Language/ExtensionBRead-onlyIdempotent
Break down code counts per language/extension under a path.
Inputs: params (required). Returns: result
scc_complexity_hotspotsComplexity HotspotsARead-onlyIdempotent
Rank files by cyclomatic complexity to surface refactor targets.
Inputs: params (required). Returns: result
scc_cost_estimateCOCOMO Cost EstimateBRead-onlyIdempotent
Estimate development cost, schedule, and team size via COCOMO.
Inputs: params (required). Returns: result
scc_count_linesCount Lines of CodeBRead-onlyIdempotent
Count lines of code under a path, summarized per language plus totals.
Inputs: params (required). Returns: result
scc_file_metricsPer-File MetricsCRead-onlyIdempotent
Report detailed per-file metrics for a file or filtered subset.
Inputs: params (required). Returns: result
scc_list_languagesList Supported LanguagesARead-onlyIdempotent
List the languages scc recognizes and their file extensions.
Inputs: params (required). Returns: result
scc_top_filesTop N FilesARead-onlyIdempotent
List the top N files under a path, sorted by a chosen metric.
Inputs: params (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool targets a distinct aspect of code analysis (line counts, complexity, cost, file-level metrics, language list, top files), with no significant overlap. Even similar tools like scc_count_lines and scc_by_extension have clear differences: one gives summarized totals per language, the other breaks down per extension.
All tools follow a consistent 'scc_' prefix with descriptive verb_noun patterns (e.g., scc_count_lines, scc_complexity_hotspots), making them predictable and easy to understand.
With 7 tools, the server is well-scoped for a code analysis tool. Each tool has a clear purpose and contributes to a comprehensive but not overwhelming interface.
The tool set covers the primary outputs of scc: line counts (aggregate and per-extension), complexity hotspots, cost estimates, file-level metrics, language recognition, and top files ranking. This is a complete surface for typical code analysis needs.
Maintenance
Related MCP Connectors
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
AI-powered codebase analysis — call graphs, security, dead code, complexity. 150+ tools.
Related MCP Servers
- AlicenseBqualityDmaintenanceExposes the codetoprompt library to LLM agents for generating comprehensive prompts from directories and retrieving specific file contents. It enables codebase analysis through detailed statistics like token counts and file type breakdowns.31MIT
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to perform high-performance code search and analysis across multiple languages using symbol indexing, regex text search, and structural AST pattern matching. It also provides tools for technology stack detection and dependency analysis with persistent caching for optimized performance.12MIT
- AlicenseNot gradedqualityDmaintenanceProvides LLM-optimized tools for advanced code analysis, repository complexity evaluation, and call graph generation. It enables users to visualize directory structures, detect code patterns, and build semantic context with significant token savings.MIT
- AlicenseAqualityDmaintenanceEnables AI agents to explore, analyze, and search file systems, with tools for directory trees, file statistics, duplicate detection, code counting, and multi-criteria file search.545 npmMIT