Grainulator
Grainulator's MCP server provides a local evidence-and-verification workflow for recording, checking, and carrying forward research work.
Initialize sprints and inspect status, evidence health, freshness, coverage, and missing acceptance criteria.
Add, import, search, correct, link, and resolve evidence claims; track conflicts, duplicates, audits, and revisions.
Capture local source snapshots, recheck premise freshness, and identify claims needing re-verification.
Compile the ledger into diagnostics plus Auto/Manual next actions.
Search, list, store, pull, and relate reusable local memory collections and knowledge packs.
Fetch bounded external content via DeepWiki or URL fetching, and optionally list/pull/publish Confluence pages.
Preview and convert local evidence exports in formats such as Markdown, JSON, and CSV.
Allows interaction with a configured Confluence service: listing and pulling remote pages/content, and publishing or updating Confluence pages. Requires Confluence base URL, token, and email.
What it adds
Good models still need a way to keep track of evidence, revisit assumptions, and verify their work. Grainulator gives them that process, with a local ledger that stays with the task as it moves between models and sessions.
Capability | What it gives you |
Evidence that stays with the work | Typed claims, sources, evidence tiers, and provenance that survive edits and exports. |
A check on the answer | Conflict detection, weak-support signals, and explicit gaps to investigate. |
Clear next actions | Two lists: what the agent can continue automatically, and what needs your input. |
Sessions you can carry forward | Configurable research, stop/resume, reusable context, and credential-free exports. |
Verification for your task | A managed command loop that can use a verifier you provide. |
Grainulator works with Claude Code and Codex through plugins. It also provides a command-line tool and an MCP connection for other agents. You do not need to install its components separately.
Related MCP server: Ouroboros
Quick start
Install the CLI and matching native runtime through the shared Homebrew tap:
brew tap grainulation/homebrew https://github.com/grainulation/homebrew
brew install grainulation/homebrew/grainulator
grainulator doctor
grainulator demoHomebrew provides Node 24 and the matching native assets. The offline demo needs no credentials. For agent integration, follow agent setup.
From source
Select one published tag from the release list and set GRAINULATOR_RELEASE_TAG to it. Use the same release for the CLI and source plugin.
Requires Node.js 24 or later; Node 24 and 26 LTS are the tested release lines. Node 24 is the development default.
Upgrading from an earlier version? Follow the migration checklist to update the plugin and keep your existing research data.
git clone --branch "${GRAINULATOR_RELEASE_TAG:?Set this to the published tag matching your CLI}" https://github.com/grainulation/grainulator.git
cd grainulator
npm ci --ignore-scripts
npm run build
node bin/grainulator.js doctorTo use Grainulator inside your agent, follow the Claude Code or Codex setup guide.
Start a portable research session without making provider calls:
grainulator research --question "What evidence answers this question?" --dir ./research-session --prepare-onlySee CLI research for provider configuration and checkpoint continuation.
Grainulator 3: one CLI/plugin with a unified configuration and separately verified native runtime assets. Follow installation, upgrading, configuration and data retention. The shared Homebrew tap lists available stable formulas.
Other agents: connect through MCP
Add an MCP server that runs this command, with your project's absolute path:
node /absolute/path/to/grainulator/bin/grainulator.js mcp --dir /absolute/path/to/projectAntigravity installs the full plugin. See the agent setup guide for Antigravity, Cursor and other MCP agents.
For the full Claude Code or Codex plugin, use the agent setup guide. Codex needs a project folder; the guide shows how to set it. CLI and direct MCP access remain available to other hosts.
Or point your coding agent (Claude Code, Codex, or Antigravity) at this checkout:
Read README.md and AGENTS.md in the Grainulator repository. Run node bin/grainulator.js doctor
and node bin/grainulator.js demo, and report the exit codes and final status lines. Then tell me
which routes below this machine can run, and ask me before starting any model-backed or paid run.Route | What it does | Needs | Time / Cost |
1. Local ledger & offline demo | Runs | Node.js ≥24; no credentials | ~2 s · $0 (no model calls) |
2. Managed command verifier | Runs | Route 1 + local verifier script | Per-round timeout & round cap |
3. Host plugin or MCP server | Connects | Route 1 + host agent | Host session · $0 Grainulator overhead |
4. Semantic & adversarial evals | Runs | Route 1 (+ API credentials for live model matrix) | Offline $0 · live matrix requires explicit budget |
Put it to work
For necessary-premise links, current source checks, recorded verification runs,
audit findings and missing acceptance criteria, see
evidence maintenance. Start with
node bin/grainulator.js maintain --help; all operations use an explicit sprint.
With Grainulator connected, give your agent the outcome you need:
Use Grainulator to investigate whether we should migrate this service. Record the evidence, challenge the assumptions, implement the agreed changes, and verify them. Keep the remaining next steps split into Auto and Manual.
The work follows a simple cycle:
Record findings with their sources and evidence tiers.
Check for conflicts, weak support, and missing perspectives.
Act on the gaps that matter, then verify the requested result.
Continue from the saved ledger or export the session to another workflow.
There are no fixed claim-count or research-pass quotas. Auto lists work the agent can continue within your authorization. Manual lists decisions, access, or actions that need you. When you ask only for next steps, those two lists are the entire response.
node bin/grainulator.js init --dir ./sprints/migration \
--question 'Should we migrate this service?' \
--audience engineers --constraints 'Preserve existing user data' \
--done 'A verified plan with remaining risks documented'
node bin/grainulator.js add --dir ./sprints/migration \
--id r001 --type constraint --topic migration \
--content 'Existing user data must remain readable.' --evidence stated
node bin/grainulator.js compile --dir ./sprints/migrationThe equivalent MCP tool is add_claim on the grainulator server. See the tool reference for evidence, memory, export, analytics, and orchestration operations.
Explore the docs
Guide | Start here for… |
Tagged source, isolated archives, and verified build identity. | |
Host updates, renamed tools, existing data, and retired setup instructions. | |
Use Grainulator with Claude Code, Codex, or another agent. | |
Models, feature controls, credentials, export, and resume. | |
The canonical CLI and MCP interface. | |
Attaching a model command and a task-specific verifier. | |
The workspace layout and internal modules. | |
What has been measured and what remains unproven. | |
Development setup, tests, and changes to the project. |
Verification and limits
CI checks Node 24 and 26, isolated package installation, plugin contracts, Rust runtime conformance, lint, and credential-free CLI/MCP research and export workflows. Native host and live-provider acceptance have separate verification guides.
The compiler checks the structure and support recorded in the ledger; it does not establish that a source is true. Evaluations do not establish a general accuracy or efficiency gain, and per-pass limits are not a whole-session spending cap. Keep those distinctions when interpreting results.
npm test
npm run test:install
npm run lint
npm run typecheck
npm run check:typesDevelopment and runtime prerequisites are in CONTRIBUTING.md. The offline node bin/grainulator.js demo exercises the adapter/verifier protocol without a provider account.
Available Tools
15 toolscompile_sprintCompile evidence and propose next actionsADestructive
Validate the ledger and regenerate the configured compilation and topic artifacts, returning blockers and Auto/Manual next actions. Writes local compiler outputs; does not run verifiers or prove source truth. Use inspect_sprint for read-only diagnostics. Example: {}
Inputs: dir. Returns: Operation result. Failure results set status to error and explain the failure;…
configure_sprintCreate sprint or update acceptance criteriaADestructive
Create a sprint or explicitly update its acceptance criteria. mode=create requires question and preserves force/backup rules; omitted done creates no completion criterion. mode=criteria requires reason and question or done; done replaces active completion criteria with preserved history, and question updates the goal. Use inspect_sprint to read criteria. This tool can replace a ledger only with explicit force in create mode. Example: {"mode":"create","question":"What causes the service timeout?","done":"Identify the cause and verify the repair."}
Inputs: mode (required), dir, done, force, +4 more. Returns: Operation result. Failure results set status to error and explain the failure;…
correct_claimCorrect a claim while preserving historyADestructive
Create a stated-tier successor and supersede its predecessor atomically, preserving history and rationale. Necessary dependents require re-verification. Use record_claim for unrelated findings or resolve_conflict for a contradictory pair. Example: {"claim_id":"r001","id":"r002","content":"The client request deadline is configured to 30 seconds.","reason":"Distinguish client deadline from service execution time."}
Inputs: id (required), reason (required), content (required), claim_id (required), +1 more. Returns: Operation result. Failure results set status to error and explain the failure;…
export_documentRender evidence, preview a document or list formatsADestructive
Render sprint evidence inline, preview its first lines, or save a local document. Omit format and supply only dir to list available formats; use a returned format ID for rendering. lines and output are mutually exclusive. Inline/preview do not write; output can replace an allowed local artifact but cannot overwrite evidence or host configuration. Formats are also available at grainulator://exports/formats. No remote publication. Example: {"format":"markdown","lines":10}
Inputs: dir, lines, format, output, +1 more. Returns: Operation result. Failure results set status to error and explain the failure;…
import_claimsImport active findings from a documentA
Import active document findings with stable source identity, collision mapping and preserved source provenance. Writes stated-tier findings atomically; repeated unchanged imports are no-ops. Use record_claim for authored findings and correct_claim to review changes; this is not a historical ledger restore. Example: {"source":"docs/incident.md","claims":[{"id":"r004","type":"factual","topic":"timeouts","content":"The incident report records a 30-second request deadline."}]}
Inputs: claims (required), source (required), dir. Returns: Operation result. Failure results set status to error and explain the failure;…
import_memoryImport reusable local memory into a sprintA
Import a selected local knowledge pack or collection into the sprint, deduplicating and remapping IDs. Writes the destination ledger and may initialize local memory. pack is a name, not a path; into stays within the sprint. Use import_claims for document findings or search_memory to discover reusable collections. Example: {"pack":"prior-findings"}
Inputs: pack (required), dir, into. Returns: Operation result. Failure results set status to error and explain the failure;…
inspect_sprintInspect evidence freshness and acceptance gapsARead-onlyIdempotent
Read a fixed diagnostic report containing sprint status, evidence freshness, missing acceptance criteria and possible duplicate anchors. No execution, network or ledger writes. limit bounds each returned array, including truncated_paths; truncated_path_count counts all shortened paths. Use compile_sprint to regenerate stale compilation or search_claims for complete records. Example: {"limit":10}
Inputs: dir, limit. Returns: Operation result. Failure results set status to error and explain the failure;…
link_premisesBind necessary premises to a conclusionADestructive
Replace a conclusion's necessary-premise links using current active versions. Writes ledger history and rejects unknown IDs/cycles. Use claim provenance for supporting sources and correct_claim for content changes. After rechecking an affected conclusion, use this tool to explicitly rebind its premises; rebinding alone does not verify the conclusion. Example: {"claim_id":"r002","premises":["r004"],"reason":"The conclusion depends on the incident report deadline."}
Inputs: reason (required), claim_id (required), premises (required), dir. Returns: Operation result. Failure results set status to error and explain the failure;…
observe_sourceCapture a current local source observationADestructive
Capture a current confined local text file or line range for an existing claim, recording file/range digests in the ledger. Rejects symlinks; never executes commands or promotes tiers. Use record_claim to add a finding, then capture its source here. Example: {"claim_id":"r002","path":"src/service.ts","start_line":1,"end_line":2}
Inputs: path (required), claim_id (required), dir, end_line, +2 more. Returns: Operation result. Failure results set status to error and explain the failure;…
record_claimRecord an authored evidence claimA
Record one new authored finding with a unique ID, type, evidence tier and provenance. Writes the locked ledger and optional quoted passage. Use import_claims for document batches, correct_claim for a successor, or observe_source to capture a current file; a recorded tier is not independently verified proof. Example: {"id":"r001","type":"factual","topic":"timeouts","content":"The service timeout is configured to 30 seconds."}
Inputs: id (required), type (required), topic (required), content (required), +6 more. Returns: Operation result. Failure results set status to error and explain the failure;…
resolve_conflictResolve a contradictory claim pairADestructive
Resolve a contradictory pair: retain winner, supersede loser and record rationale without verifying the winner. Writes the locked ledger; dependent conclusions are not rebound. Use correct_claim for correction without a conflict. Example: {"winner":"r002","loser":"r003","reason":"The current client configuration supports r002."}
Inputs: loser (required), winner (required), dir, reason. Returns: Operation result. Failure results set status to error and explain the failure;…
search_claimsSearch current or historical sprint claimsARead-onlyIdempotent
Read matching sprint claim records with audit verdict, revision and observation freshness. Defaults to complete active records; include_inactive preserves historical access. Filter verdict/resolution when auditing findings. Use search_memory for other stored collections or inspect_sprint for diagnostic coverage. Example: {"query":"deadline"}
Inputs: id, dir, full, type, +6 more. Returns: Operation result. Failure results set status to error and explain the failure;…
search_memorySearch local reusable evidence or list catalogsA
Search stored local collections with OR-matched query terms and 200-unit snippets, or omit query to list collection and unimported pack catalogs. May initialize the local index/acquire its lock; no network or sprint import. Use import_memory to copy selected evidence, store_memory to save it, and search_claims for the current sprint. Example: {"query":"deadline retry","limit":5}
Inputs: dir, type, limit, query, +1 more. Returns: Operation result. Failure results set status to error and explain the failure;…
store_memorySave sprint claims as reusable local memoryADestructive
Save a sprint as a named reusable local collection under the memory lock. An existing name can be replaced; no upload/publication. from must remain within the sprint. Use search_memory to inspect available collections and import_memory to reuse one. Example: {"name":"prior-findings"}
Inputs: name (required), dir, from. Returns: Operation result. Failure results set status to error and explain the failure;…
update_findingApply a revision-guarded finding audit decisionADestructive
Record an explicit audit verdict, resolution, reopening or duplicate decision under expected_revision. Writes history; stale revisions fail. Verification/fixed decisions require a current observation. Use search_claims to refresh the revision; labeling fixed alone cannot prove repair. Example: {"claim_id":"r002","action":"reopen","expected_revision":0,"reason":"Recheck the deadline after configuration changes."}
Inputs: action (required), reason (required), claim_id (required), expected_revision (required), +5 more. Returns: Operation result. Failure results set status to error and explain the failure;…
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 15 tools
The tools are mostly distinct and the descriptions explicitly cross-reference alternatives, such as record_claim vs import_claims vs correct_claim. A few boundaries still require careful reading, especially update_finding vs correct_claim and search_claims vs search_memory, but misselection risk is limited.
All names follow a readable snake_case verb_noun pattern, and sprint/memory/claim families are mostly parallel. The main minor inconsistency is using update_finding for a claim-like object while most related tools use claim terminology.
Fifteen tools is appropriate for a multi-stage evidence and claim-management system. Each tool appears to cover a distinct lifecycle step or diagnostic operation rather than padding the surface.
The surface covers sprint setup, claim creation/import/correction/conflict resolution, premise linking, source observation, audit updates, search, compilation, memory reuse, and export. No obvious lifecycle dead end is present; the append-only/history-preserving design reasonably explains the absence of hard deletes.
Maintenance
Related MCP Connectors
Evidence-backed project memory and checkpoints for AI coding agents.
Source-backed prompting and coding-agent guidance with provenance and freshness checks.
One memory for AI agents in Claude Code, Cursor, Codex and ChatGPT that flags conflicting facts.
AI-native programming language and toolchain for accountable, verifiable agent-driven development.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceA shared, concurrency-safe ledger for LLM code audits. It enables multiple agents to collaboratively report, verify, and resolve bugs with deduplication and hallucination resistance.-
- AlicenseBqualityBmaintenanceLocal-first Agent OS that wraps Claude Code, Codex CLI, and other coding agents in a replayable Seed → Ledger → Runtime contract, driven by an interview → seed → execute → evaluate → evolve workflow loop.3421,848 PyPI6,410MIT
- AlicenseNot gradedqualityAmaintenanceEnables evidence-gated, multi-session AI coding runs with plan-build-ship state management, coordinating Claude Code and Codex native agents.20 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to maintain auditable, local-first long-term memory in a single SQLite file, preserving source evidence and retiring dependent memories when sources are corrected so Claude Code, Cursor, and Codex start from current recorded evidence.159 npm162MIT