denova-mcp
用你自己已订阅的任意 AI Agent / Harness 平台(Claude Code、Cursor、TraeWork、Cline……)为 Denova 写小说。 Drive Denova, the open-source AI novel-writing & AI-RPG platform, from your own AI agents / harnesses via MCP.
Power your agent
Install from the publisher. Not a PlugMCP endpoint.
Host a copy with our keys and logs.
No packaged release in the registry yet. Follow the repository README.
Remote URL or a command on your machine? How the two installs differ
Run on PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
LaunchFrom the publisher
用你自己已订阅的任意 AI Agent / Harness 平台(Claude Code、Cursor、TraeWork、Cline……)为 Denova 写小说。 Drive Denova, the open-source AI novel-writing & AI-RPG platform, from your own AI agents / harnesses via MCP.
MCP server for Denova — the open-source AI novel-writing & AI-RPG platform. Drive Denova's workspaces (projects, chapters, outline, lore, character states, progress, config) from any AI agent/harness via MCP.
denova-mcp 是一个 Model Context Protocol (MCP) 服务器,让任何 MCP 客户端(AI Agent 软件 / HaaS 平台)能够直接读取和写入 Denova 的作品数据——作品、章节、大纲、进度、角色状态、资料库(lore)、配置、Skills、自动化任务与 Git 版本。
不需要 Denova 进程在运行,不需要掌握 Denova 内部 API:MCP 直连 Denova 的数据目录(文件系统),与 Denova 内置 agent 使用的工具协议(read_file / write_file / read_lore_items …)完全一致。
┌────────────────────┐ MCP(stdio) ┌─────────────────────┐
│ 你的 AI Agent │ ◄────────────────────► │ denova-mcp 服务器 │
│ (Claude Code / │ └──────────┬──────────┘
│ Cursor / TraeWork │ │ 直接读写文件
│ / 任意 HaaS 平台) │ ▼
└────────────────────┘ ┌─────────────────────┐
│ Denova 数据目录 │
│ books.json / projects
└─────────────────────┘
Denova 是一款开源 AI 小说创作平台,自带 AI Agent(写作 Agent、互动 Agent 等)。但 Denova 内置 Agent 只接受 你自己的模型 API 密钥。
如果你在某个 AI 平台(如 TraeWork、Cursor、Claude Code 等)订阅了会员 / 购买了大量 Credit,而这些 Credit 无法以 API 密钥的形式填入 Denova——
换句话说:Denova 负责"存储与组织",你的 AI Agent 负责"思考与生成",MCP 是两者之间的桥。
ch00001-标题.md,自动识别「卷」目录或平铺布局)config.toml(API 密钥强制脱敏,绝不外泄明文密钥)内置 29 个工具(denova_ 前缀):
projects.json、projects/、stores/ 与 agents/;兼容旧版 books.json)git clone <your-repo-url> denova-mcp
cd denova-mcp
npm install
npm run build # 产出 dist/index.js
无需准备环境变量即可构建;运行时才需要
DENOVA_DIR(见下)。
MCP 需要知道你的 Denova 数据目录——即包含 books.json 的那一层。二选一:
方式 A —— 环境变量 DENOVA_DIR(推荐)
DENOVA_DIR = /path/to/denova/.denova
Windows 示例:
DENOVA_DIR = D:\DenovaData\.denova
方式 B —— 项目内配置文件 .denova-mcp.json
在 MCP 客户端的工作目录放置:
{ "denovaDir": "/path/to/denova/.denova" }
可用 denova_health 工具验证配置是否正确。
MCP 服务器走 stdio 传输,启动命令为:
node <absolute-path>/dist/index.js
claude_desktop_config.json){
"mcpServers": {
"denova": {
"command": "node",
"args": ["/absolute/path/to/denova-mcp/dist/index.js"],
"env": { "DENOVA_DIR": "/path/to/denova/.denova" }
}
}
}
{
"mcpServers": {
"denova": {
"command": "node",
"args": ["D:\\path\\to\\denova-mcp\\dist\\index.js"],
"env": { "DENOVA_DIR": "D:\\DenovaData\\.denova" },
"disabled": false
}
}
}
接入后调用 denova_health 应返回类似:
DENOVA_DIR = D:\DenovaData\.denova
作品数 = 2
当前作品 = 示例作品名
denova_get_project_context 获取作品全景(CREATOR.md / 大纲 / 进度 / 角色状态 / 资料库索引 / 章节列表);或按需 denova_read_outline / denova_read_progress / denova_read_character_states / denova_list_lore_items / denova_read_skill(continue)。denova_read_chapter 读最近两章;涉及既有设定时用 denova_read_lore_items 加载条目详情。denova_write_chapter(可用 path 精确指定章节,或让工具自动命名)。denova_write_progress 更新进度与摘要、denova_write_character_states 同步角色状态;仅当长期设定发生明确变化才用 denova_write_lore_items 更新资料库。denova_create_version 创建 Git 快照。denova-mcp 直接操作以下 Denova 文件结构:
<denova 数据目录>/
├── projects.json # 作品注册表(0.4.x,v5:当前作品 + 作品列表 + store 映射)
├── books.json # 作品注册表(旧版兼容)
├── config.toml # 用户级配置(含模型/密钥 → MCP 脱敏读取)
├── agents/ # Agent 配置文件(0.4.x)
│ ├── main/*.toml # 主 Agent(writing / game …)
│ ├── custom/*.toml # 自定义 Agent
│ └── subagents/*.toml # 子 Agent
├── stores/
│ └── <store_dir>/automations/tasks.json # 自动化任务(0.4.x)
└── projects/
└── <书名>/
├── chapters/ # 章节正文(markdown,可平铺或按卷分组)
│ ├── ch00001-标题.md
│ └── v00001-第1卷/
├── setting/ # 创作元数据
│ ├── outline.md # 大纲 / 世界观
│ ├── progress.md # 写作进度 + 章节摘要
│ └── character-states.md # 角色当前状态
├── CREATOR.md # 全书创作说明 / 写作约定
├── ideas.md # 点子
└── .denova/ # 旧版自动化任务等(兼容读取)
├── lore/items.json # 资料库(稳定设定,version2)
├── automations/tasks.json
└── config.toml # 作品级配置
npm run typecheck # 类型检查
npm run build # 编译到 dist/
npm run dev # 以 tsx 直接运行源码
node scripts/smoke.mjs # 冒烟测试(真实目录只读 + 临时目录写入)
denova-mcp/
├── src/
│ ├── index.ts # MCP 服务器入口 + 29 个工具注册
│ ├── denova.ts # Denova 文件系统客户端(发现/章节/资料库/版本/配置)
│ └── toml.ts # 最小 TOML 解析 + 密钥脱敏
├── scripts/
│ └── smoke.mjs # stdio JSON-RPC 冒烟测试
├── package.json
└── tsconfig.json
denova_read_config 对 openai_api_key / api_key / token / secret 等领域强制脱敏,返回值中不会出现明文密钥。denova_write_file 会拒绝指向作品目录之外的真实路径。Q:Denova 需要正在运行吗? A:不需要。denova-mcp 直接读写数据目录,Denova 进程不参与。
Q:为什么不在 MCP 里调用 Denova 内置 AI Agent? A:这超出了"数据层直连"的定位。denova-mcp 定位于让你自己的 AI Agent 完成生成与写入,从而绕开 Denova 自带 Agent 对模型/密钥的依赖。若需 Denova 内置引擎能力(互动模式/TRPG、图像生成等),属于另一层面的集成方向。
Q:章节为什么有时候平铺、有时候进卷目录?
A:这是 Denova 自身的布局策略——若作品已有章节在子目录(卷)中,新章节自动归入对应卷目录;否则平铺在 chapters/ 下。工具自动适配,无需手工指定。
欢迎提交 Issue 与 PR:
denova_ 前缀)npm run build 与 node scripts/smoke.mjs 确保通过License: Apache-2.0
Disclaimer:本 MCP 为独立开源项目,与 Denova 官方无隶属关系。}
MCP server for Denova — the open-source AI novel-writing & AI-RPG platform. Drive Denova's workspaces (projects, chapters, outline, lore, character states, progress, config) from any AI agent/harness
Overview
MCP server for Denova — the open-source AI novel-writing & AI-RPG platform. Drive Denova's workspaces (projects, chapters, outline, lore, character states, progress, config) from any AI agent/harness via MCP.
Tools
No tool list yet. Remote servers get one after the first health check.
FAQ
Copy the stdio config for Cursor, Claude Desktop, Claude Code, or VS Code on this page. It uses the publisher's install, not a PlugMCP proxy.
No required environment variable is listed on this record.
DenoVA runs locally over stdio.
Last checked 2026-10-26. MCP server for Denova — the open-source AI novel-writing & AI-RPG platform. Drive Denova's workspaces (projects, chapters, outline, lore, character states, progress, config) from any AI agent/harness via MCP.