long-novel-agent-kit
This server provides a local stdio MCP interface for desktop agents to manage long-novel continuity, check drafts, and update project state without relying on chat history.
Agent Setup & Configuration
get_agent_template– Retrieve workflow instructions tailored to a specific platform (Codex, Cursor, Claude Desktop, etc.) and write mode.explain_tool_visibility– Understand which tools are available under a given mode (read-only/writer) and tool profile (core/writing/full).build_agent_startup_prompt– Generate a copy-ready startup prompt for an agent taking over a target chapter.build_desktop_next_step– Get a decision report on what the desktop agent should do next based on project state.build_desktop_diagnostics– Produce a diagnostics report covering project state, MCP config, and pack health.
Project Status & Activity
get_project_status– Summarize whether a.novel-agentproject is ready for writing.list_agent_capabilities– View recorded host agent capability declarations.list_agent_activity/build_agent_activity_report– List and evaluate agent activity and handoff records.doctor– Check kit installation and project state health.
Chapter Context & Session Preparation
build_chapter_context/build_chapter_context_brief– Build chapter-safe context (facts, rules, debts) in full or compact form.prepare_chapter_session– Generate a full read-only startup packet (context + fingerprints) before drafting.check_write_session– Preflight check comparing project ID, state hash, and context hash to prevent stale writes.
Continuity Facts & Open Threads
list_facts– List active structured continuity facts, optionally filtered by chapter and kind.list_open_threads– View unresolved plot debts, chapter contracts, conflicts, and the latest handoff.
Draft Checking & Revision
check_chapter– Check a chapter draft against rules, character state, facts, timeline, and continuity obligations.diff_chapter_contract– Compare a draft against required beats, acceptance checks, and forbidden moves.build_chapter_readiness– Produce an author-facing acceptance readiness report with a revision plan.build_chapter_revision_prompt– Generate a targeted revision prompt for the desktop agent.build_chapter_revision_comparison– Compare before/after drafts to show resolved, new, and remaining issues.
Delivery & Acceptance
build_chapter_delivery_packet– Bundle draft metadata, readiness, and post-acceptance commands for author delivery.build_chapter_acceptance_plan– Build a post-acceptance write plan with author-confirmation gates and ordered writer commands.build_author_review_queue– List proposals, conflicts, and acceptance items awaiting author review.
Post-Write Proposals & State Updates
build_proposal_template/get_proposal_schema– Generate an empty proposal template or retrieve its JSON Schema.validate_proposal– Validate a proposal for evidence and conflicts before applying.diff_proposal– Preview what facts, characters, and debts a proposal would change.build_proposal_review– Build an author review packet for a saved or inline proposal.build_proposal_readiness– Check readiness gates before durably applying a proposal.
Handoff
build_handoff_report– Build a handoff report and next-agent brief with workflow requirements, write boundaries, and pending continuity work.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@long-novel-agent-kitprepare session for chapter 5"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Long Novel Agent Kit
Local continuity infrastructure for writing long novels with desktop agents.
Long Novel Agent Kit does not replace the model, the writing agent, or the author's judgment. It gives local desktop agents a durable project memory and a set of safety gates so a long novel can survive long context windows, agent handoffs, source material updates, and multi-chapter continuity drift.
The Short Version
Use the desktop agent for intelligence. Use this kit for continuity.
The desktop agent reads PDFs, old drafts, notes, web pages, images, and long files with its native tools.
The agent writes confirmed summaries, facts, research notes, and decisions into
.novel-agent/.Before drafting, the agent calls
prepare-sessionorbuild-contextinstead of relying on chat history.Before delivery, the agent calls continuity checks and delivery helpers.
After the author accepts a chapter, writer tools record the chapter and update durable state with author confirmation.
Another local agent can later read the same
.novel-agent/state and continue the book.
Related MCP server: ccontext
Architecture At A Glance
flowchart TD
Author["Author"]
Agent["Local desktop agent<br/>Codex, Cursor, Claude Desktop, etc."]
Native["Agent native abilities<br/>model, long context, file parsing, web, PDF/OCR, retrieval"]
Skill["SKILL.md<br/>workflow instructions"]
MCP["server.py<br/>stdio MCP tools"]
CLI["cli.py<br/>local commands"]
State[".novel-agent/<br/>durable novel state"]
Pack["desktop-pack<br/>local HTML/JSON/command packet"]
Runtime["standalone runtime<br/>no-Python CLI and MCP executables"]
Author --> Agent
Agent --> Native
Agent --> Skill
Agent --> MCP
Agent --> CLI
MCP --> State
CLI --> State
State --> MCP
State --> CLI
CLI --> Pack
CLI --> Runtime
Pack --> Agent
Runtime --> AgentComponent Responsibilities
Component | What it does | What it does not do |
Desktop agent | Reads sources, reasons about prose, drafts and revises chapters, uses its own search/parsing/model tools | It is not trusted as durable memory by itself |
| Tells an agent the required writing protocol and when to call the tools | It does not store state or execute commands |
| Exposes the kit through local stdio MCP, with read-only and writer modes | It is not a remote server and does not require cloud hosting |
| Provides local commands for setup, context, checks, packs, handoff, and writer operations | It does not call an LLM |
| Stores accepted continuity, sources, facts, chapters, proposals, audit rows, and snapshots | It is not a manuscript editor |
| Creates a local packet with HTML pages, JSON state, schemas, commands, evidence templates, and handoff files | It does not prove the GUI desktop client has loaded MCP |
| Builds and packages no-Python local runtimes for another computer | It cannot cross-build every operating system reliably |
Core State Model
Every novel project keeps long-term continuity in .novel-agent/.
File | Purpose |
| Project identity, schema version, current chapter metadata |
| Required phrases, forbidden phrases, future markers, naming constraints |
| Accepted chapter records, summaries, tails, handoff notes |
| Structured facts for continuity checks, such as ownership, location, status, relationships, timeline |
| Source summaries confirmed from old drafts, PDFs, notes, or other local materials |
| Research notes and reliability notes from external lookup |
| Resolved contradictions and the chosen version |
| Character state, arcs, relationships, and constraints |
| Foreshadowing, promises, unresolved plot debt |
| Chapter goals, required beats, forbidden moves, acceptance checks |
| Proposed post-write updates awaiting review or application |
| Local agent activity and handoff logs |
| Real desktop client evidence records |
| Durable write audit trail |
| Rollback snapshots created before risky state changes |
Capability Map
Problem | Main commands / tools | Result |
Start a new novel state |
| Creates |
Import an existing Gaoxia-style project |
| Converts chapters, Vault notes, memory, and narrative state into local continuity state |
Save source summaries from the host agent |
| Turns parsed material into durable evidence and rules |
Prepare a chapter |
| Returns chapter-safe context, visible facts, rules, handoff, budget, and fingerprints |
Check a draft |
| Finds rule violations, missing beats, fact conflicts, future leaks, and state conflicts |
Help revision |
| Produces targeted repair instructions and before/after issue comparison |
Deliver to author |
| Bundles readiness, known issues, handoff state, and post-acceptance commands |
Update long-term state after acceptance |
| Records accepted chapter and applies reviewed continuity updates |
Prevent stale or wrong-project writes |
| Blocks writer commands when the state has changed since context generation |
Hand off to another local agent |
| Gives the next agent enough durable context to continue safely |
Give a normal user a local packet |
| Creates and validates a browser-readable and agent-readable local packet |
Prove a real desktop client can use the kit |
| Separates local config checks from real GUI client evidence |
Move to another computer without Python |
| Creates runtime executables plus a copyable project/pack/runtime bundle |
Recover or audit state |
| Supports rollback, migration, and project health checks |
The Main Writing Flow
sequenceDiagram
participant A as Desktop Agent
participant K as Long Novel Agent Kit
participant S as .novel-agent
participant U as Author
A->>K: source-intake / add-source / add-research
K->>S: store confirmed evidence
A->>K: prepare-session chapter N
K->>S: read facts, rules, sources, chapters, debts
K-->>A: chapter-safe context and fingerprints
A->>A: draft chapter with native model
A->>K: check-chapter / chapter-readiness
K-->>A: continuity and contract issues
A->>U: deliver draft and known issues
U-->>A: accept or request revision
A->>K: record-chapter with author confirmation
A->>K: propose-after-write / proposal-readiness
K->>S: write audited accepted state when allowedThe important rule: generate context from durable state before writing. Do not treat chat history as the source of truth.
Read-Only Mode And Writer Mode
Read-only MCP is the default and recommended mode:
python server.py --read-only --tool-profile coreRead-only mode can prepare context, check drafts, build reports, inspect packs, and explain next steps. It cannot change .novel-agent/.
Writer mode can change durable state, so it is gated:
The author must confirm the write.
write-session-checkcompares project identity, state fingerprint, and chapter context fingerprint.Proposal readiness checks evidence, conflicts, and risk.
.write.lockprevents concurrent writes.Snapshots are created before applied proposal updates.
Every durable write appends to
audit.jsonl.
Desktop Packs
desktop-pack is the bridge between the kit and ordinary local desktop-agent usage.
It writes a local directory containing:
first-three.html,local-summary.html, anduser-steps.htmlfor a normal userpack-index.json,commands.json,commands-index.json, and schemas for an agentchapter-session.json,handoff-report.json, project status, continuity audit, and author review queuesetup, install, upgrade, uninstall, local check, and archive scripts for macOS, Windows, and POSIX shells
evidence templates and result JSON schemas for proving real GUI client behavior
acceptance review and writer-mode authorization packets
The pack is a local guide and snapshot. If it is copied or moved, run pack-doctor, pack-freshness, or rebind-pack-kit before trusting old paths.
No-Python Handoff
For non-technical users on another computer, build a same-OS standalone runtime first:
python cli.py standalone-build \
--output-dir release/long-novel-agent-runtime-macos-arm64 \
--target-os macos \
--apply \
--force \
--format jsonThen create a handoff bundle:
release/long-novel-agent-runtime-macos-arm64/long-novel-agent desktop-handoff-bundle ./my-novel \
--platform codex \
--mode read-only \
--chapter 1 \
--runtime-dir release/long-novel-agent-runtime-macos-arm64 \
--output-dir release/my-novel-agent-bundle \
--archive \
--force \
--format jsonThe bundle contains project/, pack/, runtime/, launchers, MCP snippets, runtime command files, and agent-read-me-first.md. When both runtime executables are present, the target computer does not need Python.
For a Windows .exe release, build on Windows and follow Windows Runtime Release. The GitHub Actions template is stored at docs/github-actions-windows-release.yml; copy it into .github/workflows/ only when the GitHub token used for the push has workflow scope.
Quick Start From Source
git clone https://github.com/mushroomfk/long-novel-agent-kit.git
cd long-novel-agent-kit
python cli.py doctor
python cli.py init ./my-novel --title "My Novel"
python cli.py prepare-session ./my-novel --chapter 1 --platform codex --mode read-only --format markdownCheck a draft:
python cli.py check-chapter ./my-novel --chapter 1 --file chapters/001.md --format markdownGenerate a desktop setup guide:
python cli.py desktop-setup ./my-novel --platform codex --mode read-only --format markdownWhat This Kit Does Not Do
It does not run an LLM.
It does not include embedding search.
It does not parse PDF/OCR/web pages by itself.
It does not upload manuscripts.
It does not require a server for local desktop use.
It does not replace literary judgment, editing taste, or author approval.
Those jobs belong to the host desktop agent and the author. This kit persists and verifies the continuity layer.
Repository Layout
.
├── cli.py # local CLI
├── server.py # stdio MCP server
├── install.py # local skill and MCP installer
├── SKILL.md # agent workflow instructions
├── schemas/ # JSON schemas for proposals and desktop packs
├── assets/review-panel.html # local static proposal review panel
├── examples/ # smoke, handoff, evidence, and adversarial examples
├── docs/ # architecture, install, workflow, and release docs
├── scripts/verify_agent_kit.py # full regression check
└── scripts/adversarial_release_check.pyVerification
Run the full regression suite:
python scripts/verify_agent_kit.pyRun the stronger release gate:
python scripts/adversarial_release_check.pyAn optional GitHub Actions workflow template is available at docs/github-actions-verify.yml. Repository maintainers with workflow scope can copy it to .github/workflows/verify.yml.
Requirements
Python 3.10 or newer for source-based CLI/MCP usage.
A local desktop agent that can start stdio MCP or run shell commands.
Optional: PyInstaller when building no-Python runtime bundles.
Supported Local Agent Paths
CLI-only agents can run
python cli.py ....MCP-capable agents can start
python server.py --read-only.Codex and Cursor local config paths can be generated automatically by
install.py.Claude Desktop and generic JSON MCP clients can use explicit config snippets.
Remote connector-only platforms are outside this local stdio MCP flow.
License
MIT. See LICENSE.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mushroomfk/long-novel-agent-kit'
If you have feedback or need assistance with the MCP directory API, please join our Discord server