Skip to main content

MCP server for generating HTML-based covers using CoverMaster2

Project description

Generate Cover MCP

A Model Context Protocol (MCP) server for generating HTML-based covers using CoverMaster2.

Features

  • Generate beautiful covers from article data
  • Multiple style options (Swiss, Acid, Pop, Shock, etc.)
  • Automatic style selection based on content
  • Batch processing support
  • HTML-based rendering with Playwright

Installation

pip install generate-cover-mcp

Or install from source:

git clone https://github.com/yourusername/generate-cover-mcp
cd generate-cover-mcp
pip install -e .

Prerequisites

You need to install Playwright browsers:

playwright install chromium

Usage

Command Line Interface (推荐)

直接通过命令行生成单个封面:

# 基本用法
generate-cover "AI编程技术分享"

# 指定副标题和分类
generate-cover "AI编程技术分享" --subtitle "技术干货" --categories "技术,AI,编程"

# 指定风格
generate-cover "重要通知" --style shock

# 指定输出文件名和目录
generate-cover "我的文章" --output "my_cover.png" --output-dir "my_covers"

# 列出所有可用风格
generate-cover --list-styles

As MCP Server

Add to your MCP client configuration:

{
  "mcpServers": {
    "generate-cover": {
      "command": "generate-cover-mcp",
      "args": []
    }
  }
}

Available Tools

  • generate_cover: Generate a single cover from article data
  • batch_generate_covers: Generate multiple covers from a list of articles
  • list_styles: List available cover styles

Configuration

The server includes a CoverMaster.html template file. You can also specify a custom template path via environment variable:

export COVER_HTML_PATH=/path/to/your/CoverMaster.html

Article Data Format

{
  "title": "Your Article Title",
  "categories": ["tech", "programming"],
  "url": "https://example.com/article?sn=12345678"
}

Available Styles

  • swiss: 🇨🇭 瑞士国际 - For tech, tools, development content
  • acid: 💚 故障酸性 - For design, creative, art content
  • pop: 🎨 波普撞色 - For news, entertainment, trending content
  • shock: ⚡️ 冲击波 - For warnings, important, urgent content
  • diffuse: 🌈 弥散光 - For lifestyle, health, emotional content
  • sticker: 🍭 贴纸风 - For cute, casual, simple content
  • journal: 📝 手账感 - For diary, thoughts, literary content
  • cinema: 🎬 电影感 - For deep, movie, story content
  • tech: 🔵 科技蓝 - For technology, data, analysis content
  • minimal: ⚪️ 极简白 - For minimalist, design, aesthetic content
  • memo: 🟡 备忘录 - For notes, lists, practical content
  • geek: 🟢 极客黑 - For hacker, geek, programming content

Development

# Install development dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Format code
black src/
isort src/

# Type checking
mypy src/

License

MIT License - see LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

generate_cover_mcp-0.0.1.tar.gz (27.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

generate_cover_mcp-0.0.1-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

Details for the file generate_cover_mcp-0.0.1.tar.gz.

File metadata

  • Download URL: generate_cover_mcp-0.0.1.tar.gz
  • Upload date:
  • Size: 27.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for generate_cover_mcp-0.0.1.tar.gz
Algorithm Hash digest
SHA256 637ff399bea70f54d471c64327a4a8a4b8756d37ba95e633737f5c315a0377e8
MD5 374bc6f2407c38e5049d1b3a89b2a4c1
BLAKE2b-256 56715290eec228bc18f016869a289ab3d657b044008b8bd0058f57386c304401

See more details on using hashes here.

Provenance

The following attestation bundles were made for generate_cover_mcp-0.0.1.tar.gz:

Publisher: publish.yml on Weihong-Liu/generate_cover_mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file generate_cover_mcp-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for generate_cover_mcp-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 63c2a783b19c8c9b27d08a1f3d835f690dd368396b23b9827f0e8812914babd1
MD5 d0b3f141a2a22b2bede4823bb9b05199
BLAKE2b-256 f398f770641dbf66cf5345ef0bb683b7d2eca36b4af98ce1eb3db3cde4375f48

See more details on using hashes here.

Provenance

The following attestation bundles were made for generate_cover_mcp-0.0.1-py3-none-any.whl:

Publisher: publish.yml on Weihong-Liu/generate_cover_mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page