代理CMS
开源MCP服务器,可将任何CMS后端转换为AI代理就绪的内容管理系统。

这是什么?
代理CMS是一个 模型上下文协议(MCP) 服务器,使AI代理能够完全访问您的内容管理工作流——通过标准化协议创建、读取、更新、发布和跟踪内容。
而不是构建AI功能 *进入* 您的CMS,代理CMS包装 *周围* 它。您的CMS保持原样。代理可以使用干净的界面。
┌─────────────────┐ MCP Protocol ┌──────────────┐
│ AI Agents │ ◄──────────────────► │ Agentic CMS │
│ │ stdio / SSE │ MCP Server │
│ · Claude │ │ │
│ · OpenClaw │ │ Adapters: │
│ · Cursor │ │ · Supabase │
│ · Any MCP client│ │ · Payload │
└─────────────────┘ │ · Strapi │
│ · (yours) │
└───────┬───────┘
│
┌───────▼───────┐
│ Your CMS DB │
└───────────────┘为什么?
- 您的CMS,您的数据 --自托管,无供应商锁定
- 适配器模式 --Supabase今天,Payload/Strapi/明天什么都行
- MCP标准 --适用于Claude Desktop、OpenClaw、Cursor和任何兼容MCP的客户端
- 安全第一 --默认情况下,发布需要人工批准。代理创建草稿,人类发布。
- 开源 --麻省理工学院许可。用它,叉它,延长它。
特性
工具(MCP)
| 工具 | 说明 |
|---|---|
list_contents | 使用筛选器(状态、类别、标签)列出内容 |
get_content | 通过slug或ID获取单个内容项 |
create_content | 创建新内容(始终以 draft) |
update_content | 更新内容字段(标题、正文、标签等) |
list_ideas | 列出内容创意 |
promote_idea | 将想法推广到草稿内容项 |
create_publication | 记录发布事件(频道、URL、指标) |
get_metrics | 获取内容的性能指标 |
安全
create_content始终将状态设置为draft--代理不能直接发布update_content阻止状态更改published--需要人工批准- 所有操作均已记录并可审计
快速开始
1.安装
npm install @brxce/agentic-cms2.配置
创建 .env:
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key3.跑步
npx agentic-cms4.连接到克劳德桌面
添加 claude_desktop_config.json:
{
"mcpServers": {
"agentic-cms": {
"command": "npx",
"args": ["@brxce/agentic-cms"],
"env": {
"SUPABASE_URL": "https://your-project.supabase.co",
"SUPABASE_SERVICE_ROLE_KEY": "your-key"
}
}
}
}5.连接到OpenClaw
# ~/.openclaw/config.yaml
mcp:
servers:
agentic-cms:
command: npx
args: ["@brxce/agentic-cms"]
env:
SUPABASE_URL: https://your-project.supabase.co
SUPABASE_SERVICE_ROLE_KEY: your-key适配器
Agent CMS使用适配器模式来支持不同的CMS后端。
可用
- 速贝 --用于基于Supabase/PPostgreSQL的CMS设置
计划的
- 有效载荷CMS --TypeScript原生无头CMS
- 皮带 --流行的开源无头CMS
- Directus --基于SQL的无头CMS
- 自定义 --实施
CMSAdapter任何后端的接口
编写自己的适配器
import { CMSAdapter } from '@brxce/agentic-cms';
export class MyAdapter implements CMSAdapter {
async listContents(filter?: ContentFilter): Promise {
// Your implementation
}
async getContent(idOrSlug: string): Promise {
// Your implementation
}
// ... other methods
}建筑
src/
├── server.ts # MCP server entry point
├── tools/ # MCP tool definitions
│ ├── contents.ts # Content CRUD tools
│ ├── ideas.ts # Idea management tools
│ └── publications.ts # Publication tracking tools
├── adapters/
│ ├── interface.ts # CMSAdapter interface
│ ├── supabase.ts # Supabase adapter
│ └── (future adapters)
└── types.ts # Shared typesSupabase架构
如果你刚开始,以下是最低模式:
-- Contents
create table contents (
id uuid primary key default gen_random_uuid(),
title text not null,
slug text unique not null,
status text default 'draft' check (status in ('draft', 'review', 'published')),
category text,
body_md text,
tags text[],
hook text,
created_at timestamptz default now(),
updated_at timestamptz default now()
);
-- Ideas
create table ideas (
id uuid primary key default gen_random_uuid(),
raw_text text not null,
source text default 'manual',
promoted_to uuid references contents(id),
created_at timestamptz default now()
);
-- Publications
create table publications (
id uuid primary key default gen_random_uuid(),
content_id uuid references contents(id),
channel text not null,
url text,
published_at timestamptz default now(),
metrics jsonb default '{}'
);多租户部署
agentic-cms 基于env的multi-tenant 结构。您可以使用相同的代码库为多个客户提供各自的Supabase、Storage和品牌服务。
系统prerequisites(所有tenant通用)
# macOS
brew install ffmpeg yt-dlp node pnpm python@3.12
# Ubuntu/Debian
sudo apt install ffmpeg python3.12 python3.12-venv
pip install yt-dlp
npm install -g pnpm
# Node.js 22+: https://nodejs.org/新客户onboarding核对表
- 创建Supabase项目 (仅限客户)
- 免费/专业计划,project_ref기록 - supabase/migrations/*.sql 全部应用(Studio SQL Editor,按文件名升序排列) - 自动应用: - 创建14+表(contents/ideas/variants/blog_posts/carousels/video_projects等) - 5个储物桶생성 (内容媒体、工作室渲染、参考、完成、博客图像)--迁移 20260419000000 自动处理 - RLS policies公开阅读+服务角色管理
.env创建3个文件 (每个项目根目录的.env.example基准)
- ./.env -用于MCP服务器 - ./dashboard/.env.local --Next.js仪表板 - ./editor/.env -Python视频编辑服务器
- Multi-tenant核心env(必须按客户更换)
- SUPABASE_URL / SUPABASE_SERVICE_ROLE_KEY (或者 SUPABASE_SERVICE_KEY) - NEXT_PUBLIC_SITE_URL -客户网站URL - NEXT_PUBLIC_BRAND_NAME -曝光新闻稿标题·meta title suffix - NEXT_PUBLIC_BRAND_HANDLE / NEXT_PUBLIC_BRAND_EMOJI / NEXT_PUBLIC_BRAND_AVATAR_URL -克拉塞尔水印/化身 - NEXT_PUBLIC_CONTACT_EMAIL / NEXT_PUBLIC_CONTACT_DOMAIN -克拉塞尔CTA幻灯片 - ANALYTICS_OWN_DOMAINS -self-referrer whitelist(逗号分隔) - ANALYTICS_VERCEL_KEYWORDS -vercel preview域的标识 - NEWSLETTER_FROM -新闻稿发件人 "Display Name " - META_TITLE_SUFFIX --博客文章meta_title꼬리 - TABLE_PROJECTS=video_projects (editor/.env,必需) - STORAGE_MODE=cloud (editor/.env,建议)
- 外部API Key (可选)
- RESEND_API_KEY -发送新闻稿 - GOOGLE_SERVICE_ACCOUNT_KEY --GA4/GSC分析 - POSTIZ_API_URL + POSTIZ_API_KEY -发布社交渠道
- 本地开发启动
# MCP 서버용 의존성
npm install && npm run build
# dashboard 의존성
cd dashboard && npm install && cd ..
# editor Python 가상환경
cd editor && python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt && cd ..
# editor Remotion 의존성
cd editor/remotion && pnpm install && cd ../..
# Next.js dashboard + Python editor 동시 기동
cd dashboard && npm run dev:all- 从Claude Code连接MCP服务器
- .mcp.json 在repo根目录中创建(AGENTS.md 请参见示例) - Claude Code重启→43+MCP工具自动曝光
客户分离原则
- 数据库断开 -每个客户都有单独的Supabase项目(完全隔离数据)
- 代码共享 -相同git branch,仅env注入不同
- 品牌隔离 -仅更换上述env即可将徽标、电子邮件、域全部转换为客户
- 分离部署 -建议每个客户单独部署Vercel/Cloud Run(env隔离)
代码中没有硬编码的品牌原则
添加新功能时,不要直接输入“AWC”、“agenticworkflows.club”、“特定电子邮件”等具体值,而是通过env注入。各租户产生差异的余地全部设置env通道。
______________________________________________________________________
哲学
“没有人关心你的技术。他们关心的是他们的问题得到了解决。”
Agent CMS不是将AI添加到CMS中。这是关于让你的内容工作流程人工智能原生化——这样代理就可以处理重复性的工作,而人类则专注于判断和创造力。
建造于 IntelliEffect 作为 代理工作流俱乐部.
贡献
欢迎投稿!请阅读 贡献.md 在提交PR之前。
