tomato-writer-mcp
An MCP server for automating Fanqie Novel writer-backend workflows via Cookie/CSRF-authenticated HTTP calls.
Manage novels: list all novels, switch the current novel, and view the current selection.
Publish chapters: publish immediately or schedule with
publish_time; use direct title/content or extract a chapter from a Markdown file by chapter number; add author notes.Inspect content: list chapters by volume with published/scheduled status, and list drafts.
Delete chapters/drafts with explicit
confirm=trueto prevent accidental deletion.Analyze data: get novel-level stats with chapter reading/retention detail, author overview, attendance calendar, and remaining check-in tickets.
Monitor account/status: list notices for review results, check banned/violation status, medals, and AI feature qualification.
Find inspiration: fetch site hot words by gender and Douyin hot list.
Manage account: check login validity, get account info, and retrieve a login QR code.
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 | Fanqie Novel (番茄小说) Writer MCP Server for Claude, Cursor & Any MCP Client
⭐ If this helps you, please star it — it's the only payment open-source authors get.
💬 你能用它做什么 / What You Can Do
装好之后,你不再需要打开作家后台网页。直接对 AI 说话:
你说 / You say | AI 做 / AI does |
💬「看看我这几本书的数据怎么样」 |
|
💬「把第 16 章发上去」 |
|
💬「明早 8 点定时发第 17 章」 |
|
💬「哪章追读掉得最狠?」 |
|
💬「有审核结果了吗」 |
|
💬「给我几个热词参考,想开新书」 |
|
💬「删掉那章测试稿」 |
|
💬「Cookie 是不是过期了」 |
|
📷 Demo GIF / 演示动图 — PR welcome(这是本项目最需要的贡献)
Related MCP server: Goink MCP Server
🚀 30 秒快速开始 / Quick Start
① 获取鉴权(一次性)
浏览器登录 番茄小说作家后台
F12 → Network→ 选中任意/api/author/...请求复制请求头
Cookie和X-Secsdk-Csrf-Token
cp .env.example .env
# 填入上面两个值Cookie 有效期约 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 客户端 / Connect to Your AI Client
配置文件 config file:
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": "your-cookie",
"TOMATO_CSRF_TOKEN": "your-token"
}
}
}
}.cursor/mcp.json:
{
"mcpServers": {
"tomato-writer": {
"command": "npx",
"args": ["-y", "tomato-writer-mcp"],
"env": {
"TOMATO_COOKIE": "your-cookie",
"TOMATO_CSRF_TOKEN": "your-token"
}
}
}
}任意支持 MCP stdio 的客户端:command: npx,args: ["-y","tomato-writer-mcp"],两个环境变量塞进 env。
重启客户端 → 对 AI 说「看看我有哪些书」✅
🛠️ 20+ 工具一览 / Tools
📚 书籍管理 / Book Management
Tool | 说明 |
| 列出所有小说(book_id、书名、字数、阅读数、连载状态) |
| 切换当前操作的书 |
| 查看当前选中的书 |
✍️ 发布 / Publishing
Tool | 说明 |
| 发布 / 定时发布一章(支持直接传正文,或从 Markdown 稿件按章节号提取) |
| 各分卷章节列表(含定时待发 / 已发布状态) |
| 草稿箱列表 |
| 删除章节(需 |
📊 数据与分析 / Analytics
Tool | 说明 |
| 书级概览 + 各章阅读/追读/读完率明细 |
| 作者级数据总览 |
| 打卡 / 全勤日历 |
| 剩余打卡券 |
🔔 监控与灵感 / Monitoring & Inspiration
Tool | 说明 |
| 站内通知(审核结果监控) |
| 违规 / 封禁状态(可做自动告警) |
| 站内热词(起书名 / 蹭流量) |
| 抖音热点榜(选题参考) |
| 任务勋章概览 |
| AI 功能资格(AI 插画/命名/咨询是否开放) |
🔐 账号 / Account
Tool | 说明 |
| 登录态探针(Cookie 失效早知道) |
| 账号信息 |
| 扫码登录二维码(Base64 PNG) |
🔬 技术要点 / How It Works
本项目最有价值的部分 —— 我们摸清了番茄作家后台的私有协议:
要点 | 说明 |
鉴权 / Auth |
|
无需风控签名 | ❌ 不需要 |
POST 编码 | 必须 |
公共参数 |
|
响应格式 | 统一 |
已实测覆盖 /api/author/** 共 22 个端点。
🧪 冒烟测试 / Smoke Test
npm run smoke # 只读接口逐个体检
npm run smoke -- --write # 额外测「建草稿→删草稿」安全写链路✅ check_login(登录态) (312 bytes)
✅ list_novels(书单) (2841 bytes)
✅ get_hot_words(热词) (12053 bytes)
结果:15 通过 / 0 失败🏗️ 架构 / Architecture
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,树莓派可跑。
❓ FAQ
Q: 需要安装浏览器或 Playwright 吗? A: 不需要。纯 HTTP + Cookie,零浏览器依赖。
Q: Cookie 会泄露吗?
A: 只存在你本地 .env,代码不会上传到任何服务器。.gitignore 已排除。
Q: 支持哪些 AI 客户端? A: 任意支持 MCP stdio 的客户端:Claude Desktop、Cursor、Cline、Continue、Cherry Studio、Zed 等。
Q: 接口失效了怎么办?
A: 跑 npm run smoke 体检,然后提 issue,我们一起维护。
🤝 贡献 / Contributing
急需:
演示 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⚠️ 免责声明 / Disclaimer
本项目仅调用作者本人账号的后台接口,用于自动化自己的创作工作流
请遵守平台规则,勿用于刷量、批量注册等灰产场景
Cookie 等同账号密码,切勿提交到仓库(
.gitignore已排除.env)平台接口随时可能变更,发现失效欢迎提 issue
本项目与番茄小说官方无关,非官方 API / Not affiliated with Fanqie Novel official
🔎 关键词 / Keywords
番茄小说 番茄免费小说 番茄小说作家后台 番茄作家助手 网文写作 小说发布 MCP Model Context Protocol MCP Server Claude MCP Cursor MCP AI 写作 AI写小说 网文作者工具 fanqienovel fanqie novel tomato novel web novel Chinese web novel novel publishing automation AI agent
📄 License
MIT © 2026 Harrison Yin
⭐ Star 一下,让更多网文作者看到这个项目
Your star is the only payment open-source authors receive.
Available Tools
20 toolscheck_loginA
检查登录态是否仍然有效(最轻量探针)。Cookie 过期前先用它确认,避免发布到一半失败。
Inputs: no named parameters.
delete_chapterA
删除章节(已发布/草稿均可,⚠️ 不可恢复)。必须显式传 confirm=true 才会真正执行。
Inputs: confirm (required), item_id (required), book_id.
get_account_infoA
获取当前番茄作家账号信息(昵称、ID、等级等)。用来确认 Cookie 绑的是哪个号。
Inputs: no named parameters.
get_ai_qualificationB
AI 功能资格查询(AI 插画 / AI 命名 / AI 咨询是否对该书开放)。
Inputs: book_id.
get_attend_calendarB
打卡/全勤日历。start_date / end_date 为 unix 秒;不传默认最近 30 天。
Inputs: book_id, end_date, start_date.
get_author_overviewB
作者级数据总览(全站维度的创作/收益概览)。
Inputs: no named parameters.
get_banned_infoA
违规/封禁状态查询。不传 book_id 查账号级;可用于违规自动告警。
Inputs: book_id.
get_checkin_ticketsA
查询剩余打卡券数量(补卡用)。
Inputs: no named parameters.
get_current_novelA
查看当前选中的小说。
Inputs: no named parameters.
get_douyin_hot_listB
抖音热点榜,配合站内热词做选题参考。
Inputs: no named parameters.
get_hot_wordsB
站内热词榜(起书名 / 蹭流量用)。gender:1=男频,2=女频。
Inputs: gender.
get_login_qrcodeA
获取番茄作家后台官方实时扫码登录二维码数据源 (Base64 PNG) 与会话 Token
Inputs: no named parameters.
get_medal_summaryC
任务勋章概览(平台活动完成度)。
Inputs: no named parameters.
get_novel_statsA
获取小说阅读数据:书级概览(总阅读数 read_count、字数、连载状态)+ 各章阅读/追读明细。不传 book_id 用当前选中的小说。
Inputs: book_id, chapter_detail.
list_chaptersA
列出小说各分卷下的章节(含定时待发 / 已发布状态)。不传 book_id 用当前选中的小说。
Inputs: book_id.
list_draftsC
草稿箱列表(未发布的章节)。
Inputs: book_id, page_count.
list_noticesA
站内通知列表(审核结果、平台公告)。发完章节后用它盯是否已过审。
Inputs: page_count, page_index.
list_novelsA
列出当前账号下的所有小说(book_id、书名、字数、总阅读数、连载状态)。多本小说时用它来选择操作目标。
Inputs: no named parameters.
publish_chapterA
发布或定时发布一章到当前(或指定)小说。内容二选一:① 直接传 title + content;② 传 file(Markdown 稿件路径)+ chapter_no 自动提取(标题取章节行)。publish_time 传 ISO 时间则定时/预约发布,省略则立即发布。
Inputs: file, title, book_id, content, +3 more.
switch_novelA
切换当前要操作的小说(传 book_id,可先用 list_novels 查)。之后的发布、数据查询默认作用于这本,直到再次切换。
Inputs: book_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 20 tools
Most tools have clearly distinct resource/action targets: novel selection, chapter publishing/listing/deleting, account/login, stats, notices, and trend lookup are separable. A few status/account tools such as check_login, get_account_info, and get_login_qrcode are adjacent, but the descriptions make their roles understandable.
All tool names consistently use snake_case and mostly follow a predictable verb_noun pattern such as list_novels, get_novel_stats, publish_chapter, and delete_chapter. Minor variation like check_login and switch_novel is still readable and consistent with the overall convention.
With 20 tools, the server is somewhat heavy but the scope is broad: novel management, chapter publishing, account/login, analytics, notices, check-ins, trends, drafts, and AI qualification. Each tool appears to represent a real operation rather than redundant filler.
The surface covers core writer workflows including listing/switching novels, chapter listing, publishing, drafts, deletion, stats, login, notices, and account checks. Some lifecycle gaps remain, such as editing chapter content or creating a novel, but agents can likely work around these via the web backend.
Maintenance
Related MCP Connectors
Substack MCP server for ChatGPT, Claude and any AI agent: create post, schedule post, publish Note, reply to Notes, send direct message, moderate comments, list subscribers and get post stats in your own Substack account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Substack yourself; Cotlet does not store your password and you need no Substack API key. About the official Substack API: Substack has only a limited API (checked 11 Oct 2026). Its Developer API looks up public creator profiles after approval, and there is no public API to write posts or Notes, manage subscribers or send email. Setup and FAQ: https://cotlet.dev/integrations/substack-api-mcp-server
Medium MCP server for ChatGPT, Claude and any AI agent: create post, edit post, cross-post article and get post stats in your own Medium account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Medium yourself; Cotlet does not store your password and you need no Medium API key. About the official Medium API: Medium has an old REST API, but it is no longer supported and Medium does not allow new integrations (checked 11 Oct 2026). Accounts that still hold a token can only create posts, list publications and upload images, with no editing, stats or responses. Setup and FAQ: https://cotlet.dev/integrations/medium-api-mcp-server
Hacker News MCP server for ChatGPT, Claude and any AI agent: list upvoted items, list hidden items, list favorites, list my comment threads, get an item with its comments, favorite an item and hide an item in your own Hacker News account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Hacker News yourself; Cotlet does not store your password and you need no Hacker News API key. About the official Hacker News API: Hacker News has an official API, but it is read-only and public (checked 28 Oct 2026). It returns items, users and the story lists. Setup and FAQ: https://cotlet.dev/integrations/hacker-news-api-mcp-server
CapCut MCP server for ChatGPT, Claude and any AI agent: list drafts, export draft, add auto captions, share draft for review, invite members to a space, set member role, transfer editing permission and search templates in your own CapCut account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to CapCut yourself; Cotlet does not store your password and you need no CapCut API key. About the official CapCut API: Partly. CapCut has an official plugin for the ChatGPT desktop app that builds drafts and adds captions, effects and templates (capcut.com, checked 6 Nov 2026). Setup and FAQ: https://cotlet.dev/integrations/capcut-api-mcp-server
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI clients to interact with the Fanqie free novel author backend, including listing works, fetching chapter statuses, retrieving statistics, and publishing or drafting chapters.71MIT
- AlicenseNot gradedqualityCmaintenanceExposes 30+ novel-writing tools over stdio or HTTP so external agents such as Claude Code or WorkBuddy can use their own models and API keys to read chapters, write prose, manage characters, foreshadowing, story arcs and worldbuilding, run local semantic search, and launch review sub-agents. Supports one-click enabling with configurable port, token, and approval mode.AGPL 3.0
- AlicenseAqualityBmaintenanceEnables automated publishing to the Fanqie Novel (fanqienovel.com) author backend by driving a real browser through confirmed two-step form submissions, covering login, novel creation, chapter upload with scheduled release, short-story drafting and publishing, and a local manuscript library for batch uploads.1991 npmMIT
- AlicenseAqualityBmaintenanceEnables authors to automate publishing and managing their own Qimao (七猫) novel author-backend works through an MCP client, covering login and status, book creation and metadata, chapter add/edit/delete and batch publishing, short stories, read-only statistics and income, plus a local manuscript library, originality checks, and a genre knowledge base. Write operations follow a two-stage preview-then-confirm flow and it runs over stdio or Streamable HTTP with 30 tools and 8 read-only resources.30MIT