Skip to content

Thank you + offering bug fixes from my fork #1

@david-cilluffo

Description

@david-cilluffo

Hi David,

I wanted to reach out to say thank you for creating scrivener-mcp! I'm a writer using Scrivener and your project was exactly what I needed to integrate AI assistants with my workflow.

I've been using and extending your code, and in the process found and fixed a few bugs that I'd be happy to contribute back if you're interested:

Bugs Fixed

1. RTF formatting lost in grouped syntax

Text styles (italic, bold, underline) were being lost when using grouped RTF syntax like {\i text}.

Root cause: In rtf-interpreter.js, when a group ends, addContent() is called on each item, which overwrites node.style with the parent's style instead of preserving the child's style.

Fix: Push items directly to doc.content instead of re-calling addContent().

2. \par vs \pard confusion

\pard (paragraph defaults) was being partially matched as \par (paragraph break), leaving stray 'd' characters in output.

3. Em-dash/en-dash extra spaces

\emdash and \endash weren't consuming the optional trailing space, resulting in extra spaces in output.

My Fork

I've created a simplified fork at TwelveTake-Studios/scrivener-mcp (not yet published) that:

  • Fixes the above bugs
  • Adds a markdown-to-RTF writer for round-trip editing
  • Removes Redis/Neo4j dependencies (runs standalone)
  • Includes 47 unit tests

I'm happy to submit PRs for any/all of these fixes, share the code for you to integrate however you'd like, or simply maintain my fork separately if you prefer. Let me know what works best for you!

Thanks again for the great foundation.

Dave Cilluffo (d.cilluffo@gmail.com)
TwelveTake Studios

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions