Get the FREE Ultimate OpenClaw Setup Guide →

fiction-forge

Prose pattern scanner + MCP context server for editing AI-assisted novels. Detects 24 AI writing fingerprints. Battle-tested on 286k words.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio geobond13-fiction-forge python -m tools.fiction_mcp \
  --env OPENAI_API_KEY="OpenAI API key (optional for DALL-E/AI-assisted features)" \
  --env CLAUDE_CODE_API_KEY="Claude Code API key (optional for Claude Code integration)" \
  --env CLAUDE_CODE_ENDPOINT="Claude Code API endpoint (optional)"

How to use

fiction-forge is an MCP context server that powers Claude Code integration for the AI-assisted novel writing workflow. It exposes a set of tools through a single MCP server, including the Prose Scanner for identifying overused patterns, a story bible and continuity context, a publishing helper to generate formats from markdown, and an image generator integration. When running (and connected to Claude Code), the server provides real-time access to your story bible, character profiles, foreshadowing threads, and editing guidance while you work through drafts. This enables parallel-agent editorial passes where multiple AI agents collaborate on different chapters without losing coherence to a shared reference like your bible and continuity rules. To use it, launch the server (via the Python module path defined in the configuration) and connect Claude Code to the running MCP server. The included Prose Scanner can be triggered to scan chapters for pattern issues, and the Publisher tool can convert chapters into EPUB, PDF, or HTML formats with typography and cover handling. The Image Generator can batch-create illustrations using DALL-E 3, with manifest tracking to manage outputs.

How to install

Prerequisites:

  • Python 3.11 or newer
  • Git
  • (Optional) pandoc for EPUB/HTML generation and xelatex for PDF generation

Installation steps:

  1. Clone the repository git clone https://github.com/geobond13/fiction-forge.git cd fiction-forge

  2. Create and activate a virtual environment python -m venv venv

    On Windows

    venv\Scripts\activate

    On macOS/Linux

    source venv/bin/activate

  3. Install dependencies pip install -r requirements.txt

  4. Prepare environment variables (optional but recommended if using AI features)

    • Create a local environment file or export variables: export OPENAI_API_KEY="your_openai_api_key" export CLAUDE_CODE_API_KEY="your_claude_code_api_key" export CLAUDE_CODE_ENDPOINT="https://api.your-claude-code-endpoint"
  5. Run the MCP server (as defined in mcp_config) python -m tools.fiction_mcp

  6. Verify startup and connect Claude Code or any MCP client to the running server.

Notes:

  • The Quick Start section of the project suggests installing dependencies via pip and then starting the server; you may also need to ensure pandoc and optional LaTeX tooling are installed if you plan to generate EPUB/PDF outputs.
  • If you prefer to run the server directly from a script, you can adapt to python tools/fiction_mcp.py depending on your environment.

Additional notes

Tips and considerations:

  • Keep your story bible and continuity files up to date in reference/ for best results from the MCP context server.
  • The Prose Scanner outputs severity scores and can guide editing waves; use it to plan iterative improvements across chapters.
  • For publishing formats, ensure pandoc is installed; for PDF outputs, LaTeX (xelatex) is recommended but optional.
  • If you encounter API key errors, verify environment variables are loaded in the shell or IDE session running the MCP server.
  • The server is designed to work with Claude Code and parallel-agent workflows; ensure your workflow docs reflect the multi-agent steps for coherence.

Related MCP Servers

Sponsor this space

Reach thousands of developers