story-architect-mcp
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., "@story-architect-mcpFind any timeline inconsistencies in my draft"
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.
story-architect-mcp
A Next-Gen Model Context Protocol (MCP) Server for AI-Assisted Novel Writing, Worldbuilding, Continuity Auditing, and Novel Project Architecture.
📖 Overview & Philosophy
Writing long-form fiction (epics, thrillers, fantasy sagas, or multi-volume series) presents severe context window, structural, and continuity challenges for AI assistance. As manuscripts grow to tens or hundreds of thousands of words, AI models easily lose track of lore details, character arcs, timeline chronologies, and stylistic tone.
story-architect-mcp solves this by applying the "Novels as Codebases" paradigm:
Manuscripts as Modules: Arcs and chapters organized into structured, modular directories.
Lore & Entities as Interfaces: Characters, locations, and magic/tech systems defined in standardized Markdown files with structured YAML frontmatter.
Plot Holes as Bugs / Lint Errors: Active tracking of unresolved plot holes, broken timeline logic, and unfired foreshadowing setups.
Synergy with
codebase-memory-mcp: Works seamlessly alongside knowledge-graph indexing servers to provide deep semantic graph queries across your entire story world.
Built on the latest Model Context Protocol (MCP) specification with a Stateless Architecture (storing transparent state in .story/), story-architect-mcp provides 20 MCP Tools, 6 Dynamic Resources, and 5 Guided Workflow Prompts.
Related MCP server: FastMCP Novel Processing Tool
✨ Key Capabilities
1. 🧹 Project Rescue & Auto-Refactoring
story_scan_messy_project: Automatically scans messy, unorganized novel directories, detects file encodings (UTF-8, Windows-1252, etc.), computes content similarity matrices, and classifies files intoManuscript,Notes,Lore, orOutlinewith confidence scores.story_auto_refactor_structure: Restructures loose files into a standardized novel project directory layout. Supports dry-run previews before committing changes.Snapshot & Rollback Protection: Automatically creates point-in-time project state snapshots (
story_snapshot) before refactoring, with one-click restoration (story_rollback).
2. 🔍 Continuity Auditing & Plot Hole Tracking
Plot Hole Manager: Log unresolved plot inconsistencies (
story_log_plot_hole) and track resolution statuses (story_resolve_plot_hole).Chekhov's Gun Tracker: Log setup details (
story_log_setup) and payoff moments (story_log_payoff) to ensure every planted detail is resolved.Timeline Conflict Detection: Analyzes absolute/relative dates, character ages, and event chronologies (
story_detect_timeline_conflicts), outputting interactive Mermaid Gantt charts.
3. 🧠 Graph Memory & Character Bible Integration
Entity Extraction: Automatically extracts characters and locations from chapter drafts into the
bible/folder with YAML frontmatter (story_extract_entities_to_bible).Relationship Matrix: Maps evolving inter-character relationships (allies, rivals, romance, enemies) over story progress into
.story/relationships.json(story_map_relationships).Context Budget Querying: Smart context extractor (
story_query_context) that combines knowledge graph traversal with vector search to build token-budget-optimized context packages for AI prompts.
4. 📈 Pacing, Voice & Analytics
Pacing Analysis: Measures Action / Dialogue / Description balance and scene tension curves (
story_analyze_pacing).Voice Drift Monitoring: Analyzes sentence length, vocabulary richness, and POV/tense compliance against your
.story/style_guide.jsonreference (story_analyze_voice).Writing Statistics: Real-time total word count, writing velocity tracking, and estimated completion dates (
story_stats).
5. ✍️ AI Writing Prompt Generator & Publishing
Context-Aware Prompt Generator: Assembles prior chapter summaries, active character profiles, outline notes, and style rules into ready-to-use LLM system prompts (
story_generate_writing_prompt).Multi-Format Export: Compiles manuscript files into single Markdown, EPUB, PDF, or DOCX formats with customizable front matter and table of contents (
story_export).
📁 Standardized Project Layout
story-architect-mcp initializes or refactors novel projects into the following clean architecture:
my-epic-novel/
├── .cbm/ # Knowledge graph cache (codebase-memory-mcp)
├── .story/ # Project metadata & transparent state
│ ├── config.json # Project configuration (Title, Author, Genre, POV, Tense)
│ ├── status.json # Progress tracking, word counts, target completion
│ ├── timeline.json # Absolute & relative event timelines
│ ├── unresolved_holes.json # Active plot hole registry
│ ├── relationships.json # Dynamic character relationship graph
│ ├── foreshadowing.json # Chekhov's gun tracker (Setups & Payoffs)
│ ├── style_guide.json # Voice, tone, sentence constraints, reference excerpts
│ └── snapshots/ # Version snapshots for rollback protection
├── bible/ # Story Bible & Worldbuilding Lore
│ ├── characters/ # Character profiles with YAML frontmatter
│ ├── world/ # Locations, factions, history, lore
│ └── subplots/ # Subplot tracking & arc objectives
├── manuscript/ # Official Manuscript Drafts
│ ├── arc_01/
│ │ ├── ch_001.md
│ │ └── ch_002.md
├── drafts_raw/ # Loose, unorganized writing snippets
└── outline/ # Master Outline & Chapter Beats
├── synopsis.md # High-level story synopsis
├── themes.md # Core themes & motifs
└── arc_01/
├── overview.md # Arc summary
└── ch_001_outline.md # Detailed scene beats per chapter🚀 Quick Start
Installation
Install globally or locally via npm:
npm install -g story-architect-mcpOr build directly from source:
git clone https://github.com/PTCuong-1102/story-architect-mcp.git
cd story-architect-mcp
npm install
npm run build⚙️ MCP Client Configuration
Add story-architect-mcp to your MCP client configuration (e.g., Claude Desktop, Cursor, Antigravity, Windsurf).
Note: Bạn không cần truyền đường dẫn dự án qua args nữa. Sau khi server khởi động, AI agent sẽ tự động gọi tool
story_set_projectđể trỏ đến dự án mong muốn.
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"story-architect": {
"command": "npx",
"args": ["-y", "story-architect-mcp"]
}
}
}Local Build Execution
{
"mcpServers": {
"story-architect": {
"command": "node",
"args": ["dist/index.js"]
}
}
}(Optional) Truyền đường dẫn mặc định qua CLI arg
Nếu muốn, bạn vẫn có thể truyền đường dẫn dự án qua CLI arg để thiết lập mặc định khi server khởi động:
{
"mcpServers": {
"story-architect": {
"command": "npx",
"args": ["-y", "story-architect-mcp", "/path/to/your/novel-project"]
}
}
}Dù đã truyền arg, bạn vẫn có thể chuyển sang dự án khác runtime bằng story_set_project.
🛠️ MCP Primitives Reference
1. MCP Tools (20 Tools)
Tool Name | Parameters | Description |
|
| Sets or switches the target novel project directory at runtime. No server restart needed. |
| none | Returns info about the currently targeted project (path, init status, word count, etc.). |
|
| Initializes project directory with template ( |
|
| Scans directory, detects encoding/similarity, and classifies unorganized files. |
|
| Refactors messy project files into standard directory layout (supports dry-run). |
|
| Creates a point-in-time state backup in |
|
| Restores project state to a designated snapshot. |
|
| Registers an unresolved plot hole or contradiction. |
|
| Marks a plot hole as resolved or dismissed. |
|
| Logs a foreshadowing setup (Chekhov's Gun). |
|
| Marks a foreshadowing setup as paid off. |
|
| Extracts new characters/locations into |
|
| Builds/updates character relationship matrix across chapters. |
|
| Extracts context package using graph memory + vector search. |
|
| Audits chronology for conflicts & outputs Mermaid Gantt timeline. |
|
| Computes Action/Dialogue/Description ratio and tension curve. |
|
| Checks sentence length, vocabulary, and voice drift against style guide. |
|
| Assembles context-rich LLM writing system prompt. |
| none | Computes total word counts, writing velocity, and completion progress. |
|
| Exports manuscript to single Markdown, EPUB, PDF, or DOCX. |
2. MCP Resources (6 Dynamic Resources)
Resource URI | Description |
| Live project progress, word counts, and completion status. |
| Project configuration settings (Genre, POV, Tense, Target Word Count). |
| Story timeline events and chronological entries. |
| Unresolved plot holes and continuity warnings. |
| Unfired foreshadowing setups and resolution tracking. |
| Current character relationship matrix and entity states. |
3. MCP Workflow Prompts (5 Prompts)
write-next-chapter: Gathers lore, preceding chapter text, outline beats, and style rules into an optimized writing prompt.character-deep-dive: Aggregates a character's Bible entry alongside all scene appearances across the manuscript.continuity-audit: Runs a full arc scan to detect timeline errors, term inconsistencies, and unresolved setups.rescue-project: Step-by-step guided workflow for scanning, previewing, and refactoring chaotic manuscript folders.brainstorm-scene: Generates 3-5 distinct scene execution directions based on current outline and plot state.
🛡️ Data Safety & Dry-Run Protocol
story-architect-mcp prioritizes manuscript data integrity:
Dry-Run First (
confirm: false): All destructive or structural refactoring tools run in Preview mode by default. You can inspect exact proposed file moves and edits before confirming execution (confirm: true).Automated Pre-Refactor Snapshots: Executing structural changes automatically triggers
story_snapshotto create a rollback checkpoint prior to file operations.
🤝 Contributing
Contributions, bug reports, and feature requests are welcome!
Fork the repository
Create your feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add some amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
📄 License
Distributed under the MIT License. See LICENSE for more information.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityFmaintenanceA Model Context Protocol server that manages character knowledge and relationships for creative writing projects, offering semantic search and AI-powered analysis.Last updated4MIT
- Alicense-qualityDmaintenanceAn MCP server for intelligent novel processing that enables precise token-based text segmentation and management of bulk rewriting tasks. It integrates with the Cursor editor to facilitate automated content transformation workflows and prompt management.Last updated2MIT
- Flicense-qualityDmaintenanceMCP server for managing a writer's bible, a structured and searchable knowledge base of a narrative universe with tools for characters, places, events, and semantic search.Last updated
- Alicense-qualityDmaintenanceAn MCP server that learns your writing style and helps AI assistants emulate your voice by ingesting samples, storing style profiles, and providing context for content generation.Last updated8MIT
Related MCP Connectors
MCP server for generating rough-draft project plans from natural-language prompts.
An MCP server that integrates with Discord to provide AI-powered features.
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/PTCuong-1102/story-architect-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server