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 databatch_generate_covers: Generate multiple covers from a list of articleslist_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 contentacid: 💚 故障酸性 - For design, creative, art contentpop: 🎨 波普撞色 - For news, entertainment, trending contentshock: ⚡️ 冲击波 - For warnings, important, urgent contentdiffuse: 🌈 弥散光 - For lifestyle, health, emotional contentsticker: 🍭 贴纸风 - For cute, casual, simple contentjournal: 📝 手账感 - For diary, thoughts, literary contentcinema: 🎬 电影感 - For deep, movie, story contenttech: 🔵 科技蓝 - For technology, data, analysis contentminimal: ⚪️ 极简白 - For minimalist, design, aesthetic contentmemo: 🟡 备忘录 - For notes, lists, practical contentgeek: 🟢 极客黑 - 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
637ff399bea70f54d471c64327a4a8a4b8756d37ba95e633737f5c315a0377e8
|
|
| MD5 |
374bc6f2407c38e5049d1b3a89b2a4c1
|
|
| BLAKE2b-256 |
56715290eec228bc18f016869a289ab3d657b044008b8bd0058f57386c304401
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
generate_cover_mcp-0.0.1.tar.gz -
Subject digest:
637ff399bea70f54d471c64327a4a8a4b8756d37ba95e633737f5c315a0377e8 - Sigstore transparency entry: 1005077295
- Sigstore integration time:
-
Permalink:
Weihong-Liu/generate_cover_mcp@15272cbc6b9c88a62e01eac6503e53b5f236f527 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/Weihong-Liu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@15272cbc6b9c88a62e01eac6503e53b5f236f527 -
Trigger Event:
push
-
Statement type:
File details
Details for the file generate_cover_mcp-0.0.1-py3-none-any.whl.
File metadata
- Download URL: generate_cover_mcp-0.0.1-py3-none-any.whl
- Upload date:
- Size: 22.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63c2a783b19c8c9b27d08a1f3d835f690dd368396b23b9827f0e8812914babd1
|
|
| MD5 |
d0b3f141a2a22b2bede4823bb9b05199
|
|
| BLAKE2b-256 |
f398f770641dbf66cf5345ef0bb683b7d2eca36b4af98ce1eb3db3cde4375f48
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
generate_cover_mcp-0.0.1-py3-none-any.whl -
Subject digest:
63c2a783b19c8c9b27d08a1f3d835f690dd368396b23b9827f0e8812914babd1 - Sigstore transparency entry: 1005077297
- Sigstore integration time:
-
Permalink:
Weihong-Liu/generate_cover_mcp@15272cbc6b9c88a62e01eac6503e53b5f236f527 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/Weihong-Liu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@15272cbc6b9c88a62e01eac6503e53b5f236f527 -
Trigger Event:
push
-
Statement type: