novel-writer-mcp
# novel-writer-mcp
**v0.2.0** — 网文结构引擎 MCP:项目管理、场景 checklist、伏笔台账、draw.io 导入、推进建议、正文关联与 Task Master PRD 导出。
> MCP 是「结构秘书」,不替写正文。程序与小说数据分离,支持双工作区布局。
## 快速开始
```bash
git clone <your-repo-url> novel-writer-mcp
cd novel-writer-mcp
npm install
npm run build
```
1. 复制 [`.cursor/mcp.json.example`](.cursor/mcp.json.example) 为 `.cursor/mcp.json`(或写入全局 Cursor MCP 配置)
2. 将 `<MCP_ROOT>` 换成本仓库路径,`<WRITING_ROOT>` 换成你的小说数据目录
3. 在 Cursor 中重载 MCP
**验收**:在对话中说「调用 `list_profiles`」或「`get_project`,`project_id` 为 `_example`」。
## 文档
| 文档 | 说明 |
|------|------|
| [快速开始](docs/getting-started.md) | 安装、配置、首次 tool 调用 |
| [架构说明](docs/architecture.md) | 引擎 vs 数据、环境变量 |
| [双工作区布局](docs/workspace-setup.md) | MCP 仓 vs 写作仓 |
| [Cursor 配置](docs/cursor-config.md) | mcp.json 详解 |
| [写作工作流](docs/workflow.md) | 从脑洞到连载 |
| [无限流 walkthrough](docs/workflow-infinite-flow.md) | 副本章、constraints |
| [线性史诗 walkthrough](docs/workflow-linear-saga.md) | 记忆点、代际伏笔 |
| [与 AI 协作](docs/ai-collaboration.md) | 防发散、对话模板 |
| [工具参考](docs/tools-reference.md) | 20 tools + 参数 |
| [Profile 模板](docs/profiles.md) | 无限流 / 线性史诗 |
| [draw.io 指南](docs/drawio-guide.md) | 标签与嵌套容器 |
| [伏笔管理](docs/foreshadowing.md) | 登记→回收 |
| [Task Master 联动](docs/taskmaster-integration.md) | PRD 导出 |
| [数据模型](docs/data-schema.md) | JSON schema |
| [版本升级](docs/upgrading.md) | 兼容性 |
| [发布指南](docs/publishing.md) | GitHub / npm |
## 示例
内置示例项目 [`novels/_example/`](novels/_example/)(无限流,ch1 `kind: dungeon`)。
## 开发
```bash
npm run build
npm test
```
详见 [CONTRIBUTING.md](CONTRIBUTING.md)。
## License
[MIT](LICENSE)
TDQS
Scored across 21 tools
Every tool targets a distinct resource/action: project CRUD+pacing, chapter/scene editing, foreshadow lifecycle, import/export, and manuscript linking. No two tools appear to do the same thing; even similar getters differ by scope (scene vs chapter, open vs due foreshadows).
All tool names use snake_case with a consistent verb_noun pattern (create_project, get_scene_checklist, pay_off_foreshadow). Minor variation like 'hint_foreshadow_again' still follows the same verb-first convention and remains predictable.
21 tools is on the heavier side but justified by the multi-faceted domain (project setup, chapter/scene management, foreshadowing, import/export). Each tool has a specific role, so the count does not feel bloated.
Covers the full novel-writing workflow: project initialization, chapter/scene breakdown, checklist validation, foreshadow tracking, outline import, and PRD export. Minor gaps like delete/archive operations are absent but not critical for the core creative process.