tomato-writer-mcp

tomato-writer-mcp

MCP server for Fanqie novel author backend, enabling multi-novel management, reading statistics analysis, and chapter publishing with scheduling.

Category
Visit Server

README

番茄小说 MCP

番茄小说作家后台的 MCP 服务:多本小说管理 · 阅读数据分析 · 章节发布/定时发布

直接调用番茄作家后台的真实 HTTP 接口(Cookie 鉴权,无浏览器、无风控签名逆向),相比早期的 Puppeteer 方案稳定可靠。

工具

工具 作用
list_novels 列出账号下所有小说(book_id、书名、字数、阅读数、连载状态)
switch_novel 切换当前操作的小说(多本时使用)
get_current_novel 查看当前选中的小说
get_novel_stats 阅读数据:书级概览 + 各章读完率/追读率/字数
list_chapters 列出各分卷的章节(含定时待发 / 已发布状态)
publish_chapter 发布 / 定时发布一章(直接传内容,或从 Markdown 稿件按章节号提取)

配置

复制 .env.example.env,填入番茄作家后台鉴权:

TOMATO_COOKIE=...        # 登录后任意 /api/author 请求的完整 Cookie 头
TOMATO_CSRF_TOKEN=...    # 同一请求头里的 X-Secsdk-Csrf-Token(会话级固定)

获取方法:浏览器登录 https://fanqienovel.com 作家后台 → F12 → Network → 任选一个 /api/author/... 请求 → 复制其 CookieX-Secsdk-Csrf-Token。Cookie 有失效期(约一两个月),失效后重新抓一次更新即可。

构建与接入

pnpm install
pnpm build

在支持 MCP 的客户端(Claude Code / Claude Desktop / Cursor 等)的 MCP 配置里加入:

{
  "mcpServers": {
    "tomato-writer-mcp": {
      "command": "node",
      "args": ["/绝对路径/tomato-writer-mcp/dist/index.js"],
      "env": {
        "TOMATO_COOKIE": "...",
        "TOMATO_CSRF_TOKEN": "..."
      }
    }
  }
}

(若已配置好 .envenv 字段可省略。)

使用示例

  • “列出我的小说” → list_novels
  • “切换到《重生:从掠夺气运之子开始》” → switch_novel
  • “看看这本书的阅读数据” → get_novel_stats
  • “把 /path/正文_第11-20章.md 的第 19 章定时到 2026-06-20 15:00 发布” → publish_chapter

项目结构

src/
├── index.ts              # MCP 入口,注册工具
├── tomato/
│   ├── client.ts         # HTTP 客户端(Cookie + CSRF,统一 GET/POST,code≠0 抛错)
│   ├── config.ts         # 鉴权加载 + 当前小说状态(data/state.json)
│   ├── content.ts        # 正文转 <p> HTML / 从 Markdown 提取指定章节
│   └── service.ts        # 业务封装(书单 / 数据 / 建草稿 / 发布)
└── tools/
    ├── novels.ts         # list_novels / switch_novel / get_current_novel
    ├── stats.ts          # get_novel_stats / list_chapters
    └── publishing.ts     # publish_chapter

说明

  • 定时发布:publish_time 给未来时间即预约,到点由番茄服务端自动发出,本机无需常驻;预约成功不代表一定过审,番茄正式发布时仍会做内容审核。
  • 请遵守番茄平台规则与内容合规要求。

许可证

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured