
swarm-mcp
io.github.swarm-routing/swarm-mcp
Read-only MCP server over the swarm-routing org's scripts: fidelity, invariants, releases, locks
Documentation
swarm-mcp
| Group | Badges |
|---|---|
| Build | |
| Release | |
| Trust | |
| Indexes | |
| Stack | |
| Community & docs |
swarm-mcp, the swarm-routing org's MCP server: a local, read-only
Model Context Protocol server (stdio,
Python stdlib) whose tools each run one read-only command of a
swarm-routing/.github script (a fidelity sheet's checks, the golden-rule
checks on a diff, a release's readiness and aftercare, a release lock) and
return the script's own summary, capped. The Claude Code plugin
swarm-routing from swarm-routing/skills
starts it at the commit it pins; any other MCP client runs it the same way.
Skills hold the procedures, this repository the server, each versioned and
released on its own.
Tools
| Tool | Runs (a swarm-routing/.github script) |
|---|---|
fidelity_check | fidelity.py check FILE |
fidelity_row | fidelity.py row FILE [--protocol NAME] |
fidelity_verify | fidelity.py verify FILE --text KEY=PATH ... |
protocol_review | check_invariants.py [REPO] --base REF [--pr-body FILE] |
release_ready | release_check.py ready REPO_DIR [--repo O/N] [--version X.Y.Z] |
release_after | release_check.py after O/N --tag vX.Y.Z [--repos A,B] |
lock_verify | release_lock.py verify LOCK |
Every tool is read-only and returns the script's summary, capped; exit 1 means findings. The design, its rules and what is out of scope: ADR-0002.
Use
In Claude Code, enable the swarm-routing plugin
(swarm-routing/skills): it starts
this server at the commit its swarm-mcp.lock pins. In any other MCP
client, register the command
python3 -I /path/to/swarm-mcp/tools/swarm-mcp/swarm_mcp.py
as a stdio server, with ORG_TOOLS_DIR set to a checkout of
swarm-routing/.github if you have one (otherwise the server fetches a
snapshot of the commit this repository's .github/org-sync.lock pins).
server.json describes the server for the official
MCP Registry (#51); Commitizen
keeps its version in step with each release, and
.github/workflows/mcp-registry.yml publishes it there on each release, by
GitHub OIDC (no stored token).
Security model
swarm-mcp serves stdio only. The MCP client starts it as a child process for one user, and it runs with that user's permissions. Nothing listens on a network, so there is no caller to authenticate and no traffic to rate-limit. Whoever can start the server can already run the scripts it wraps. The limits that do apply (ADR-0002):
- Read-only tools. Each tool maps to one read-only command of a
swarm-routing/.githubscript, from a fixed table. None writes, dispatches, comments or bumps a lock. - Arguments are data. Every tool's schema is closed: an unknown argument
is refused. Every value must be a non-empty string with no NUL byte and no
leading
-, so no option reaches a script through an argument. The patterned values (a version, a tag, a repository, a ref, aKEY=PATH) must match their pattern. - No shell. The command is an argv list, run in its own process group with stdin closed.
- One call at a time. Messages are served in order, one at a time.
- Bounded time. A call is killed (its whole process group) after
SWARM_MCP_TIMEOUTseconds, 300 by default, and returned as a tool error. Anotifications/cancelledfor the running call kills it at once and drops its response (#16). - Bounded output. A result is the script's summary trimmed to
SWARM_MCP_MAX_CHARScharacters, 6000 by default, with a quarter of that for stderr. Exit 1 means findings; any other failure is a tool error. - Pinned scripts. The scripts run at the commit this repository's
.github/org-sync.lockpins, never.githubmain(#39). A lock with no commit is a tool error.
The server collects and sends nothing: PRIVACY.md. Reporting a vulnerability: SECURITY.md.
Develop
New here? docs/development.md is the developer guide: the tools to install, how to get the code and its dependencies, how to build, test, run and lint it, the Docker images, what CI checks and how to read a red run. How changes are proposed, reviewed and released is the org's CONTRIBUTING.md. Whether a regression here gets an RCAPA (root cause analysis with corrective and preventive actions), and how: docs/rcapa/README.md.
Releases & citing
Versions follow SemVer (CHANGELOG.md). Each release is listed under Releases, built by the org's release workflow.
To cite this repository, use the “Cite this repository” button (from CITATION.cff). Its releases are not archived on Zenodo, so it has no DOI: name the release you used by its tag.
Using it in your work? Contributions are welcome, and citing it helps just as much.
Contributing
Contributions from forks are welcome: see
Outside contributions
(sign off every commit with git commit -s).
Epics
What is planned and in progress here: the issues labelled epic. An epic's open sub-issues carry a priority:* and a model:* label, so a contributor or an AI agent can pick one up (how issues work). The whole org's plan: the roadmap.
No open epic: the work here is tracked as single issues.
Licence
See LICENSING.md.
No installation packages available.