noveletary

noveletary

A local MCP server for maintaining internal consistency in fiction writing, with constraint-based fact checking, branching, and author-oracle conflict resolution.

Category
Visit Server

README

noveletary

日本語

novel + secretary — a constraint-maintained narrative knowledge base and MCP server that checks the internal consistency of fiction, with first-class support for Japanese prose.

What

A local MCP server an LLM (Claude Code, Claude.ai Projects) calls while you write or import a novel. It tracks story facts in an append-only operation log, gates contradictions at write time, branches parallel plot drafts, and routes the questions it cannot decide to you — the author.

  • Construction = checked mutation. Adding a fact runs hard-constraint checks (a dead character acting, a monotone ledger decreasing, a temporal cycle, an orphaning delete) and rejects contradictions with the conflicting fact set.
  • Verification = the same engine, batch mode. Audit a whole branch; hard violations are certain, optional semantic checks (NLI) become author questions.
  • Story branches are first-class: parallel drafts (A-plot / B-plot) audited independently, merged with structural conflict detection, rolled back without losing history.
  • The author is the oracle. Unresolved aliases, merge conflicts, and semantic doubts go to the author, not to LLM guesswork. Answers persist and propagate through later checks.

Why

LLM-driven consistency checking is wasteful and unreliable when the LLM both writes and self-grades. noveletary keeps a deterministic constraint engine and the author as the trusted core, and treats the LLM as a fallible translator with no authority. Most "contradictions" in fiction are structurally decidable (state machines, numeric invariants, temporal constraints) and need no semantics; the semantic residual is the only part a language model judges, and even then the verdict is a question, not a gate.

Status

Early (v0.1). Core engine, store, branching, merge, audit, and MCP server are implemented and tested. The Japanese NLP extraction layer (GiNZA reconciliation; KWJA zero-anaphora adapter) is optional and advisory; the KWJA path awaits its upstream model host. Not yet deployed remotely (Cloudflare Workers + D1 is a known migration path).

Install

pip install -e ".[dev]"          # core + tests
pip install -e ".[dev,nlp]"      # add Japanese NLP (GiNZA, KWJA)

Run as an MCP server

noveletary-mcp                                   # stdio
claude mcp add noveletary -- noveletary-mcp      # register with Claude Code

SQLite state persists in data/narrative.db (run from the repo root; override with NARRATIVE_DB).

Tools (LLM-facing)

Tool Purpose
get_state / get_log state before writing (chapter-sliced, subject-focused), history
add_fact / add_facts register facts (hard-gated) — writing from scratch
import_facts bulk-load an existing work (not gated) — then audit surfaces issues
update_fact / delete_fact supersession (+retcon check) / delete (orphan check)
audit hard violations always; include_soft=True adds NLI-based author questions
create_branch / merge_branches / rollback_branch parallel drafts, structural merge, non-destructive rollback
list_open_questions / answer_question the author-oracle channel
extract_facts / reconcile_facts independent prose extraction; cross-check the LLM's self-report

License

MIT. See LICENSE.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured