GitHunt

AI Novel Prompter

AI Novel Prompter is a comprehensive writing tool designed to help novelists create consistent, well-structured prompts for AI writing assistants while managing story elements and improving prose through AI-powered assistance.

๐Ÿš€ Key Features

๐Ÿ–ฅ๏ธ Desktop Application (Wails)

  • Story Element Management: Characters, locations, codex entries, rules, and sample chapters
  • Intelligent Prompt Generation: Optimized for ChatGPT and Claude with real-time preview
  • Prose Improvement Engine: Iterative text refinement with customizable AI prompts
  • Local Data Storage: All data saved locally with versioned storage system

AI Novel 1

๐Ÿ”— MCP Server Integration

  • Claude Desktop Integration: Direct access to your story data through Claude Desktop
  • Real-time Character/Location Access: Query and manage entities directly in Claude conversations
  • Configurable Logging: Debug character loading issues with detailed logging
  • Robust Data Validation: Prevents creation of incomplete or empty entities

AI Novel MCP 1

๐Ÿ“ฆ Installation & Setup

Desktop Application

# Clone the repository
git clone https://github.com/danielsobrado/ainovelprompter.git
cd ainovelprompter

# Install frontend dependencies
cd frontend
npm install
cd ..

# Development mode
wails dev

# Build for production
wails build

MCP Server for Claude Desktop

  1. Build the MCP Server:
cd mcp
go build -o ainovelprompter-mcp.exe ..\cmd\mcp-server\main.go
  1. Configure Claude Desktop (edit claude_desktop_config.json):
{
  "mcpServers": {
    "ai-novel-prompter": {
      "command": "C:\\path\\to\\ainovelprompter-mcp.exe",
      "args": [
        "--data-dir", "C:\\path\\to\\your\\story\\data",
        "--log-level", "INFO"
      ],
      "env": {}
    }
  }
}
  1. Restart Claude Desktop to load the MCP server

โš™๏ธ Configuration

MCP Server Options

Argument Short Description Default
--data-dir -d Data directory path ~/.ai-novel-prompter
--log-level -l Logging verbosity INFO
--help -h Show help message -

Log Levels

  • DEBUG: Detailed operation logging (for troubleshooting)
  • INFO: Standard operational logging (recommended)
  • WARN: Warnings and unexpected conditions only
  • ERROR: Errors only

Example Configurations

Development/Troubleshooting:

"args": ["--data-dir", "./test-data", "--log-level", "DEBUG"]

Production:

"args": ["--data-dir", "/path/to/story/data", "--log-level", "INFO"]

๐Ÿ›ก๏ธ Data Validation & Quality

Enhanced Validation System

  • Required Fields: All entities must have non-empty names and descriptions
  • Length Constraints: Names (1-200 chars), Descriptions (1-2000 chars)
  • Automatic Sanitization: Whitespace trimming and cleanup
  • Error Prevention: Cannot create incomplete entities

Validation Rules

  • โœ… Character names and descriptions required
  • โœ… Location names and descriptions required
  • โœ… Codex entry titles and content required
  • โœ… Automatic whitespace cleanup
  • โŒ Empty or whitespace-only entities rejected

๐ŸŽฏ Usage

Desktop Application

  1. Prompt Generation Tab:

    • Define task types (e.g., "Write Next Chapter", "Revise Chapter")
    • Manage story elements (characters, locations, rules, codex)
    • Generate AI-optimized prompts for ChatGPT or Claude
    • Real-time token counting and preview
  2. Prose Improvement Tab:

    • Configure LLM providers (Manual, LM Studio, OpenRouter)
      Providers 1
    • Apply customizable improvement prompts
      AI Novel Prose 1
    • Review and accept/reject AI suggestions
    • Live diff preview of changes
      AI Novel Prose 2

Claude Desktop Integration

Once configured, you can directly interact with your story data in Claude conversations:

# Get all characters
Show me my characters

# Search for specific characters
Find characters related to "magic"

# Get locations
What locations do I have in my story?

# Search locations
Show me locations in the forest

๐Ÿ”ง Technical Stack

Frontend

  • React with TypeScript
  • Tailwind CSS for styling
  • shadcn/ui components
  • Wails framework for desktop

Backend

  • Go with Wails bindings
  • MCP (Model Context Protocol) server
  • Versioned JSON storage system
  • Comprehensive validation layer

MCP Server

  • JSON-RPC 2.0 protocol
  • Stdio communication with Claude Desktop
  • Configurable logging system
  • Real-time data access

๐Ÿ“ Data Storage

Storage Format

~/.ai-novel-prompter/
โ”œโ”€โ”€ characters/
โ”‚   โ””โ”€โ”€ [character-id]/
โ”‚       โ”œโ”€โ”€ 2025-07-22T10-30-15.000+04-00.json
โ”‚       โ””โ”€โ”€ 2025-07-22T11-45-20.000+04-00.json
โ”œโ”€โ”€ locations/
โ”œโ”€โ”€ codex/
โ”œโ”€โ”€ rules/
โ”œโ”€โ”€ sample-chapters/
โ”œโ”€โ”€ task-types/
โ””โ”€โ”€ prose-prompts/

Features

  • Version History: Complete audit trail for all changes
  • Data Integrity: Individual files reduce corruption risk
  • Scalability: Better performance with large datasets
  • MCP Compatibility: Direct access through Claude Desktop

๐Ÿ› Troubleshooting

Character Loading Issues

  1. Enable Debug Logging:
"args": ["--log-level", "DEBUG"]
  1. Check Claude Desktop Logs for detailed error information

  2. Common Issues:

    • Invalid timestamps in filenames
    • Corrupted JSON files
    • Permission problems
    • Missing data directories

MCP Server Issues

  1. Verify Server Binary: Ensure ainovelprompter-mcp.exe is built with latest code
  2. Check Configuration: Verify paths and arguments in claude_desktop_config.json
  3. Restart Claude Desktop: Required after configuration changes
  4. Review Logs: Look for startup errors and connection issues

๐Ÿ“Š Recent Improvements

Version 0.1.0 Features

  • โœ… MCP Server Integration: Direct Claude Desktop access
  • โœ… Enhanced Logging: Configurable debug levels with performance tracking
  • โœ… Data Validation: Prevents incomplete entity creation
  • โœ… Improved Character Loading: Robust timestamp parsing and error handling
  • โœ… Command Line Interface: Flexible configuration options

Validation Enhancements

  • โœ… Frontend Validation: Immediate feedback with specific error messages
  • โœ… Backend Validation: Server-side validation with detailed errors
  • โœ… Automatic Sanitization: Whitespace trimming and cleanup
  • โœ… Length Constraints: Proper limits for names and descriptions

๐Ÿค Contributing

Contributions are welcome! Please feel free to:

  • Open issues for bugs or feature requests
  • Submit pull requests for improvements
  • Share feedback and suggestions

๐Ÿ“„ License

This project is licensed under the Attribution-NonCommercial-NoDerivatives (BY-NC-ND) license.
See: https://creativecommons.org/licenses/by-nc-nd/4.0/deed.en



Last Updated: July 2025 - MCP Integration & Validation Release

danielsobrado/ainovelprompter | GitHunt