@upcv/content-engine-mcp
v0.1.1
Published
UPCV Content Engine MCP Server — AI 内容生产引擎的 MCP 接口,支持文章、简历范文、模板展示的生成与管理
Maintainers
Readme
@upcv/content-engine-mcp
UPCV Content Engine 的 MCP (Model Context Protocol) 适配器。本包运行在用户本地,通过 stdio 暴露工具并将调用转发到服务器上的 content-engine HTTP Trigger API。
部署边界:
- 服务器: 运行
upcv-content-engine(AI 生成、调度、发布、tracker 等业务逻辑) - 本地: 运行本 MCP 包(仅做协议适配与 HTTP 转发,不保存状态)
安装与运行
使用 npx 运行(推荐)
npx @upcv/content-engine-mcp --api-url http://localhost:3100 --api-key your-key或通过环境变量:
CONTENT_ENGINE_API_URL=http://localhost:3100 \
CONTENT_ENGINE_API_KEY=your-key \
npx @upcv/content-engine-mcp全局安装
npm install -g @upcv/content-engine-mcp
upcv-content-engine-mcp --api-url http://localhost:3100 --api-key your-key配置项
命令行参数优先于环境变量。
| 参数 | 环境变量 | 默认值 | 说明 |
|------|---------|--------|------|
| --api-url | CONTENT_ENGINE_API_URL | http://localhost:3100 | Content Engine 服务地址(Base URL,不含 /api) |
| --api-key | CONTENT_ENGINE_API_KEY | (空) | Trigger API Key(服务端配置了 TRIGGER_API_KEY 时必填) |
AI 客户端配置
Claude Code
claude mcp add content-engine -- npx @upcv/content-engine-mcp --api-key your-keyClaude Desktop
编辑 ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"content-engine": {
"command": "npx",
"args": ["-y", "@upcv/content-engine-mcp"],
"env": {
"CONTENT_ENGINE_API_URL": "http://localhost:3100",
"CONTENT_ENGINE_API_KEY": "your-key"
}
}
}
}Cursor
Settings > Features > MCP Servers > Add New MCP Server:
{
"content-engine": {
"command": "npx",
"args": ["-y", "@upcv/content-engine-mcp"],
"env": {
"CONTENT_ENGINE_API_URL": "http://localhost:3100",
"CONTENT_ENGINE_API_KEY": "your-key"
}
}
}Windsurf / 通用 MCP 客户端
{
"mcpServers": {
"content-engine": {
"command": "npx",
"args": ["-y", "@upcv/content-engine-mcp"],
"env": {
"CONTENT_ENGINE_API_URL": "http://localhost:3100",
"CONTENT_ENGINE_API_KEY": "your-key"
}
}
}
}可用工具(13 个)
文章管理
| 工具 | 参数 | 说明 |
|------|------|------|
| content.createArticle | direction, customPrompt? | 生成并发布一篇 SEO 文章 |
| content.batchCreateArticles | directions[] | 批量并发生成多篇文章 |
| content.deleteArticle | slug | 永久删除文章(不可恢复) |
简历范文管理
| 工具 | 参数 | 说明 |
|------|------|------|
| content.createResumeSample | title, position?, requirements? | 生成一份完整简历范文并发布 |
| content.batchCreateResumeSamples | tasks[] | 批量并发生成多份范文 |
| content.deleteResumeSample | slug | 永久删除范文(不可恢复) |
模板展示管理
| 工具 | 参数 | 说明 |
|------|------|------|
| content.createTemplateShowcase | title, position?, industry? | 生成模板展示案例(选模板 + 填充简历 + 预览图) |
| content.batchCreateTemplateShowcases | tasks[] | 批量并发生成多个模板展示 |
| content.deleteTemplateShowcase | id (number) | 永久删除模板展示(不可恢复) |
校招内容流水线
| 工具 | 参数 | 说明 |
|------|------|------|
| content.analyzeCampusRecruitment | recruitmentId | 分析单条校招并生成分析文章 |
| content.generateCampusTopic | limit? | 基于校招数据生成专题策划 |
| content.runDailyPipeline | date?, limit?, resumeCount? | 触发每日校招流水线(3 阶段并行) |
| content.getDailyStatus | date? | 查询当日流水线执行状态 |
每日流水线 3 个阶段
- Stage 1 - 校招分析:为每条新校招生成独立分析文章
- Stage 2 - 专题策划:AI 从校招数据中发现趋势,生成专题文章
- Stage 3 - 简历衍生:AI 选出代表性职位方向(
resumeCount控制数量,默认 10),每个方向产出 1 篇范文 + 1 个模板展示
limit 控制拉取的校招项目数量(默认 100),影响 Stage 1 和 Stage 2。resumeCount 控制 Stage 3 的方向数量。
本地调试
# MCP Inspector
npx @modelcontextprotocol/inspector npx @upcv/content-engine-mcp -- --api-key your-key
# 开发模式(源码)
cd packages/content-engine-mcp
pnpm dev -- --api-key your-key常见错误
| 错误 | 原因 | 解决 |
|------|------|------|
| Remote content-engine requires TRIGGER_API_KEY | 服务端开启了鉴权 | 补充 --api-key |
| 401 / 403 | API Key 不匹配 | 检查 key 是否与服务端 TRIGGER_API_KEY 一致 |
| ECONNREFUSED | 服务不可达 | 检查 --api-url 和网络连接 |
| timeout | 生成任务耗时长 | AI 生成通常需要 20-60 秒,耐心等待 |
License
MIT
