mcpField
B
blink-cms

blink-cms

github.com/blink-new文档处理51 次安装
代码仓库

关于 blink-cms

blink-cms 是通过 `user-blink-mcp` 管理 blink.new 内容的技能,将 CMS 作为带版本记录和草稿管理的虚拟文件系统。适用于维护文档与博客的编辑和发布流程。

主要功能

  1. 01列出并读取 CMS 内容
  2. 02创建、更新和局部编辑文章
  3. 03发布文章并管理草稿
  4. 04文本与语义搜索
  5. 05查看和恢复版本

适用场景

  1. 01查找并阅读博客或文档
  2. 02以草稿方式撰写文章并发布
  3. 03替换文章中的指定段落
  4. 04检查草稿或恢复历史版本

MCP 相关

通过 `user-blink-mcp` MCP 服务调用 CMS 工具,完成内容检索、读写、草稿管理、发布和版本操作。

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/blink-new/claude --skill blink-cms

安装后在 Claude Code 中输入/blink-cms确认已加载。

详细介绍

通过 MCP 使用 Blink CMS

使用 user-blink-mcp 服务,在 blink.new 上发布和管理内容。该 MCP 将 Blink CMS 视为虚拟文件系统,并内置版本管理和草稿管理功能。

快速参考

任务工具关键参数
列出内容cms_list_dirpath: "docs" 或 "blog"
读取文章cms_read_filepath: "blog/article.mdx"
创建/更新cms_write_filepath、content、publish
编辑章节cms_search_replacepath、old_string、new_string
发布cms_publishpaths: ["blog/x.mdx"]
查找文本cms_grepquery、type
语义搜索cms_searchquery、type
查看草稿cms_list_draftstype
版本历史cms_get_versionspath

内容结构

/docs/              → Documentation (quickstart, pricing, reference, etc.)
/docs/build/        → Build guides (prompting, tutorials, web-apps)
/docs/extend/       → Backend features (database, auth, storage)
/docs/launch/       → Deployment (domains, analytics)
/blog/              → Blog articles

Frontmatter 结构

每篇文章都必须包含 frontmatter:

---
title: "Article Title"
description: "Brief summary for SEO and cards"
category: "Engineering"        # Product, Engineering, Tutorial, Case Study
tags: ["AI", "Productivity"]   # Free-form array
status: "published"            # Overridden by publish action
---

类别:

  • Product — 公告、发布、功能更新
  • Engineering — 技术深度解析、最佳实践
  • Tutorial — 分步骤指南
  • Case Study — 客户成功案例

创建新文章

cms_write_file(
  path: "blog/my-article.mdx",
  content: ---
title: "My Article Title"
description: "What this article is about"
category: "Engineering"
tags: ["AI", "Tips"]
---

## Introduction

Your content here with MDX components.

<Tip>Helpful tips use the Tip component.</Tip>
,
  publish: false    # Save as draft first
)

准备好后即可发布:

cms_publish(paths: ["blog/my-article.mdx"])

编辑现有文章

方法 1:全文重写(谨慎使用)

cms_write_file(path: "blog/article.mdx", content: "...full content...", publish: true)

方法 2:精准编辑(推荐)

cms_search_replace(
  path: "blog/article.mdx",
  old_string: "## Introduction\n\nOld text here",
  new_string: "## Introduction\n\nNew text here"
)

请提供 3-5 行上下文,以确保匹配内容唯一。灵活的空白字符匹配会自动处理缩进差异。

查找内容

模糊文本搜索(查找精确短语):

cms_grep(query: "deployment", type: "blog", limit: 10)

语义搜索(按含义查找):

cms_search(query: "how to deploy apps", type: "blog")

版本控制

# See all versions
cms_get_versions(path: "blog/article.mdx")

# Restore a specific version
cms_activate_version(path: "blog/article.mdx", version: 3)

草稿工作流

# Check for unpublished changes
cms_list_drafts(type: "blog")

# Discard draft (revert to last published)
cms_discard_draft(path: "blog/article.mdx")

MDX 组件

富文本内容常用组件:

<Tip>Helpful tip text</Tip>
<Note>Informational note</Note>
<Warning>Caution about something</Warning>

<Steps>
  <Step title="First Step">Instructions</Step>
  <Step title="Second Step">More instructions</Step>
</Steps>

<CodeGroup>
  <CodeTab title="JavaScript">code here</CodeTab>
  <CodeTab title="Python">code here</CodeTab>
</CodeGroup>

<CardGroup cols={2}>
  <Card title="Feature Name" href="/docs/path" icon="Star">
    Brief description
  </Card>
</CardGroup>

<AccordionGroup>
  <Accordion title="Question?">Answer content</Accordion>
</AccordionGroup>

工作流最佳实践

  1. 编辑前先阅读:始终先使用 cms_read_file 了解当前内容
  2. 使用精准编辑:优先使用 cms_search_replace,而非全文重写
  3. 预览草稿:设置 publish: false 保存草稿,审核后再使用 cms_publish
  4. 留意版本:cms_publish 会创建版本快照,可用于安全回滚
  5. 先搜索:使用 cms_grep 查找精确文本,再使用 cms_search_replace

完整发布工作流

1. cms_list_dir(path: "blog")           → See current articles
2. cms_write_file(path, content, false) → Create/update as draft
3. cms_read_file(path)                  → Review the saved content
4. cms_publish(paths: [path])           → Go live with version snapshot

MCP 服务名称

所有工具都通过 user-blink-mcp 服务访问:

server: "user-blink-mcp"
toolName: "cms_list_dir"
arguments: { "path": "blog" }

评论

支持 Markdown