Skip to main content
Glama

🍅 Tomato Writer MCP (番茄小说作家后台 Model Context Protocol 服务)

MCP Version Node Version License: MIT

专门面向 AI 编程与 Agent 辅助创作的 Model Context Protocol (MCP) 服务,为各大 AI 客户端(Claude Desktop、Cursor、Cline、Antigravity、Trae 等)提供与番茄免费小说作家后台的无缝交互能力,实现小说作品查询、签约书架状态诊断、章节目录拉取与合规发布。


🌟 核心功能特性

  • 📚 作品书架管理 (list_novels):实时拉取当前账号名下签约与连载中的所有番茄作品基本信息、作品 ID、总字数与更新状态。

  • 📖 章节列表与字数统计 (list_chapters):支持分卷与分章节拉取,自动统计全书总章节数、草稿箱数量与在线发布状态。

  • 🎯 当前激活作品切换 (switch_novel / get_current_novel):在多部连载作品间无缝切换上下文焦点。

  • 📊 作品签约与连载数据看板 (get_novel_stats):获取作品最新日更字数、审稿状态与各项指标。

  • 🚀 章节合规发布与草稿暂存 (publish_chapter):支持将 AI 撰写的正文一键存入番茄草稿箱或提交正式发布,内置字数合规校验(≥1,000字 签约门槛校验)。


Related MCP server: juejin-release-mcp

🛠️ 工具清单 (Tools Reference)

MCP 工具名称

功能描述

核心输入参数

list_novels

获取当前作者名下的全部小说列表

switch_novel

切换当前 AI 操作的目标小说

book_id (string)

get_current_novel

获取当前正在操作的小说信息

get_novel_stats

获取当前小说的详细统计数据

book_id (可选 string)

list_chapters

获取目标小说的全部章节目录与状态

book_id (可选 string), need_content (boolean)

publish_chapter

向番茄后台提交章节(存草稿或发布)

title, content, publish_type ('draft' | 'publish'), book_id

get_login_qrcode

获取官方实时扫码登录二维码数据源 (Base64)


🚀 快速安装与配置

1. 克隆与安装依赖

git clone https://github.com/ChaEunwooy/tomato-writer-mcp.git
cd tomato-writer-mcp
npm install
npm run build

2. 环境变量配置 (.env)

复制环境配置模板:

cp .env.example .env

.env 中填入您的番茄作家后台凭据:

# 1) 登录 https://fanqienovel.com 作家后台
# 2) 按 F12 打开网络 (Network) 控制台,任选一个 /api/author/... 请求
# 3) 复制 Request Headers 中的 Cookie
TOMATO_COOKIE="sessionid=xxxxxx; passport_csrf_token=xxxxxx; ..."

# 4) 复制 Request Headers 中的 X-Secsdk-Csrf-Token
TOMATO_CSRF_TOKEN="0xxxxxxxxxxxxxxxxxxxx"

# 可选:默认操作的作品 ID
TOMATO_DEFAULT_BOOK_ID="7xxxxxxxxxxxxxxxx"

🔌 在各大 AI 工具中接入 MCP

1. Claude Desktop 配置 (claude_desktop_config.json)

{
  "mcpServers": {
    "tomato-writer": {
      "command": "node",
      "args": ["E:/tomato-writer-mcp/dist/index.js"],
      "env": {
        "TOMATO_COOKIE": "your_cookie_here",
        "TOMATO_CSRF_TOKEN": "your_csrf_token_here"
      }
    }
  }
}

2. Cursor / Cline / Antigravity 配置

在 MCP 配置文件中添加 stdio 启动指令:

{
  "name": "tomato-writer",
  "command": "node",
  "args": ["E:/tomato-writer-mcp/dist/index.js"]
}

⚠️ 重要注意事项与安全规范

  1. 🔒 隐私与凭证安全

    • 严禁将包含真实 TOMATO_COOKIE.env 文件提交至任何公开 Git 仓库;

    • .gitignore 默认已排除 .env 及所有临时文件。

  2. 🛡️ 平台发布合规

    • 番茄官方要求单章字数不得低于 1,000 字,否则平台将拦截签约作品更新;

    • 单日新建作品有严格频次配额,请合理安排连载发布节奏。

  3. ⏳ Cookie 有效期维护

    • 字节跳动 SSO 登录态具备一定有效期,若工具提示 未授权或Cookie已过期,只需重新在网页端登录并更新 .env 中的 TOMATO_COOKIE 即可。


📄 开源许可证

本项目基于 MIT License 开源。

作者:ChaEunwooy

A
license - permissive license
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Create, test, publish, and manage Dreamlit notification workflows from AI clients.

  • Read, edit, publish, and preview your pepita websites from Claude.

  • Live SEO workflow tools for Claude Code, Codex, and AI agents.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ChaEunwooy/tomato-writer-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server