tomato-writer-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@tomato-writer-mcp列出我的小说,并看看每本书的阅读量和追读数据"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🍅 tomato-writer-mcp
让 AI 直接帮你写小说 —— 在 Claude / Cursor 里用一句话管书、发章节、盯数据。
番茄小说作家后台的 MCP Server,零浏览器依赖,纯 HTTP + Cookie,部署只要 10 秒。
✨ 你能用它做什么
装好之后,你不再需要打开作家后台网页,直接对 AI 说话就行:
你说这句话 | AI 实际做的事 |
💬「看看我这几本书的数据怎么样」 | 调用 |
💬「把第 16 章发上去」 |
|
💬「明早 8 点定时发第 17 章」 |
|
💬「哪章追读掉得最狠?」 |
|
💬「有审核结果了吗」 |
|
💬「给我几个热词参考,我想开新书」 |
|
💬「删掉那章测试稿」 |
|
💬「我的 Cookie 是不是过期了」 |
|
完整演示 GIF 待补充 —— 欢迎 PR
Related MCP server: Tomato Writer MCP
🚀 30 秒快速开始
① 拿鉴权(一次性)
浏览器登录 番茄小说作家后台
F12 → Network→ 选中任意/api/author/...请求复制请求头里的
Cookie和X-Secsdk-Csrf-Token
cp .env.example .env
# 把上面两个值填进 .envCookie 有效期约 1~2 个月。失效时用
check_login工具秒发现。
② 跑起来
npx tomato-writer-mcp # 无需安装,一行启动或者本地开发:
git clone https://github.com/itsyhx/tomato-writer-mcp.git
cd tomato-writer-mcp
npm install && npm run build
npm start③ 接入 AI 客户端
编辑配置文件:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"tomato-writer": {
"command": "npx",
"args": ["-y", "tomato-writer-mcp"],
"env": {
"TOMATO_COOKIE": "你的Cookie",
"TOMATO_CSRF_TOKEN": "你的Token"
}
}
}
}.cursor/mcp.json:
{
"mcpServers": {
"tomato-writer": {
"command": "npx",
"args": ["-y", "tomato-writer-mcp"],
"env": {
"TOMATO_COOKIE": "你的Cookie",
"TOMATO_CSRF_TOKEN": "你的Token"
}
}
}
}任意支持 MCP stdio 的客户端都一样配置,command: npx,args: ["-y","tomato-writer-mcp"],把两个环境变量塞进 env 即可。
重启客户端 → 对 AI 说「看看我有哪些书」,搞定 ✅
🛠️ 20+ 工具一览
📚 书籍管理
工具 | 作用 |
| 列出所有小说(book_id、书名、字数、阅读数、连载状态) |
| 切换当前操作的书(之后的工具默认作用于它) |
| 查看当前选中的书 |
✍️ 发布
工具 | 作用 |
| 发布 / 定时发布一章(支持直接传正文,或从 Markdown 稿件按章节号提取) |
| 各分卷章节列表(含定时待发 / 已发布状态) |
| 草稿箱列表 |
| 删除章节(需 |
📊 数据与分析
工具 | 作用 |
| 书级概览 + 各章阅读/追读/读完率明细 |
| 作者级数据总览 |
| 打卡 / 全勤日历 |
| 剩余打卡券 |
🔔 监控与灵感
工具 | 作用 |
| 站内通知(审核结果监控) |
| 违规 / 封禁状态(可做自动告警) |
| 站内热词(起书名 / 蹭流量) |
| 抖音热点榜(选题参考) |
| 任务勋章概览 |
| AI 功能资格(AI 插画/命名/咨询是否开放) |
🔐 账号
工具 | 作用 |
| 登录态探针(Cookie 失效早知道) |
| 账号信息 |
| 扫码登录二维码(Base64 PNG) |
🔬 为什么它能跑得通(协议要点)
这是本项目最有价值的部分 —— 我们把番茄作家后台的私有协议摸清楚了:
要点 | 说明 |
鉴权方式 |
|
不需要风控签名 | ❌ 不需要 |
POST 编码 | 必须 |
公共参数 |
|
响应格式 | 统一 |
已实测端点覆盖:/api/author/** 共 22 个(详见源码注释)。
🧪 冒烟测试
不确定接口还好不好使?跑一遍体检:
npm run smoke # 只读接口逐个体检
npm run smoke -- --write # 额外测「建草稿→删草稿」安全写链路输出示例:
✅ check_login(登录态) (312 bytes)
✅ list_novels(书单) (2841 bytes)
✅ get_hot_words(热词) (12053 bytes)
...
结果:15 通过 / 0 失败🏗️ 架构
src/
├── index.ts # MCP Server 入口(stdio)
├── tomato/
│ ├── client.ts # HTTP 客户端(鉴权 / 编码 / 错误归一)
│ ├── config.ts # .env 加载 + 当前书状态持久化
│ ├── service.ts # 书籍 / 章节 / 发布核心服务
│ ├── author.ts # 账号 / 通知 / 违规 / 打卡 / 删除扩展
│ └── content.ts # Markdown → 番茄正文 HTML
└── tools/ # MCP 工具定义(一个文件一个主题)零重依赖 —— 只有 MCP SDK + dotenv,单进程跑在 stdio 上,树莓派都能挂。
🤝 贡献
欢迎 PR / Issue。尤其需要:
补充演示 GIF 和截图
更多平台的 MCP 客户端配置示例
接口变动时及时提 issue(平台会改,我们一起维护)
git clone https://github.com/itsyhx/tomato-writer-mcp.git
cd tomato-writer-mcp
npm install
npm run build && npm run smoke⚠️ 免责声明
本项目仅调用作者本人账号的后台接口,用于自动化自己的创作工作流
请遵守平台规则,勿用于刷量、批量注册等灰产场景
Cookie 等同账号密码,千万别提交到仓库里(
.gitignore已排除.env)平台接口随时可能变更,发现失效欢迎提 issue
本项目与番茄小说官方无关,非官方 API
📄 License
MIT © 2026 Harrison Yin
This server cannot be deployed
Maintenance
Related MCP Connectors
Chinese web novel MCP: 36 tools (outline, prose, review, coach, KD export). BYOK, no API key.
AI-native fiction platform. Any AI can register, read, search and co-author novels via MCP or REST.
Search Chinese books with Douban ratings, AI book guides and curated toplists. Free, no API key.
Publish Git-backed multilingual novels with agents, safe layouts, reviews, and author approval.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables reading work outlines, contexts, and chapters, and saving chapters with version protection for an AI novel writing tool.1MIT
- AlicenseAqualityCmaintenanceEnables AI clients to interact with the Fanqie free novel author backend, including listing works, fetching chapter statuses, retrieving statistics, and publishing or drafting chapters.7MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to query and analyze fanqie novel rank data, including trend diffs, genre heat, hotwords, and a six-dimensional imitation-book scoring model for selecting books to model.78MIT
- AlicenseAqualityAmaintenanceLocal-first toolkit with 16 tools for Chinese web-novel (网文) authors: style baselines, foreshadowing and plot-thread tracking, continuity & OOC audits, keyword and sentence-pattern analysis, and offline semantic search. No API key, no network — everything runs on your machine.201,397 npm23MIT