原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。评价和账户功能将在后续阶段推出。
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

abcop

作者:adrianov版本 0.23.0i★ –i在你的电脑上运行
注册名称io.github.adrianov/abcop

安装

概览

作者提供的说明(英文原文)

ABC complexity gate for AI-written code with an MCP inspection tool.

PopNx MCP 的三大支柱

这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。

它能帮你做什么

我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。

  • 连接方式: 在你的电脑上运行
  • 传输方式: stdio
  • 分类: 其他

安装

选择你使用的 AI 应用,然后复制设置。

安装之前

  • 基础检查:1 项中通过 1 项
  • 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
  • 注册中心没有列出需要填写的密钥。

作者没有在注册中心列出安装信息。请查看下方作者的 README。

它能做什么

它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月6日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 adrianov 验证,该账户拥有此仓库

  • … 尚未检查

    仍在维护

    我们还没有从 GitHub 读取这个仓库

  • … 尚未检查

    有许可证

    我们还没有从 GitHub 读取这个仓库

  • – 不适用

    端点有响应

    它在你的电脑上运行,没有互联网端点

  • – 不适用

    使用 OAuth 登录

    在你的电脑上运行,改用本地设置

  • … 尚未检查

    工具描述中没有隐藏指令

    它在你的电脑上运行;我们只能读取互联网端点的工具列表

与“其他”中的其他服务器比较i

  • 星标数多于此分类中其他 32531 个服务器的 0%
  • 发布到注册中心的时间比此分类中其他 32531 个服务器的 72% 更新
  • 基础检查结果等于或优于此分类中其他 32531 个服务器的 100%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

abcop 安全吗?

它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。

它在我的电脑上运行还是在云端?

它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。

它还在维护吗?

GitHub 仓库最后更新于–,最新版本(0.23.0)于14天前进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Rust。

有什么可以替代它?

同一分类中有:Spec Driven Development, Remote Desktop Commander, Reelsaw

替代选择

同一分类中其他作者的服务器,按星标数排序。

如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

Spec Driven Development

作者:formulahendry

MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.

在你的电脑上运行★ 440MIT14个月前更新
安装

Remote Desktop Commander

作者:desktop-commander

Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.

在云端运行★ 211昨天更新
安装

Reelsaw

作者:osbytes

Drive a self-hosted Reelsaw: turn long videos into vertical clips, edit, re-render and export them.

在你的电脑上运行今天更新
安装

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

abcop

A must-have gate for AI-written code. Agents ship faster than humans can re-read; abcop keeps that code *understandable* by gating function and module ABC complexity so every unit fits a human head and an LLM context window. Diagnostics are also a hook for automated refactoring — extract a method, split a module — so CI rejects bad growth *and* points agents at concrete maintainability fixes.

One self-contained binary across Ruby, Rust, Python, Go, PHP, Java, C#, Dart, JavaScript, TypeScript, C, C++, Objective-C, Swift, Solidity, Zig and Haskell — no runtimes, no plugins, no per-language installs. Written in Rust for speed: one parse per file, one walk per metric, grammars compiled in; whole trees in milliseconds.

Install

brew install adrianov/abcop/abcop
cargo install abcop

macOS (.tar.gz from GitHub Releases; binary + man):

# Apple Silicon — use the *-x86_64-apple-darwin.tar.gz asset on Intel Macs

curl -LO https://github.com/adrianov/abcop/releases/download/v0.23.0/abcop-0.23.0-aarch64-apple-darwin.tar.gz tar -xzf abcop-0.23.0-aarch64-apple-darwin.tar.gz sudo cp abcop-0.23.0-aarch64-apple-darwin/abcop /usr/local/bin/ sudo mkdir -p /usr/local/share/man/man1 sudo cp abcop-0.23.0-aarch64-apple-darwin/abcop.1 /usr/local/share/man/man1/

Ubuntu / Debian (.deb from GitHub Releases; amd64, Ubuntu 22.04+ / Debian bookworm+):

# example for v0.23.0 — use the asset name from the release page

curl -LO https://github.com/adrianov/abcop/releases/download/v0.23.0/abcop_0.23.0-1_amd64.deb sudo dpkg -i abcop_0.23.0-1_amd64.deb man abcop

Example run

lib/sinatra/base.rb:1254:0: C: Metrics/AbcSize: Assignment Branch Condition size for `error_block!` is too high. [<7, 14, 9> 18.06/17]

src/main.rs: W: Metrics/ModuleAbcSize: Assignment Branch Condition size for module is too high. [<80, 200, 60> 228.04/120] -- extract a coherent subunit 132 files analysed in 0.09s, 7 abc offenses, 0 used-once offenses, 0 never-used warnings, 14 module-abc warnings

Why ABC, not line counts

Line counts lie. The ABC metric (Jerry Fitzpatrick, *C++ Report*, June 1997) counts what does work — assignments (A), branches (B), conditions (C) — as sqrt(A² + B² + C²). Fitzpatrick defined both method and module scope; abcop gates both:

RuleSeverityMeaning
Metrics/AbcSizeCfunction ABC above --max-abc (default 17). A normal scan reports a rise vs HEAD; --full and --everything report every function over the ceiling
Metrics/ModuleAbcSizeWmodule ABC above --max-module-abc (default 120). A normal scan reports a rise vs HEAD; --full and --everything report every production module over the ceiling
UsedOnceWlocal written once and read once, inside a function the edit changed. --full and --everything report every such local
NeverUsedWlocal written and never read, inside a function the edit changed. Same whole-tree switch as UsedOnce

A sparse wrapper and a dense god-object can share a line count; ABC separates them. Complexity is the gate — never a line budget. UsedOnce / NeverUsed are secondary.

Built for AI workflows

  • Understandable by construction. AbcSize 17 and ModuleAbcSize 120 keep every new unit inside a human head and an LLM context window. An existing unit may stay over that ceiling when the edit does not raise its score. Models edit small units reliably; when something breaks, the blast radius is tiny.
  • Refactoring hook. Exit code 1 plus stable JSON/JSONL diagnostics (rule, score, vector, message) feed agents and scripts: split oversized modules, extract hot methods. Each finding is an actionable maintainability step, not a style nit.
  • Fast enough for every push. Sub-second whole-tree scans — including code an agent will never re-read tomorrow.
  • Signal only. No formatting or style cops. Vendored, generated and test trees are skipped by default. Knobs: --max-abc and --max-module-abc. --full and --everything report every hit, not only the current edit.
  • Prefer MCP with LLMs. abcop --mcp is the best way to use abcop from an agent: the model gets offenses as soon as it writes, so it can fix complexity and dead locals in the same turn and ship effective code right away — not after a later CLI/CI pass. Official Rust rmcp SDK; tool abcop_inspection. Listed on the MCP Registry as io.github.adrianov/abcop (crates.io package + each GitHub v* tag).

Inspired by RuboCop (Ruby AbcSize parity and # rubocop:disable directives) and lizard (one tool, many languages). Ruby method counting matches RuboCop 1.89 byte-for-byte (scripts/compare_parity.py). A block outside a method (match do, before do, a class-level each) is its own unit; each / map / select still roll into the block that contains them.

Advantages

  • ~850k–940k LOC/s per core (Apple M1 Pro). RuboCop's lib tree (943 files, 110k LOC): 0.13 s — ~39× faster than rubocop --only Metrics/AbcSize (cache off), ~140× a full rubocop run.
  • One binary, zero deps — grammars and an embedded result cache (cache.redb) compiled in; works on clean CI images with no language toolchains.
  • Deterministic — same findings every run; text / JSON / JSONL stream as files finish; --sort-by-score buffers for worst-first emit.

Usage

abcop [OPTIONS] PATH...
OptionDefaultMeaning
[PATH]...autotargets; omitted → scope selection
--max-abc N17function ABC ceiling
--max-module-abc N120module ABC ceiling
`--only abc\used-once\never-used`allsingle check
--fulloffwhole production tree, and every function over the ceiling plus every local (default skips stay on)
--everythingoffno gitignore / hidden / vendored pruning (ignore in the user config still applies); same full report as --full
`--format text\json\jsonl`textCI-friendly output
--sort-by-scoreoffhighest ABC first
--mroffMR scope (uncommitted + branch vs base)
--uncommittedoffworking-tree + index + untracked vs HEAD only
--no-cacheoffskip on-disk cache
--mcpoffMCP server on stdio (for AI clients)
--dump-tree FILE—debug syntax tree

Exit codes: 0 clean, 1 findings, 2 usage error.

abcop app lib                          # two trees; rises and edited functions only

abcop --format jsonl lib > abcop.jsonl # streaming CI / agent input abcop --only used-once src # inline candidates in edited functions abcop --max-abc 12 --only abc lib # stricter function budget abcop --full lib # every function over the ceiling, every local abcop --everything lib # same report, with no default pruning abcop --max-module-abc 80 lib # stricter module budget abcop --sort-by-score --only abc lib # worst first abcop --uncommitted # pre-commit; rises and edited functions only abcop --mr --only abc # branch files; still only ABC rises vs HEAD abcop --mcp # MCP server on stdio (for AI clients)

JSON diagnostics include file, line, column, severity, rule, message, plus score / vector for ABC rules:

{"rule":"Metrics/AbcSize","score":10.0,"vector":"<6, 8, 0>"}

{"rule":"Metrics/ModuleAbcSize","score":120.5,"vector":"<40, 100, 40>"}

Scope selection

Named paths — those targets only. Findings still follow the edit filter below.

Omitted — narrowest useful scope, announced on stderr:

  1. uncommitted work vs HEAD if the tree is dirty
  2. else current MR (--mr forces this)
  3. else the tree (outside a repo)

Default walks prune test/fixture trees, vendored/build output (vendor/, node_modules/, target/, …), db/migrate/, route tables (config/routes.rb, config/routes/*.rb), and generated names (*.min.js, *_pb.go, …). Name a path explicitly to scan it anyway. Rails schema dumps (db/schema.rb, db/*_schema.rb, db/schema_*.rb) are never scanned, even when named. Third-party, route-table, and fixture paths are never scoped review surface — a diff through vendor/ or tests/fixtures/ does not make that material owned code.

On a dirty tree the bare default is uncommitted-only; --mr takes the full branch union. Commits straight to main use a 36-hour window when no branch base applies. --uncommitted fails outside a repository instead of silently widening.

What a normal scan reports

Every scan except --full and --everything compares the working tree to HEAD:

  • AbcSize reports a method over --max-abc only when its score is strictly higher than the same method in HEAD (same name, source order). A score that stayed the same or fell stays quiet, including a legacy method that was already over the ceiling. A method that exists only in the working tree counts as an increase. The message asks to return to the previous score when that score was already over the ceiling (rose from 20 to 21 -- back to 20 or below). When HEAD was under the ceiling, the target is the ceiling (rose from 16.28 to 21.28 -- back to 17 or below).
  • UsedOnce / NeverUsed report only inside a function whose text changed against HEAD. A local in a function the edit did not touch stays quiet. Locals outside any function still report.
  • ModuleAbcSize reports a module over --max-module-abc only when its whole-file score is strictly higher than that file in HEAD. A score that stayed the same or fell stays quiet, including a legacy module already over the ceiling. A file that does not exist in HEAD is held to the ceiling. The message asks to return to the previous score when that score was already over the ceiling (rose from 200 to 210 -- back to 200 or below). When HEAD was under the ceiling, the target is the ceiling.
  • No `HEAD` blob (not a git checkout, or an untracked file) reports every method over the ceiling, every local, and every module over the ceiling.

--uncommitted and --mr also drop function and local findings on lines the diff did not touch.

Whole-tree report

--full and --everything report every method over --max-abc, every local, and every production module over --max-module-abc. ModuleAbcSize still exempts test trees on those runs. --full keeps the default skips. --everything lifts gitignore, hidden directories, and vendored/generated/test pruning. ignore in the user config still applies to both.

User config

One file holds user options. It is $XDG_CONFIG_HOME/abcop when that variable is set, otherwise ~/.config/abcop. $ABCOP_CONFIG replaces the path. Nothing is written into the project.

ignore is a gitignore pattern, one option per line, applied in every project relative to that project's root. A directory pattern covers everything inside it. Naming the path, --full, and --everything do not bring a match back. An MCP inspection of a matched path is empty.

ignore = app/services/legacy/

ignore = lib/old.rb

Directives

Everywhere except Rust, RuboCop-style # / // suppressions work (trailing and block; bare Metrics allowed). rubocop:disable-next is ignored, matching rubocop.

def legacy_path # rubocop:disable Metrics/AbcSize

... end

MCP (Model Context Protocol)

Preferred for LLM / agent workflows. Wire abcop as an MCP server so the model can call abcop_inspection while it edits: feedback arrives in the

只显示了开头部分;其余内容请在仓库中阅读

问 PopNx