Content
# Tool List
**A Rust-based MCP server for creating long-running autonomous agents like "Fable5-class" agents.**
Anthropic's top model Claude Fable 5's system prompt leak (June 2026) revealed a "harness design for long-running agents." This was distilled into an MCP tool that can be forcibly injected into any model (Sonnet / Haiku / GPT / Gemini, etc.). Like AI employees, it works in a flow of "mission reception → planning → execution → verification → reporting" across context disappearance, enabling long-term work.
## Background: Fable5 Prompt Leak
Within 24 hours of Claude Fable 5's release on June 9, 2026, a system prompt of 1,585 lines and approximately 27,000 tokens was publicly disclosed on GitHub. The main sources were:
- [elder-plinius/CL4R1T4S](https://github.com/elder-plinius/CL4R1T4S) — A repository by Pliny the Liberator with the full Fable5 prompt (about 26,400 stars).
- [asgeirtj/system_prompts_leaks](https://github.com/asgeirtj/system_prompts_leaks) — Continued collection of Fable 5 / Opus 4.8 / Claude Code / Claude Design prompts and others.
- [x1xhlol/system-prompts-and-models-of-ai-tools](https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools) — A collection of prompts for 28+ AI coding tools (about 134K〜136K stars).
- [YeeKal/leaked-system-prompts](https://github.com/YeeKal/leaked-system-prompts) — An archive of leaked and officially disclosed prompts.
- [cyrus-tt/fable5-system-prompt](https://github.com/cyrus-tt/fable5-system-prompt) — The full Fable5 prompt with 1,585 lines and a lite version with 164 lines.
- Analysis articles: [AlphaSignal "Fable 5 Prompt Leak Is a User Manual for Long-Running Agents"](https://alphasignalai.substack.com/p/claude-fable-5-prompt-leak-is-a-user) / [Augment Code's explanation](https://www.augmentcode.com/learn/leaked-ai-system-prompts-github)
The analysis revealed that much of Fable5's strength lies not only in the model itself but also in the harness (system prompt + tool discipline). Specifically:
1. **Task packetization** — Fixing goals, testable completion criteria (DoD), constraints, and deliverables at the beginning.
2. **Verification with evidence gates** — Not accepting "should work" as completion. Test output and command results are required for completion.
3. **Externalization assuming context disappearance** — Placing plans, progress, and checkpoints on disk rather than in conversation.
4. **Outcome-based reporting** — The first sentence is the conclusion. Writing for readers who haven't seen the intermediate process.
5. **Persistent memory** — Accumulating facts with frontmatter-marked Markdown and an index, and silently applying them.
## Mechanism (Honest Explanation)
The MCP tool doesn't change the model's weights, but **agent performance = model × harness**. This tool injects "Fable5-class discipline" through three paths:
1. **Server `instructions` (always effective)** — Connecting with MCP alone injects a condensed protocol (ownership of outcomes, evidence-based verification, outcome-based reporting, autonomous rules, and externalization of state) into the client's context. **Effective for the entire session without needing to call the tool**.
2. **`boost` tool** — Injecting the "FABLE5 OPERATING PROTOCOL" (mode-specific, phase-specific) distilled from leaked prompt analysis at any time.
3. **Mechanical quality gates** — Rejecting `task_done` with thin evidence or `work_complete` with incomplete tasks or insufficient evidence on the server side. Making behavioral norms "mandatory" rather than "requested".
## Benchmark: Opus + fable5-mcp Reaches Fable5 Quality
Implemented on July 5, 2026. The same real task (Rust implementation of access log analysis CLI `logstat`: parsing / error rate / p95 (nearest-rank) / unit test / README) was given to agents under three conditions in parallel, and **all outcomes were independently verified by a third party (a separate session agent)**. A sample log of 3,025 lines (with 25 incorrect lines) was used, with correct answers pre-calculated, and output correctness was mechanically judged by byte comparison.
| Verification Item (Independent Execution) | ① Claude Fable 5 Raw | ② Claude Opus 4.8 Raw | ③ Opus 4.8 + fable5-mcp |
|---|---|---|---|
| Output vs. Correct Answer (Byte Comparison) | ✅ Complete Match | ✅ Complete Match | ✅ Complete Match |
| `cargo test` | 7/7 Pass | 7/7 Pass | 7/7 Pass |
| Handling Empty/Damaged Files | ✅ Normal | ✅ Normal | ✅ Normal |
| Autonomous Verification Actions | Python Independent Implementation for Verification | Raw Log and Manual Verification | `cmp` Byte Comparison + Robustness Tests (Empty, Incorrect UTF-8, Damaged Files, Exit Code) |
| Audit Trail and Resumability | None | None | ✅ Persistent with 6 DoD Items, Evidence-Attached Tasks, and Checkpoints in `state.json` |
| Cost | 43k tok / 3.8 min | 49k tok / 4.2 min | 63k tok / 6.9 min |
**Conclusion and Honest Note:**
- **Quality Equivalence Established** — ③ (Opus + fable5-mcp) reached the same level as ① (Fable5 Raw) in all aspects: correct answers, testing, and robustness. Especially, the depth of verification (byte comparison, edge cases, and exit codes) was the most rigorous among the three conditions, and the harness drew out a similar self-cross-checking behavior from Opus as Fable5 did without instructions.
- **Raw Opus Also Produced Correct Answers** — This task had a clear completion criterion, so the difference truly appears in ambiguous specifications, long-term tasks, and context disappearance. Only ③ could continue from the evidence on disk if it stopped midway.
- **Overhead** — About +28% tokens and 1.65 times longer than Opus Raw. This is within a reasonable range for the price of audit trails and verification depth.
- **Quality Gate Never Triggered** — ③ submitted real evidence (build log, test results, byte comparison) every time, showing the intended behavior of "having a gate means providing real evidence from the start".
## Installation
### One-Command (Recommended) — Make /fable5 Available in Any Folder
```bash
cd Fable5-mcp
./install.sh
```
`install.sh` automatically performs the following three steps:
1. `cargo build --release` (if not built before)
2. Installs the `/fable5` skill to `~/.claude/skills/fable5/` (embedding the absolute path of the binary)
3. Registers the MCP server for the entire user scope with `claude mcp add fable5 --scope user`
This allows you to use the `/fable5` slash command and `mcp__fable5__*` tools in any Claude Code session, even when opening different files or folders. For details and manual steps, see ["Making /fable5 Available in Any Folder (Globalization)"].
### Manual Installation
```bash
cd Fable5-mcp
cargo build --release # → target/release/fable5-mcp (dependencies: serde / serde_json / chrono only)
```
Register with Claude Code (either way):
```bash
# For the entire user scope (when running in the repository)
claude mcp add fable5 --scope user -- "$(pwd)/target/release/fable5-mcp"
# Or specify the full path from an arbitrary location
claude mcp add fable5 --scope user -- /path/to/Fable5-mcp/target/release/fable5-mcp
```
Or in the project's `.mcp.json` (already included in this repository; the path is relative to the project root):
```json
{
"mcpServers": {
"fable5": {
"type": "stdio",
"command": "./target/release/fable5-mcp"
}
}
}
```
You can also register with Cursor / Windsurf / other MCP clients using the same command as a stdio server. **This is the original purpose for models other than Fable5 (Sonnet / Haiku / GPT series).**
## AI Employee Workflow
```
boost(mode, phase:"kickoff") ← Protocol Injection (Work Start)
└ work_start(goal, DoD…) ← Mission Reception and Completion Criteria Agreement
└ plan_set(tasks) ← Plan Registration
└ Loop:
task_next ← Start Next Task
(Actual Work)
task_done(evidence) ← Evidence-Attached Completion Report (Thin Evidence Rejected)
checkpoint_save ← Checkpoint Saving
└ boost(phase:"verify") → work_complete(dod_evidence) ← Final Inspection (Gate)
└ standup ← Daily Report and Progress Update Anytime
Context Compression and Restart → resume (Complete Restoration of Mission, Plan, Evidence, Checkpoint, and Protocol)
```
## Tool List (11)
| Tool | Role |
|---|---|
| `boost` | Fable5 Operating Protocol Injection. `mode`: general/coding/research/writing/ops, `phase`: kickoff/execute/verify/handoff |
| `work_start` | Start Work Session. Persistent goal + testable DoD (+constraints/deliverables) |
| `plan_set` | Register Step Plan (keep existing tasks and evidence, add new ones) |
| `task_next` | Get Next Task (in_progress). One task at a time |
| `task_done` | Evidence-Attached Completion Report. **Evidence < 20 characters rejected** |
| `checkpoint_save` | Checkpoint Saving (summary for zero-context readers + next steps + unsolved points) |
| `resume` | Complete Restoration after Restart or Compression. **Call this first when resumed** |
| `standup` | AI Employee Daily Report Style Progress Update |
| `work_complete` | Session Completion. **Rejected if incomplete tasks or no evidence for DoD items** |
| `memory_save` | Persistent Memory Saving (user/feedback/project/reference, frontmatter Markdown + MEMORY.md index) |
| `memory_recall` | Memory Recall (keyword search, call at the start of related work) |
## Bundled Skill for Claude Code
### /fable5 — Reliable Harness Activation
`.claude/skills/fable5/` — A `/fable5 <task>` command to reliably activate Fable5 mode. It activates in three fallback levels:
1. MCP Connected → Execute `boost` + `memory_recall` immediately for protocol injection.
2. MCP Not Connected → Directly hit the binary with JSON-RPC to obtain the same protocol (also provides permanent installation commands).
3. No Binary → Build it, or use the protocol summary embedded in the skill if that's not possible.
After activation, execute the AI employee loop (work_start → plan_set → task_next/task_done → checkpoint → work_complete). For continuous work, call `resume` first.
### Making /fable5 Available in Any Folder (Globalization)
This is already effective in sessions where this repository is opened. To make it available in sessions with different files or folders:
```bash
./install.sh
```
Or manually in two steps:
```bash
cd Fable5-mcp
# 1. Install the skill to the user scope (~/.claude/skills/)
mkdir -p ~/.claude/skills
cp -R .claude/skills/fable5 ~/.claude/skills/
# Make the binary reference in the skill absolute path aware (for Bash fallback outside the repository)
sed "s|\./target/release/fable5-mcp|$(pwd)/target/release/fable5-mcp|g" \
.claude/skills/fable5/SKILL.md > ~/.claude/skills/fable5/SKILL.md
# 2. Register the MCP server in the user scope
claude mcp add fable5 --scope user -- "$(pwd)/target/release/fable5-mcp"
```
Supplement:
- Effective from **the next Claude Code session startup**. Doesn't appear in the current session.
- Project scope (`.claude/skills/` and `.mcp.json` in this repository) and user scope can coexist, with the project side prioritized within the repository.
- The harness state (`.fable5/`) is created in the current directory of each session, making it independent per project.
- Uninstallation: `rm -rf ~/.claude/skills/fable5 && claude mcp remove fable5 -s user`
## Data Storage Location
- Default: `./.fable5/` in the current directory (with `state.json` and `memory/*.md`)
- Arbitrary path change possible with the environment variable `FABLE5_HOME`
- All data is in plain JSON / Markdown, readable by humans.
## Operation Verification
```bash
printf '%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18"}}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \
| ./target/release/fable5-mcp
```
## Implementation Notes
- Handwritten JSON-RPC 2.0 / MCP stdio implementation with only 3 crate dependencies (SDK-independent, newline-separated JSON).
- Protocol text is not a direct copy of the leaked text but an original statement distilled from public analysis.
- `initialize` echoes the client's `protocolVersion` for compatibility with new and old clients.
## License
MIT
MCP Config
Below is the configuration for this MCP Server. You can copy it directly to Cursor or other MCP clients.
mcp.json
Connection Info
You Might Also Like
No recommendations available