by dcondrey
Enables Claude AI to manipulate Scrivener projects, perform file and folder operations, manage metadata, and conduct AI‑driven content analysis and enhancement directly within the writing environment.
Scrivener MCP Server provides a Model Context Protocol interface that lets Claude (and other AI agents) interact with Scrivener 3 projects. It exposes operations for opening projects, reading and writing documents, managing the binder hierarchy, handling RTF formatting, and storing rich semantic memory—all without external services such as Redis.
npm install -g scrivener-mcp
npx):
npx scrivener-mcp
claude_desktop_config.json:
{
"mcpServers": {
"scrivener": {
"command": "npx",
"args": ["scrivener-mcp"]
}
}
}
open_project('/path/to/Novel.scriv');
const txt = read_document('UUID-OF-DOCUMENT');
const analysis = deep_analyze_content('UUID-OF-DOCUMENT');
enhance_content('UUID-OF-DOCUMENT', 'strengthen-verbs');
deep_analyze_content on each document to receive readability metrics, pacing heatmaps, and cliché reports.semantic_search.enhance_content across a list of document IDs before a final export.extract_research_data.Q: Do I need Redis or any external queue? A: No. The server includes an embedded queue system, so installation is all that is required.
Q: Which Node version is required?
A: Node 18+ (the package declares engines with Node 18 or later).
Q: Can I run the server without an API key? A: Yes. Core features work offline; AI‑powered analysis and enhancement require an external LLM provider key, which can be supplied via environment variables if desired.
Q: How is the Holographic Memory accessed?
A: Through the hhm/* tool namespace (e.g., semantic_search, hhm/memorize/text, hhm/dream). All calls are JSON‑RPC calls handled by the same MCP server.
Q: What if automatic Claude Desktop configuration fails? A: Run the setup script manually:
npx scrivener-mcp setup
or add the configuration snippet shown above to claude_desktop_config.json.
Q: Is the server compatible with Windows/macOS/Linux? A: Yes. It is a pure Node.js package with optional Rust native bindings that compile on all major OSes.
Q: How do I back up my project memory?
A: Use export_project_memory to dump the full memory JSON, and import_memory to restore it later.
Q: Can I query the underlying SQLite database directly?
A: Yes, via the query_database tool or by opening the .scrivener-databases/scrivener.db file with any SQLite client.
A powerful Model Context Protocol (MCP) server that enables Claude AI to seamlessly interact with Scrivener projects. This server provides comprehensive document management, AI-powered content analysis, and advanced writing assistance capabilities - all without requiring external services like Redis.
v0.4.0 - Major reliability and performance update. See CHANGELOG.md for details.
npm install -g scrivener-mcp
✨ Features:
If automatic setup didn't work, you can manually configure:
# Run the setup script
npx scrivener-mcp setup
# Or manually add to claude_desktop_config.json:
{
"mcpServers": {
"scrivener": {
"command": "npx",
"args": ["scrivener-mcp"]
}
}
}
# Remove the package and configuration
npm uninstall -g scrivener-mcp
.scriv projectsThe MCP server provides 75+ powerful tools for comprehensive Scrivener integration:
open_project(path) - Open a Scrivener projectget_structure(options?) - Get the project's hierarchical structure
maxDepth (limit tree depth), folderId (get specific folder), includeTrash (include trash), summaryOnly (return counts only)get_document_info(documentId) - Get document metadata with full parent hierarchy and locationget_project_metadata() - Get project-level metadataread_document(documentId) - Read plain text contentread_document_formatted(documentId) - Read with RTF formatting preservedwrite_document(documentId, content) - Write content to documentget_document_annotations(documentId) - Get Scrivener annotationscreate_document(parentId?, title, type?) - Create new document or folderdelete_document(documentId) - Delete document or foldermove_document(documentId, newParentId?) - Move document to new locationupdate_metadata(documentId, metadata) - Update document metadatasearch_content(query, options?) - Search across all documents (excludes trash)get_word_count(documentId?) - Get word/character countslist_trash() - List all documents in the trash foldersearch_trash(query, options?) - Search only within trashed documentsrecover_document(documentId, targetParentId?) - Recover document from trashanalyze_document(documentId) - Deep AI-powered content analysisdeep_analyze_content(documentId) - Comprehensive writing metrics and suggestionscritique_document(documentId, focusAreas?) - Get constructive feedbackcompile_documents(documentIds, separator?, preserveFormatting?) - Compile multiple documentsenhance_content(documentId, enhancementType, options?) - Apply AI improvements
eliminate-filter-words, strengthen-verbs, vary-sentences, add-sensory-details, show-dont-tell, improve-flow, enhance-descriptions, strengthen-dialogue, fix-pacing, expand, condense, rewritesave_character_profile(name, role, description?, traits?, arc?) - Store character dataget_character_profiles() - Retrieve all character profilesupdate_style_guide(tone?, voice?, pov?, tense?) - Set writing preferencesget_style_guide() - Get current style guidesave_plot_thread(name, description, status?, documents?) - Track plot linesget_plot_threads() - View all plot threadsget_writing_stats() - Get project statisticsexport_project_memory() - Export complete memory dataget_all_documents(includeTrash?) - Get flat list of all documentssave_project() - Save any pending changes to the projectis_project_modified() - Check if project has unsaved changesread_document_rtf(documentId) - Read document with RTF formatting preservedupdate_document_context(documentId, summary?, themes?, pacing?) - Update document memory contextadd_custom_context(key, value) - Add custom context to project memoryget_custom_context(key?) - Get custom context from project memoryupdate_writing_session(wordsWritten, duration?) - Update writing session statisticsextract_research_data(html, keywords?) - Extract research data from web contentimport_memory(memoryData) - Import project memory from exported dataupdate_document_synopsis_notes(documentId, synopsis?, notes?) - Update synopsis and/or notes for a documentbatch_update_synopsis_notes(updates) - Update synopsis and/or notes for multiple documents at oncesemantic_search(query, k?, threshold?) - Find documents by semantic meaningfind_analogies(a, b, c) - Discover analogical relationships (A:B :: C:?)hhm/memorize/text(text, id?) - Store text in semantic memoryhhm/memorize/document(document) - Store document with structurehhm/memorize/relationship(subject, relation, object) - Store semantic relationshipshhm/query/text(text, k?) - Query memory with texthhm/query/analogy(a, b, c) - Find analogical completionshhm/concepts/generate() - Generate novel concept combinationshhm/dream(duration?) - Enter creative recombination modehhm/consistency/check(memoryIds) - Verify memory consistencyhhm/stats() - Get HHM system statisticshhm/benchmark/run(dimensions?) - Run performance benchmarkshhm/benchmark/gpu() - Test GPU acceleration capabilitieshhm/cache/clear() - Clear vector cachehhm/cache/stats() - Get cache performance metricsget_database_status() - Get status of SQLite and Neo4j databasesquery_database(query, params?) - Execute SELECT queries on SQLite databaseget_writing_statistics(days?) - Get writing statistics for specified periodrecord_writing_session(wordsWritten, durationMinutes?, documentsWorkedOn?, notes?) - Record a writing sessionanalyze_story_structure() - Analyze document flow, character arcs, and themes using Neo4jfind_character_relationships(characterId) - Find all relationships for a charactercreate_relationship(fromId, fromType, toId, toType, relationshipType, properties?) - Create relationships between entitiesget_content_analysis_history(documentId, analysisType?) - Get historical analysis databackup_databases(backupPath?) - Create backup of project databasesThis MCP server includes comprehensive RTF (Rich Text Format) support specifically designed for Scrivener's document format:
ScrivenerProject - Main class for project operationsRTFHandler - Comprehensive RTF parsing and generationDatabaseService - Manages SQLite and Neo4j database operationsMemoryManager - Persistent project memory and context storageContentAnalyzer - Deep writing analysis and metricsContentEnhancer - AI-powered content improvement engineHolographicMemorySystem - 10,000-dimensional semantic memory with GPU acceleration.scrivener-databases/scrivener.db within each project
.ai-memory folders for quick access// Open a project
open_project("/path/to/MyNovel.scriv")
// Get project structure
get_structure()
// Read a document
read_document("UUID-OF-DOCUMENT")
// Analyze content
deep_analyze_content("UUID-OF-DOCUMENT")
// Apply enhancements
enhance_content("UUID-OF-DOCUMENT", "strengthen-verbs")
// Update synopsis for a single document
update_document_synopsis_notes("UUID-OF-CHAPTER", {
synopsis: "Elizabeth meets Mr. Darcy at the assembly ball and takes an instant dislike to him.",
notes: "Important first impression scene - sets up central conflict"
})
// Batch update multiple documents
batch_update_synopsis_notes([
{
documentId: "UUID-OF-CHAPTER-1",
synopsis: "Introduction to Elizabeth and her family",
notes: "Character establishment chapter"
},
{
documentId: "UUID-OF-CHAPTER-2",
synopsis: "The Netherfield ball",
notes: "Major social event - introduces Bingley and Darcy"
}
])
// Check database status
get_database_status()
// Query documents with custom SQL
query_database("SELECT title, word_count FROM documents WHERE word_count > 1000")
// Record a writing session
record_writing_session({
wordsWritten: 1250,
durationMinutes: 45,
documentsWorkedOn: ["UUID-1", "UUID-2"],
notes: "Productive morning session"
})
// Get writing statistics
get_writing_statistics(30) // Last 30 days
// Analyze story structure (requires Neo4j)
analyze_story_structure()
// Find character relationships in graph
find_character_relationships("CHARACTER-UUID")
// Create document relationship
create_relationship(
"CHAPTER-1-UUID", "document",
"CHAPTER-2-UUID", "document",
"FOLLOWS"
)
// Save a character profile
save_character_profile({
name: "Elizabeth Bennet",
role: "protagonist",
description: "Intelligent and witty young woman",
traits: ["independent", "prejudiced", "romantic"],
arc: "Overcomes initial prejudice to find true love"
})
// Retrieve all characters
get_character_profiles()
// Set style guide
update_style_guide({
tone: ["witty", "romantic", "formal"],
voice: "Jane Austen-esque",
pov: "third-limited",
tense: "past"
})
// Apply style-aware enhancements
enhance_content("UUID", "match-style")
// Get comprehensive analysis
const analysis = deep_analyze_content("UUID")
// Returns metrics, suggestions, quality indicators, pacing analysis
// Get focused critique
critique_document("UUID", ["pacing", "dialogue"])
The server includes robust error handling for:
npm run dev # Development mode with hot reload
npm run build # Build TypeScript
npm run lint # ESLint
npm run typecheck # TypeScript checking
MIT © David Condrey
Contributions are welcome! Please feel free to submit a Pull Request.
If you find this project helpful, consider:
Please log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by modelcontextprotocol
A basic implementation of persistent memory using a local knowledge graph. This lets Claude remember information about the user across chats.
by topoteretes
Provides dynamic memory for AI agents through modular ECL (Extract, Cognify, Load) pipelines, enabling seamless integration with graph and vector stores using minimal code.
by basicmachines-co
Enables persistent, local‑first knowledge management by allowing LLMs to read and write Markdown files during natural conversations, building a traversable knowledge graph that stays under the user’s control.
by agentset-ai
Provides an open‑source platform to build, evaluate, and ship production‑ready retrieval‑augmented generation (RAG) and agentic applications, offering end‑to‑end tooling from ingestion to hosting.
by smithery-ai
Provides read and search capabilities for Markdown notes in an Obsidian vault for Claude Desktop and other MCP clients.
by chatmcp
Summarize chat messages by querying a local chat database and returning concise overviews.
by dmayboroda
Provides on‑premises conversational retrieval‑augmented generation (RAG) with configurable Docker containers, supporting fully local execution, ChatGPT‑based custom GPTs, and Anthropic Claude integration.
by qdrant
Provides a Model Context Protocol server that stores and retrieves semantic memories using Qdrant vector search, acting as a semantic memory layer.
by doobidoo
Provides a universal memory service with semantic search, intelligent memory triggers, OAuth‑enabled team collaboration, and multi‑client support for Claude Desktop, Claude Code, VS Code, Cursor and over a dozen AI applications.
{
"mcpServers": {
"scrivener": {
"command": "npx",
"args": [
"scrivener-mcp"
]
}
}
}claude mcp add scrivener npx scrivener-mcp