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
Visit Server

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

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
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
Qdrant Server

Qdrant Server

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

Official
Featured