@hanna84/mcp-writing 1.3.6 → 1.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +122 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.3.8](https://github.com/hannasdev/mcp-writing/compare/v1.3.7...v1.3.8) (2026-04-18)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Miscellaneous Chores
|
|
7
|
+
|
|
8
|
+
* enable auto-merge for Release Please version PRs ([#24](https://github.com/hannasdev/mcp-writing/issues/24)) ([07981af](https://github.com/hannasdev/mcp-writing/commit/07981af84c4029cb25aef1947f301eb172df3d3a))
|
|
9
|
+
|
|
10
|
+
## [1.3.7](https://github.com/hannasdev/mcp-writing/compare/v1.3.6...v1.3.7) (2026-04-18)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Miscellaneous Chores
|
|
14
|
+
|
|
15
|
+
* **ci:** remove npm whoami diagnostic step ([65435e9](https://github.com/hannasdev/mcp-writing/commit/65435e9c8cfa829ceb6937904250c46afc45b54c))
|
|
16
|
+
|
|
3
17
|
## [1.3.6](https://github.com/hannasdev/mcp-writing/compare/v1.3.5...v1.3.6) (2026-04-18)
|
|
4
18
|
|
|
5
19
|
|
package/README.md
CHANGED
|
@@ -18,6 +18,20 @@ Instead of feeding an entire manuscript to an AI and hoping it fits in the conte
|
|
|
18
18
|
- AI-assisted editing workflows where you want targeted context retrieval instead of full-manuscript prompting.
|
|
19
19
|
- Projects that need traceable, reversible edits with metadata that stays synchronized as drafts evolve.
|
|
20
20
|
|
|
21
|
+
## Prerequisites
|
|
22
|
+
|
|
23
|
+
- **Node.js 22.6.0 or later** (required for SQLite support via `--experimental-sqlite` flag)
|
|
24
|
+
- **npm 8.0.0 or later**
|
|
25
|
+
- **Git** (for edit snapshots and version history)
|
|
26
|
+
|
|
27
|
+
Verify your setup:
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
node --version # should be v22.6.0 or later
|
|
31
|
+
npm --version # should be 8.0.0 or later
|
|
32
|
+
git --version # should be installed
|
|
33
|
+
```
|
|
34
|
+
|
|
21
35
|
## Quick start with Scrivener
|
|
22
36
|
|
|
23
37
|
If you write in [Scrivener](https://www.literatureandlatte.com/scrivener), you can seed `mcp-writing` from a Scrivener external-sync export for scene prose, then curate non-draft content directly into the target folder structure.
|
|
@@ -45,6 +59,14 @@ Non-draft content is not inferred from `Notes/`. Put it directly into the target
|
|
|
45
59
|
WRITING_SYNC_DIR=/path/to/sync-dir DB_PATH=./writing.db npm start
|
|
46
60
|
```
|
|
47
61
|
|
|
62
|
+
You should see:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
Listening on port 3000
|
|
66
|
+
Sync dir: /path/to/sync-dir
|
|
67
|
+
Database: ./writing.db
|
|
68
|
+
```
|
|
69
|
+
|
|
48
70
|
Then call the `sync` tool once to index everything.
|
|
49
71
|
|
|
50
72
|
### 4. Lint your metadata (optional)
|
|
@@ -279,6 +301,27 @@ npm install
|
|
|
279
301
|
WRITING_SYNC_DIR=./my-manuscript DB_PATH=./writing.db npm start
|
|
280
302
|
```
|
|
281
303
|
|
|
304
|
+
The `npm start` script automatically includes the `--experimental-sqlite` flag needed for SQLite support in Node.js 22+.
|
|
305
|
+
|
|
306
|
+
## Verify your setup
|
|
307
|
+
|
|
308
|
+
After starting the server, test that it's working:
|
|
309
|
+
|
|
310
|
+
```sh
|
|
311
|
+
# In a new terminal
|
|
312
|
+
curl http://localhost:3000/healthz
|
|
313
|
+
# Should return: ok
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
Then test the MCP endpoint:
|
|
317
|
+
|
|
318
|
+
```sh
|
|
319
|
+
curl http://localhost:3000/sse
|
|
320
|
+
# Should return a stream endpoint: /message?sessionId=<id>
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
If both return successfully, the server is ready to use.
|
|
324
|
+
|
|
282
325
|
## Development
|
|
283
326
|
|
|
284
327
|
```sh
|
|
@@ -292,6 +335,85 @@ Unit tests use an in-memory SQLite database and temporary directories — no ser
|
|
|
292
335
|
|
|
293
336
|
For real projects, keep your manuscript sync folder outside this tool repository and point `WRITING_SYNC_DIR` at that external path.
|
|
294
337
|
|
|
338
|
+
## Troubleshooting
|
|
339
|
+
|
|
340
|
+
### "Module not found: sqlite" or "Database support not available"
|
|
341
|
+
|
|
342
|
+
**Cause:** Node.js version is below 22.6.0 or the `--experimental-sqlite` flag was not passed.
|
|
343
|
+
|
|
344
|
+
**Solution:**
|
|
345
|
+
1. Check your Node.js version: `node --version` (should be v22.6.0+)
|
|
346
|
+
2. Update Node.js if needed: use nvm, homebrew, or download from nodejs.org
|
|
347
|
+
3. Restart with `npm start` (which includes the flag automatically)
|
|
348
|
+
|
|
349
|
+
### "EADDRINUSE: address already in use :::3000"
|
|
350
|
+
|
|
351
|
+
**Cause:** Port 3000 is already in use by another application.
|
|
352
|
+
|
|
353
|
+
**Solution:**
|
|
354
|
+
Use a different port:
|
|
355
|
+
|
|
356
|
+
```sh
|
|
357
|
+
HTTP_PORT=3001 WRITING_SYNC_DIR=./my-manuscript DB_PATH=./writing.db npm start
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
Then update your MCP client config to use `http://localhost:3001/sse`.
|
|
361
|
+
|
|
362
|
+
### "ENOENT: no such file or directory, open './writing.db'"
|
|
363
|
+
|
|
364
|
+
**Cause:** The directory for `DB_PATH` does not exist.
|
|
365
|
+
|
|
366
|
+
**Solution:**
|
|
367
|
+
Create the directory first:
|
|
368
|
+
|
|
369
|
+
```sh
|
|
370
|
+
mkdir -p $(dirname ./writing.db) # if using a subdirectory
|
|
371
|
+
WRITING_SYNC_DIR=./my-manuscript DB_PATH=./writing.db npm start
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
Or use an absolute path:
|
|
375
|
+
|
|
376
|
+
```sh
|
|
377
|
+
WRITING_SYNC_DIR=~/my-manuscript DB_PATH=~/writing-data/writing.db npm start
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
### "Sync dir not found: ./my-manuscript"
|
|
381
|
+
|
|
382
|
+
**Cause:** The `WRITING_SYNC_DIR` path does not exist.
|
|
383
|
+
|
|
384
|
+
**Solution:**
|
|
385
|
+
Create the sync folder first:
|
|
386
|
+
|
|
387
|
+
```sh
|
|
388
|
+
mkdir -p ./my-manuscript/projects/my-novel
|
|
389
|
+
WRITING_SYNC_DIR=./my-manuscript DB_PATH=./writing.db npm start
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
Or point to an existing folder where you've already placed scene files.
|
|
393
|
+
|
|
394
|
+
### "Import failed: unrecognized format"
|
|
395
|
+
|
|
396
|
+
**Cause:** The Scrivener export format was not plain text (`.txt`) or the folder structure is unexpected.
|
|
397
|
+
|
|
398
|
+
**Solution:**
|
|
399
|
+
1. In Scrivener, re-export with **File → Sync → With External Folder**
|
|
400
|
+
2. Ensure the format is set to **Plain text** (not RTF or .docx)
|
|
401
|
+
3. Verify the export folder has a `Draft/` subdirectory with `.txt` files
|
|
402
|
+
4. Try the import again: `node scripts/import.js ~/my-novel-txt /path/to/sync-dir --project my-novel`
|
|
403
|
+
|
|
404
|
+
### Tests fail after updating Node.js
|
|
405
|
+
|
|
406
|
+
**Cause:** SQLite module cache may be stale.
|
|
407
|
+
|
|
408
|
+
**Solution:**
|
|
409
|
+
Clear npm cache and reinstall:
|
|
410
|
+
|
|
411
|
+
```sh
|
|
412
|
+
rm -rf node_modules package-lock.json
|
|
413
|
+
npm install
|
|
414
|
+
npm test
|
|
415
|
+
```
|
|
416
|
+
|
|
295
417
|
## Environment variables
|
|
296
418
|
|
|
297
419
|
| Variable | Default | Description |
|