Bun Novel Processor MCP
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mcp(Bun + MCP 标准 stdio)
这是一个基于 Bun 的 MCP 基础项目框架,使用标准 stdio 传输协议,适合接入 Claude Desktop / Cursor 等 MCP 客户端。
安装依赖
bun installRelated MCP server: Crystal MCP Server
启动方式
开发模式(热更新):
bun run dev标准启动:
bun run start当前内置工具
read_novel_line:按游标增量读取小说文本get_progress:获取已切分进度(下一章节号/下一游标)validate_chapter_draft:章节草稿质检(提示建议,不拦截)save_chapter:同时保存原文章节与清洗后章节,并写入元信息索引
小说文件放置
默认从 novels 目录读取文本文件:
/Users/tietiezhi/Project/mcp/novels例如小说名传 斗破苍穹,默认读取:
novels/斗破苍穹.txt也可通过环境变量覆盖目录:
NOVELS_DIR=/your/path bun run start工具入参
novel_name:小说名(或.txt文件名)cursor:起始字符索引(首次通常传0)max_lines:本次最多返回行数(可选,默认1,最大20)target_chars:本次目标读取字符数(可选,达到即停止,最大5000)返回包含
batch_text与batch_chars,方便智能体直接累计若文本无换行,工具会优先按标点等语义边界切片,必要时再按字符硬切
get_progress:
novel_name:小说名称返回
next_chapter_no与next_cursor,用于断点续跑
validate_chapter_draft:
clean_text:待质检章节正文min_chars/max_chars:建议字数范围(默认600/1000)返回
issues、in_range、标题/作者/前言/网址检测结果与建议
save_chapter:
novel_name:小说名称chapter_no:章节序号(从 1 开始)start_cursor:章节起始游标end_cursor:章节结束游标chapter_chars:章节字数min_chars:章节最小字数(可选,默认600)max_chars:章节最大字数(可选,默认1000)allow_out_of_range:允许超范围保存(可选,默认true)enforce_clean_guard:启用 clean 文本前部质检(可选,默认false)split_reason:切分理由(可选)raw_text:原始章节正文(未清洗)clean_text:清洗后的章节正文
章节输出目录
默认写入:
/Users/tietiezhi/Project/mcp/chapters/<novel_name>/文件说明:
0001.raw.txt:原始章节正文(含头部元信息)0001.clean.txt:清洗后章节正文(含头部元信息)index.jsonl:章节索引,每行一条 JSON 元信息
可通过环境变量覆盖:
CHAPTERS_DIR=/your/output/path bun run start推荐调用流程(智能体)
先调用
get_progress获取next_chapter_no与next_cursor。循环调用
read_novel_line(建议结合max_lines+target_chars控制批次)。AI 在对话内完成去杂质与章节切分。
每章保存前调用
validate_chapter_draft做自检。每章调用
save_chapter写入raw_text与clean_text。重复步骤 2-5,直到
eof=true。
save_chapter 内置一致性校验:
章节号必须连续
start_cursor必须等于上一章end_cursorchapter_chars必须等于clean_text.length可选开启字数范围限制(
allow_out_of_range=false)可选开启 clean 文本前部拦截(
enforce_clean_guard=true)
目录结构
.
├── index.ts # 根入口,启动 MCP 服务
└── src
├── main.ts # stdio transport 启动逻辑
├── server.ts # MCP Server 创建与工具注册
├── config.ts # 服务基础配置(name/version)
├── tools
│ ├── getProgress.ts
│ ├── readNovelLine.ts
│ ├── validateChapterDraft.ts
│ └── saveChapter.ts
└── types
└── tool.ts # 工具返回类型类型检查
bunx tsc --noEmitThis server cannot be deployed
Maintenance
Related MCP Connectors
MCP Server for Slima - AI Writing IDE for Novel Authors with AI Beta Reader.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Remote MCP server for AIStoryHub: stories, chapters, story bible, Voiceprints, AI generation.
Related MCP Servers
- AlicenseAqualityDmaintenanceA Node.js/TypeScript MCP server that facilitates interactive communication between LLMs and users, allowing AI assistants to request user input, display notifications, and manage command-line chat sessions.547 npm1MIT
- -licenseNot gradedqualityNot gradedmaintenanceA TypeScript MCP server that enables AI assistants to create, manage, and manipulate 'crystals' - structured data containers for storing complex analysis, code, and knowledge that can be exported and reimported across different AI conversations.-
- AlicenseNot gradedqualityDmaintenanceAn MCP server for intelligent novel processing that enables precise token-based text segmentation and management of bulk rewriting tasks. It integrates with the Cursor editor to facilitate automated content transformation workflows and prompt management.2MIT
- FlicenseAqualityBmaintenanceA local MCP server for low-token co-reading: import a book, split it into chapter-sized chunks, read it chunk by chunk, and keep notes so a session can resume without re-reading the whole book.12-