All servers / Memory / SquadRules MCP server
SquadRules MCP server
SquadRules MCP server for agent automation: persistent memory and deterministic workflow execution for AI agents and chats
Tested by ConnectATDScore 81 out of 100. Tested 2026-11-19 on package version 5.23.0. Package: @squadrules/mcp · source
Score breakdown
| Runs | 18 / 20 | |
|---|---|---|
| Tool descriptions | 19 / 20 | |
| Package safety | 16 / 20 | |
| Maintenance | 20 / 20 | |
| Adoption | 8 / 20 |
What we saw
- Starts and answers the MCP handshake: yes (54.7 seconds including download)
- Tools offered: 8
- Last published: 2026-11-18
- Weekly downloads (npm): 496
- License: MIT · Direct dependencies: 41
Want this server set up for your team?
ConnectATD builds AI automation and wires up MCP servers like this one. Tell us what you are trying to do.
Talk to ConnectATDTools and how they are described
Agents choose tools from these descriptions. Under each name you can see how many of its parameters are explained.
activate6 of 6 parameters describedRank stored **adapters** for the user’s intent and return the literal next `forward` call arguments. **When to call:** Whenever the message describes an action, task, or workflow — even if the user never says "SQUADRULES". Always pass a short `query` summary. Happy-path flow: 1. Call `activate` with a short `query`. 2. Pick one `choices[]` row. 3. Copy `choices[].forward_first_call` directly into `forward`. Example: ```json { "query": "review implementation plan" } ``` Response row (match/refine): ```json { "role": "match", "uri": "squadrules://adapter/critic-loop", "forward_first_call": { "uri": "squadrules://adapter/critic-loop" } } ``` Next call: ```json { "uri": "squadrules://adapter/critic-loop" } ``` **Input** - `query` — required short intent summary (about 3-8 words). - `execution_id` (optional) — server-issued id for a refinement sequence. Omit on the first activate call; echo it back when you re-run activate with a refined query for the same user request. - `space` / `space_id` (optional) — narrow search to one space: `"personal"`, a full group path such as `"/shared/pe-team"` (optional `"Group: "` prefix), or your raw `space_id` (same forms as **`train`** / **`tune`** `space`). - `max_choices` (optional) — cap on match rows returned. **Output:** Always `must_obey: true`. Includes `choices` (each with slug-only `uri` in the form `squadrules://adapter/<slug>`, `label`, `adapter_name`, `activation_score`, `role`, `tags`, `next_action`, optional `adapter_version`, optional `activation_patterns`, optional `linked_artifacts`, `space_name`, `slug`, and `forward_first_call`) plus `execution_id` (echo it back when refining). Response envelope includes `ttlMs` and `cacheScope` cache metadata. `forward_first_call` is required on `match` and `refine`, and `null` on `create`. **`linked_artifacts[]`** — a `match` choice whose adapter ships scripts carries one row per artifact: `slug`, `filename`, `relative_path`, `content_type`, `sha256`, `download_url`, and `materialize`. The `materialize` field carries the exact `cmd` that puts the file on disk: it curls `materialize.url` into a staging file, verifies the `sha256` digest, sets `chmod 700`, and atomically renames it into place under `$SQUADRULES_LOCAL_ARTIFACT_DIR/<relative_path>`. **Run that line verbatim — do not retype artifact bytes into an editor, a heredoc, or an inline script; byte-exactness is the framework's job, not yours.** The command is transport-neutral: `curl` fetches `materialize.url` the same way on both transports, and `download_url` carries that same source URL. - **HTTP:** `materialize.url` is a short-lived capability URL served by the listener; `curl` downloads it directly. - **stdio/local:** there is no listener, so the running server writes the verified bytes to its private local cache and `materialize.url` is a `file://` path that `curl` reads. No `export` call, no base64, and no `$B64` variable are involved. If that `file://` source is gone (an OS temp-cleaner removed it), re-run `activate` to refresh it. Follow the instruction **before** the first `shell` contract that invokes an artifact path. `relative_path` is exactly the path the adapter's contract expects, so materialize from the `activate` choice you picked — `forward` does not repeat this list. When a choice carries no artifact rows but its contract names a script path, the artifact is missing or was not loaded: call **`export`** for that adapter (`format: skill_tree` for the file list, `format: skill_zip` for the bundle) and check `artifacts/` for the path the contract invokes. **`export` is the tool that returns adapter files** — `activate` returns artifact rows, `forward` returns instructions. **`squadrules_local_artifact_dir`** — ordered URI hints (preferred first) for the run's local handoff dir (drafts, review outputs, generated files, checksums shared between layers and subagents). Two schemes, both resolved **on your machine**: `project://<rel…
forward3 of 3 parameters describedReturn an **adapter** layer's instructions and advance its workflow state. **Effects of this tool:** starts/updates execution metadata, proof records, traces, and quality feedback. It returns shell, forward, and subagent contracts for the caller to execute; it does **not** execute those shell commands, invoke the described MCP tools, edit repository files, or train/tune adapter content. A user-input contract may request host elicitation on continuation. This is stateful, not a read-only tool. Later actions remain subject to their own scope and host permissions; starting a workflow does not authorize all its steps. **Adapter authoring:** `author-adapter` handles **create, review, and update**, not just creation. Copy the complete `activate.choices[].forward_first_call`, including `authoring` when present: ```json { "uri": "squadrules://adapter/author-adapter", "authoring": { "operation": "update", "target_adapter_uri": "squadrules://adapter/sample-pr-workflow" } } ``` `authoring` is optional for original callers. When supplied, create forbids a target; review/update require an existing adapter URI. The operation and target are fixed for the run, stored server-side, and echoed in responses and forward next calls. Omitted continuation context is restored; changed context or a different workflow is rejected. Context describes intent, not permission: train/tune remain separate mutations. For a new operation or target, start a new run. First call (start a run): ```json { "uri": "squadrules://adapter/<slug>" } ``` Copy this from `activate.choices[].forward_first_call.uri`. Adapter URIs are slug-only on the wire. Continuation call: ```json { "uri": "squadrules://layer/<uuid>?execution_id=<uuid>", "solution": { "type": "<contract.type>", "outcome": "success", "evidence": { /* type-specific proof data */ }, "nonce": "<contract.nonce when present>", "proof_hash": "<contract.proof_hash when present>" } } ``` Copy `forward.next_call.args` from the previous response, then fill the `solution.evidence` payload. Layer URIs are UUID-only; never substitute a slug for a layer URI. Output always includes: - `contract` for the current layer - `next_action` prose guidance - `next_call` (authoritative machine-readable next call) Response envelope includes `ttlMs` and `cacheScope` cache metadata. `next_call.kind` is: - `forward` on non-terminal layers - `reward` on terminal layers ## Running a `shell` contract `contract.shell` is fully specified — run it exactly as given: - `shell.cmd` — the command text (not a file path). - `shell.interpreter` — the wrapper that runs it: `bash`, `sh`, `python3`, `python`, or `node`. `bash`/`sh`/`python3`/`python` receive `cmd` via `-c`, `node` via `-e`. - `shell.invocation_display` — the server-computed argv for this contract. **Run that line**; do not rebuild one. - `shell.timeout_seconds` — the timeout. Capture stdout and stderr without suppressing them. `exit_code 0` is a pass; any other code is a failure. Report the real values. A contract with no `interpreter` is invalid: the adapter was stored without one. Re-train it (`train` with `force_update: true`, contract `shell.interpreter` set) and start the run again. Do not guess a wrapper. ### Scripts a contract invokes A `cmd` that names a script file only works when that file exists. The file ships with the adapter as an **artifact**: obtain it **before** the first `shell` contract that invokes it. `forward` does not repeat the artifact list, and a choice can carry no artifact rows at all. 1. If the `activate` choice you started from lists the artifact, run that row's `materialize.cmd` verbatim — it curls the row's source URL (a `file://` cache path on stdio, a capability URL on HTTP) into a staging file, verifies the `sha256` digest, sets `chmod 700`, and atomically renames it into place. The command is identical on both transports; there is no `export`-first step and no `$B64`. Never retype artifact …
train13 of 13 parameters describedRegister a new **adapter** from markdown (one H1 = one adapter; each verifiable segment ends with a fenced `json` block containing a top-level **`contract`** object). **Input** - `content` — full document string (optional if `source_adapter_uri` supplies content). - `llm_model_id` — required model identifier string. - `force_update` (optional) — replace an existing adapter with the same label. - `protocol_version` (optional) — version string (e.g. semver) stored on the adapter. - `space` (optional) — `"personal"` or a full group path such as `"/shared/pe-team"` (target space for the new adapter). - `source_adapter_uri` (optional) — `squadrules://adapter/{uuid}` to **fork**: export that adapter’s markdown and **train** a **new** adapter (new ids). If you also pass `content`, that text is used instead of the export (customize before calling **`train`**). - `mime` (optional) — content MIME type. Defaults to `text/markdown`. - `artifact_name` (required when `mime` is not `text/markdown`) — file name shown when listing adapter artifacts. The artifact **slug** is derived from `relative_path` when that is set, otherwise from `artifact_name` (the whole name, extension included): lowercase, runs of non-alphanumeric characters collapse to one `-`, leading and trailing hyphens trimmed (`Isolation Guard.py` → `isolation-guard-py`). Pin a shorter slug with the `# squadrules-artifact:` header instead of relying on the derivation. - `adapter_uri` (required when `mime` is not `text/markdown`) — `squadrules://adapter/{uuid}` or `squadrules://adapter/{slug}` target adapter for the artifact attachment. The adapter must already exist, so create it first and attach scripts in a second call. - `relative_path` (optional, non-markdown artifacts only) — path relative to the skill bundle root (forward slashes; no `..` segments). When set, **`export`** **`skill_zip`** and **`skill_tree`** place the file at this path instead of the default **`artifacts/<sanitized artifact name>`** layout; `activate` materializes it at the same relative path. Contracts reference that path, not the artifact URI. - `review_evidence` (required for adapter/markdown trains) — critic-loop verdict proof. Delegate a subagent to run critic-loop before **`train`**; do not review your own draft on the caller's thread. Provide the verdict file as proof. Object with `verdict_file` (absolute path), `exit_code` (must be 0), and `stdout` (line 1 must be PASS). Not required for artifact trains (non-markdown mime). **Required structure (validated before store)** - H1 title for the adapter. - Optional frontmatter `slug:` pins the adapter's slug, and with it the `squadrules://adapter/<slug>` URI a later artifact `train` targets; without it the slug is derived from the H1 title. - First H2: **Activation Patterns**. - Last H2: **Reward Signal**. - At least one fenced **` ```json `** block whose JSON has a top-level **`contract`** object. - Contract fences must use the `json` language tag only (no plain ``` blocks holding contract JSON). - Non-markdown artifacts (`mime` not `text/markdown`) are stored as adapter-linked artifacts instead of stored Markdown layers. **Artifact identity header (artifact bodies only).** Start the file with a `squadrules-artifact` comment block to pin the artifact's identity instead of deriving it from `artifact_name`. A leading `#!` shebang and blank lines before the block are allowed; the block is consecutive `#`-comment lines of `key: value`. Keys: `slug` (must match `^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$`) and `version` (defaults to `1` when absent or blank). ```python #!/usr/bin/env python3 # squadrules-artifact: # slug: isolation-guard # version: 3 ``` A header slug changes **deduplication** on re-train: a header-pinned artifact matches an existing one by `slug` only, while a name-derived slug matches either `artifact_name` or `slug`. Pin the slug when a shell contract references the artifact, so a renamed file updates that artifact instead of …
reward7 of 7 parameters describedFinalize an adapter run with an outcome and optional evaluator metadata. **When:** After **`forward`** reports the last layer is done and `next_action` tells you to call **`reward`**. **Input** - `uri` — **`squadrules://layer/{uuid}`** (final layer; include `?execution_id=...` when the run used it). - `outcome` — `success` or `failure`. - Optional: `score` (0–1), `feedback`, `rater`, `rubric_version`, `llm_model_id`. **Export eligibility:** To make reward rows exportable for SFT and preference training datasets, you **must** provide: - `rubric_version` — a version tag (e.g. `"v1"`) identifying which rubric or policy was used to evaluate the run. - `rater` or `llm_model_id` — at least one to establish evaluator identity. Omitting either produces `sft_blockers: ["missing_rubric_version"]` / `preference_blockers: ["missing_rubric_version"]` (or `missing_evaluator_identity`) in the response, making the row non-exportable. **Output:** Per-layer result rows with `rated_at`, normalized grading metadata (`grader_kind`, `evaluation_label`), export eligibility flags plus blocker lists for `sft_jsonl` and `preference_jsonl`, and `next_call: null` as the explicit terminal marker. Response contains the evaluation result and export eligibility status. Response envelope includes `ttlMs` and `cacheScope` cache metadata. **Rules:** Use only layer URIs returned by **`forward`**. Do not substitute adapter URIs here unless the tool schema explicitly allows it (this tool expects a layer URI). **On failure:** If reward fails with a proof conflict, fix the failed step and run it again before retrying reward. Check that the layer URI and execution_id match the forward call.
tune5 of 5 parameters describedUpdate existing **adapter** content in place. **Input** - `uris` — non-empty list of `squadrules://adapter/{uuid}` and/or `squadrules://layer/{uuid}` targets. - `content` (optional) — parallel array of full markdown bodies (preferred for text changes). - `updates` (optional) — advanced field map; prefer `content` for ordinary edits. - `space` (optional) — `"personal"` or a full group path such as `"/shared/pe-team"`: reassign **all layers** of each targeted adapter to that space. You can use **`space` alone** (move only) or combine with `content` / `updates` (edit then move). Adapter URI moves every layer; layer URI moves that layer only. - `review_evidence` (required when `content` is provided) — critic-loop verdict proof. Delegate a subagent to run critic-loop before **`tune`** with content; do not review your own edit on the caller's thread. Provide the verdict file as proof. Object with `verdict_file` (absolute path), `exit_code` (must be 0), and `stdout` (line 1 must be PASS). One PASS covers all URIs in the tune call. Not required for space-only moves or updates-only (no content) tunes. **Output:** `results` with per-URI `status` (`updated` | `error`) and `message`, plus totals. Response contains the update results and any errors encountered. Response envelope includes `ttlMs` and `cacheScope` cache metadata. **Rules:** - Pass layer URIs when you want to edit specific layers. - Pass adapter URIs when you want in-place edits across that adapter's stored layers without replacing adapter identity. - Use **`train`** with `force_update: true` for structural replacements (for example, changing adapter identity/H1 mapping or layer count). - When you pass layer URIs, the server normalizes to the underlying stored memories. - Refresh execution context after large **`tune`** edits (new **`forward`** from the adapter URI). **On failure:** If tune returns an error status, verify the URI exists and check the message for details. If the error is "layer not found", verify the URI or train a new adapter if needed. If review_evidence validation fails, ensure the critic-loop verdict file is provided with exit_code 0 and PASS on stdout line 1.
delete1 of 1 parameter describedRemove adapters or individual layers by URI. **Input** - `uris` — non-empty array of `squadrules://adapter/{uuid}` or `squadrules://layer/{uuid}`. **Behavior** - **Adapter URI** — deletes **all** layers belonging to that adapter. - **Layer URI** — deletes that layer memory only. **Output:** Per-URI `status` (`deleted` | `error`), `message`, and aggregate counts. Response contains the deletion results and any errors encountered. Response envelope includes `ttlMs` and `cacheScope` cache metadata. **On success:** The resource is removed and subsequent activate calls will not find it. **Warning:** Deletion is destructive. Prefer **`export`** before removing production adapters. **On failure:** If delete returns an error status, verify the URI is correct and the resource exists. If the error is "resource not found", check if it was already deleted or verify the URI format.
export2 of 8 parameters describedExport an **adapter**, a single **layer**, an **artifact** (`source`), or a **skill-shaped bundle** for backup, inspection, training pipelines, or portable skill distribution. **When to call:** Whenever you need an adapter's **own files** rather than its instructions — its Markdown document, the `artifacts/` scripts its `shell` contracts invoke, or a portable bundle. `activate` and `forward` return *what to do*; **`export` returns the files themselves**. Call it before running a contract whose command names a script path, and before shipping an adapter that ships one. **Input** - **Selection** — exactly one of: - **`uri`** — `squadrules://adapter/{uuid|slug}`, `squadrules://layer/{uuid}` (optional `execution_id` on layer URIs where applicable), or `squadrules://artifact/{uuid|slug}` for source/artifact payloads. - **`adapters`** — non-empty array of adapter identifiers (full URIs and/or bare slugs). Produces one bundle with one top-level folder per exported skill **slug** (capped per server policy). - **`all_adapters: true`** with **`space_name`** — export every adapter in that space (human-readable space **name**, not a raw space id). - **`format`** (optional) — default **`skill_zip`** (skill-shaped ZIP delivered through **`download_ref`** by default). Other values: - **`markdown`** — flat serialized adapter Markdown (smallest payload for **`tune`** or a quick local file). A single **`uri`** returns the content inline; an **`adapters`**/**`all_adapters`** selection requires **`directory`** (see below). Prefer **`skill_tree`** / **`skill_zip`** for portable **`SKILL.md` + `artifacts/` + integrity. - **`skill_tree`** — JSON tree of generated files (paths and UTF-8 contents). - **`trace_jsonl`**, **`reward_jsonl`**, **`sft_jsonl`**, **`preference_jsonl`** — training datasets (single **`uri`** only). - **`source`** — artifact listing or payload (single **`uri`**). `content` is raw UTF-8 text unless **`delivery: inline_base64`** asks for the same bytes base64-encoded; **`sha256`** names the digest of those bytes either way. - **`include_reward`** (optional, default **`true`**) — include reward fields when serializing **`trace_jsonl`**. **`reward_jsonl`** always serializes reward data and skips unrewarded executions. - **`delivery`** (optional, **`skill_zip`** and **`source`** only) — for **`skill_zip`**, default **`download_ref`** returns compact JSON with a short-lived download URL; use **`inline_base64`** only when the ZIP must be embedded in the JSON response. For **`source`**, **`inline_base64`** returns the same bytes base64-encoded so they survive a JSON response and a shell variable without changing a byte — a read/compat convenience for manually reproducing an artifact, not the linked-artifact materialization path (that is `activate`'s `materialize.cmd`, which curls a URL, verifies the digest, and publishes atomically). - **`directory`** (optional) — absolute path of a directory on the machine running the export; SIMPLE/stdio mode only (CLI: local mode). Each selected adapter is written as **`<directory>/<slug>.md`** and the response carries **`directory_manifest`** (per-file `slug`, `path`, `bytes`, `status`) instead of inline `content`. Required for **`format: markdown`** with an **`adapters`**/**`all_adapters`** selection. The path must be inside the allowed export directories (**`SQUADRULES_ALLOWED_EXPORT_DIRS`**; defaults include the server's working directory). **Output:** `content` (string), `content_type`, `format`, optional `item_count`, adapter metadata. Response contains the exported content, format information, and metadata. Response envelope includes `ttlMs` and `cacheScope` cache metadata. **`source`** responses also carry **`sha256`** — the digest of the bytes `content` holds, before decoding — so you can tell a stale artifact from a mangled write. Default **`skill_zip`** responses set **`download_ref`** with `url`, `expires_at`, `filename`, and `content_type`; fetch the URL with **`curl -f…
spaces3 of 3 parameters describedList **spaces** available to the caller (human-readable names) and how many adapters each contains. **Input** - `include_adapter_titles` (optional) — when true, include per-space adapter titles and layer counts. - `include_widget_html` (optional) — when true, load adapter titles and append a second tool content part with an HTML table (type badges, expandable adapter lists) for hosts that render HTML. **Output:** `spaces` array with `name`, `space_id`, `type` (`personal` | `group` | `app` | `other`), `adapter_count`, and optionally `adapters` (`adapter_id`, `title`, `layer_count`). Response contains the list of available spaces and their adapter counts. Response envelope includes `ttlMs` and `cacheScope` cache metadata. List responses support cursor pagination via `nextCursor` — when present, pass it as `cursor` in the next `spaces` call to retrieve the following page. When running in simple mode (`AUTH_ENABLED=false`), `spaces` includes both a writable **Personal** space and the read-only **Squadrules app** space. **Collaboration patterns** 1. **Precedence** — `activate` search ties break in favour of your **default write space** (usually **Personal**). A personal fork can rank beside an identical-scoring group adapter. 2. **Scoping `activate`** — pass `space` / `space_id` using the same strings as **`train`** / **`tune`**: `"personal"`, a full group path such as `"/shared/pe-team"` (optional `"Group: "` prefix), or the raw `space_id` from this tool. 3. **Fork** — use **`train`** with `source_adapter_uri` (`squadrules://adapter/{uuid}`) and target `space` to copy markdown into a **new** adapter UUID in another space; the original is unchanged. 4. **Move** — use **`tune`** with `space` (and optional content edits) to reassign an existing adapter’s layers to another allowed space. 5. **Visibility** — `activate` **match** choices include **`space_name`** so you can see whether a hit is personal, group, or app-level. **SQUADRULES tool order** for runs: **`activate`** → **`forward`** (per layer until `next_action` → **`reward`**) → **`reward`**. Use this tool first when you need valid **`space`** values or an inventory before activation. **On failure:** If spaces returns no spaces, check agent configuration and ensure at least one space exists. If the response is empty, verify the server is running and accessible.
Tested in a sandbox with an empty environment: no API keys, a throwaway folder, nothing from a real account. A passing test shows the server runs and responds. It is not a security audit.