Glitch Toolkit

io.github.AbstractGlitch由 GitHub 账号 AbstractGlitch 发布v0.1.4更新于 Oct 24, 2026

Read-only checks that fail a guardrail which is present but has stopped refusing anything

已验证STDIO仅桌面开发者工具安全与监控

概览

AI 生成的概览

只读的 MCP 服务器,用于报告仓库护栏检查结果,并把每次问答追加记录到账本中。

可以做什么
提供三个只读工具:glitch_status、glitch_check 和 glitch_ledger_tail,用于报告仓库中安装了哪些护栏产物,以及每个护栏是否仍会拒绝故意构造的损坏用例。它会把每次问答追加写入 .claude/toolkit/ledger/ledger.jsonl 的 JSONL 账本。它无法暂停、阻止、拒绝或拦截任何操作,也不进行网络调用。
适用场景
当你希望助手检查仓库护栏是否仍在正常发挥作用,或回读检查记录时使用。它是在考虑任何真正能阻止智能体操作的能力之前,先做的只读一步。
运行要求
本地进程,通过 uvx 从带 mcp 附加项的 glitch-toolkit 包启动,或在已安装该附加项的虚拟环境中运行。需要用 --repo 传入仓库路径。未声明任何账户、API 密钥、请求头或环境变量。mcp 附加项会引入大量依赖,应安装在隔离环境中,而不是系统 Python 中。
安装前请注意
该服务器会向仓库中的账本文件追加内容,可用 --no-ledger 关闭。除此之外它不写入任何内容,也不做任何拦截,因此无法阻止智能体行动。把 mcp 附加项安装到全局解释器可能升级现有包并破坏无关应用。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Glitch Toolkit,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

glitch

A check that has stopped refusing things still passes. That is the failure this looks for.

On 8 September 2026, in the repository this package was extracted from, a test guarded the one chapter of a paid book that is given away free — asserting the sample stops at its cut and does not leak the rest. It was green. It was searching a page that had no book on it, for passages it therefore could never find, and passing. Nothing was broken; the redaction worked fine. The alarm had been disconnected and was still showing a green light.

Every guardrail decays that way eventually, and the decay is silent, because a guardrail that has stopped refusing looks exactly like one with nothing to refuse.

glitch installs six guardrails into your repository and then, whenever you ask, runs each one against a case it is supposed to refuse. One that no longer refuses anything fails here, loudly, instead of passing quietly.

bash
pip install glitch-toolkit
glitch install     # put the artifacts in this repositoryglitch status      # what is installed, what is notglitch check --all # verify every step

No dependencies, no network calls, no telemetry. It writes nothing outside the directory you point it at.

What it actually checks

A step is not complete because a file is present. Every check does three things and reports which of them failed:

  1. finds the artifact
  2. runs it, and expects it to work
  3. runs it against a deliberately broken case, and expects it to refuse

Without the third, a check passes the moment you copy a file in, whether or not that file has any teeth left, and it would be green for every reader forever. tests/test_cli.py exists to prove the checker fails that case; its SABOTAGE test installs artifacts that run, exit 0 and refuse nothing.

What install will not do

It will not write your CLAUDE.md, FLEET.md, FLOOR.md or PLAN.md. Four of the six steps are checked against your own file, because for those four the file is the work: a rules file that holds, a desk table with one committer, a floor measured twice, a plan someone else approved. A command that wrote them would turn the path into "you ran an installer". The FLOOR.md and PLAN.md templates ship deliberately unpassable for the same reason.

It will not overwrite. An artifact already in your repo is left alone and reported as kept; --force is how you say otherwise.

It writes nothing outside the directory you point it at, makes no network calls, and has no dependencies outside the standard library.

Running it without installing it

cli.py is one file and stays one file. Copy it into a repository and status and check work with nothing on the path and no install step — that property is deliberate and there is a test for the search paths it uses. Only install needs the rest of the package, and it says so plainly rather than failing oddly.

The MCP server (read-only)

bash
uvx --from 'glitch-toolkit[mcp]' glitch-mcp --repo .

Install the extra in an isolated environment, not a system Python. The checker has no dependencies and that is a promise. The [mcp] extra is the opposite: mcp>=2.0 pulls pydantic, starlette, cryptography, opentelemetry and a dozen more, and pip will happily UPGRADE what is already there to satisfy them. Done against a global interpreter on 8 September 2026 it replaced pydantic 1.10 with 2.13 and starlette 0.46 with 1.6, breaking an unrelated FastAPI application on the same machine. uvx builds a throwaway environment and touches nothing else, which is why the registry entry launches it that way.

A virtualenv is equally fine:

bash
python -m venv .venv && .venv/bin/pip install 'glitch-toolkit[mcp]'

It offers the checks to an agent as three tools — glitch_status, glitch_check, glitch_ledger_tail — and appends every question and answer to .claude/toolkit/ledger/ledger.jsonl.

It gates nothing. It cannot pause, block, refuse or intercept any action. It has no database connection, no credential and no network call. That is the whole first version, on purpose: a server that stands between an agent and a production database is serious software, and the honest order is to run read-only first, read the ledger, and find out what it would have refused before giving it the power to refuse. A gate built before that record exists is a guess with permissions.

The checks write nothing into your repository. The server breaks that in exactly one place — it appends to the ledger — and --no-ledger turns off even that, at the cost of the only thing worth keeping.

In Claude Code, .mcp.json:

json
{  "mcpServers": {    "glitch": { "command": "glitch-mcp", "args": ["--repo", "."] }  }}

The ledger

Append-only JSONL. Nothing rewrites a line it did not just write; a record that is overtaken is superseded by a new one and both stay; a field nobody measured is null rather than 0; a half-written last line is skipped and counted, never repaired, because repairing it means rewriting the file.

Tests

bash
python tests/run_all.py      # all three suites, 40 tests

The server suite skips cleanly without the [mcp] extra and the runner reports that as SKIPPED rather than passing, because a green line meaning "we did not look" is the exact failure the gate-check practice exists to catch.

Where the checks come from

Every check here exists because something went wrong, and CORPUS.md is the list — what happened, what it cost, and which check catches it now.

It also names the ones nothing here catches yet, including the two that cost this package a version number each. A corpus that recorded only its solved failures would be doing the thing this package is about.

Licence

Apache License 2.0 — see LICENSE and NOTICE. Chosen over MIT for the patent grant.

Everything in this repository is under it. Use it commercially, change it, redistribute it.

The links above are absolute on purpose: this README is also the package's description on PyPI, where a relative link resolves against pypi.org and returns a 404.

Where this comes from

This repository is a published mirror. The package is developed inside a private monorepo alongside the book Building Your Store Or Your SaaS With Claude, whose practices it installs and checks, and it is pushed here as a subtree. The book, the shop that sells it and the rest of that repository are not open source and are not here. Nothing is being withheld from this repository that belongs to the package.

Issues and pull requests belong here rather than there, because here is the part anyone can read.

Status

Version 0.1.1. It installs, and the practices it checks are the six the book argues for. 0.1.0 was the first release; 0.1.1 changes this description and adds continuous integration, and nothing about what the code does.

What it is not yet: it gates nothing. glitch-mcp reports and records and cannot block an agent from doing anything. That is deliberate and the reasoning is in mcp_server.py — a server that stands between an agent and a production database should earn its evidence before it earns the power to refuse.

来源:README.md,提交 f21dba6

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.4最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分