content-publish-engine-mcp

content-publish-engine-mcp

MCP server for governed AI content publishing to platforms like WeChat, Juejin, CSDN, and Zhihu, exposing tools for platform auth checks, content preflight, publish job lifecycle, verification, and liveness monitoring.

Category
访问服务器

README

content-publish-engine

An experimental TypeScript engine for governed AI content production and multi-platform publishing in the Chinese content ecosystem.

Status: v0.1 experimental. The deterministic production, validation, persistence, and lifecycle primitives are usable. Real publishing requires an authorized local bridge or a custom transport and must be validated against each platform's current rules.

What it provides

  • A frozen production contract that combines evidence, product, content-type, channel, expression, and promotion rules.
  • Deterministic output checks for structure, traceable facts, prohibited terms, CTA integrity, URLs, and cross-channel similarity.
  • WeChat, Juejin, CSDN, and Zhihu adapter contracts with mock, disabled, and real modes.
  • Idempotent publish jobs, platform locks, persisted results, verification backoff, liveness states, and reliability metrics.
  • Qwen, DeepSeek, and Doubao through an OpenAI-compatible provider interface.
  • A standalone MCP server exposing publish preparation, execution, verification, and liveness tools.

Safety model

Real publishing is disabled by default. Without DIRECT_PUBLISH_ENABLED=true, adapters run in mock mode unless DIRECT_PUBLISH_MOCK=false explicitly disables publishing. The built-in bridge transport only accepts loopback hosts and requires a bearer token.

The project does not ship browser selectors, cookies, platform credentials, or mechanisms intended to bypass CAPTCHA or platform risk controls. Use only accounts, APIs, and automation methods you are authorized to operate.

Requirements

  • Node.js 20 or newer
  • npm 10 or newer recommended

Install and verify

npm ci
npm run check

npm run check runs TypeScript checks, JavaScript syntax checks, tests, a clean build, and import checks against the built package.

Package entry points

import { compileProductionContract } from "content-publish-engine/content-production";
import { getCalendarMonthBounds } from "content-publish-engine/free-production";
import { getPublishAdapter, setDefaultTransport } from "content-publish-engine/publish-engine";
import { createBrowserPublishJobStore } from "content-publish-engine/platforms";
import { callAiProvider } from "content-publish-engine/ai-provider";

The repository can be used directly after npm run build. Publishing to npm is optional; before doing so, add the final GitHub repository, bugs, and homepage metadata to package.json.

Mock publishing

import { getPublishAdapter } from "content-publish-engine/publish-engine";

const adapter = getPublishAdapter("juejin");
const auth = await adapter.checkAuth();
// Mock mode is the default and never writes to an external platform.

Real publishing

The default BridgeTransport calls an authorized local service:

DIRECT_PUBLISH_ENABLED=true
WECHATSYNC_BRIDGE_URL=http://127.0.0.1:9528
WECHATSYNC_BRIDGE_TOKEN=replace-with-a-local-secret

The bridge must implement POST /auth/check, POST /publish, and POST /publish/verify. A custom transport is usually the simplest integration path; see examples/custom-transport.mjs and docs/adapter-guide.md.

MCP server

From a source checkout:

npm run mcp:start

From a built or installed package:

content-publish-engine-mcp

The server persists jobs and publish results to .data/publish-jobs.json by default. Override it with PUBLISH_JOB_STORE_PATH.

Available tools:

  • platform_auth_probe
  • publish_content_preflight
  • publish_job_create
  • publish_job_run
  • publish_job_get
  • publish_job_verify
  • publish_liveness_check
  • publish_verification_due

publish_content_preflight does not score writing quality or impose default limits on length, promotional wording, technical depth, or external links. It checks only required payload fields and platform-specific rules backed by identified official sources. Every result includes an officialRuleCoverage status so callers can distinguish verified coverage from missing public documentation. See docs/official-platform-rules.md.

Content media protocol

content-media://media-asset-<uuid> references can be rewritten to HTTPS URLs through rewriteContentMediaSources. The resolver is provided by the host application; the package does not assume a specific media backend.

Configuration

Copy .env.example and supply only the providers and publishing mode you use. Never commit the resulting .env file. See docs/architecture.md for component boundaries and durability behavior.

Known limitations

  • Platform adapters define payload validation and lifecycle behavior; real platform actions and final policy enforcement still require a bridge or custom transport.
  • Official rule coverage is intentionally partial where a platform does not publish a stable, machine-verifiable publishing contract.
  • No live platform credentials are exercised in CI.
  • File-backed job persistence is intended for a single local process or low-volume deployment, not distributed workers.
  • Provider output quality and platform policy compliance remain the operator's responsibility.

Contributing and security

See CONTRIBUTING.md before opening a pull request. Report vulnerabilities according to SECURITY.md, not through a public issue.

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选