blink-cms

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Blink CMS via MCP

基于MCP的Blink CMS

Publish and manage content on blink.new using the
user-blink-mcp
server. The MCP treats the Blink CMS like a virtual file system with built-in versioning and draft management.
使用
user-blink-mcp
服务器在blink.new上发布和管理内容。MCP将Blink CMS视作内置版本控制和草稿管理能力的虚拟文件系统。

Quick Reference

快速参考

TaskToolKey Params
List content
cms_list_dir
path: "docs"
or
"blog"
Read article
cms_read_file
path: "blog/article.mdx"
Create/Update
cms_write_file
path
,
content
,
publish
Edit section
cms_search_replace
path
,
old_string
,
new_string
Publish
cms_publish
paths: ["blog/x.mdx"]
Find text
cms_grep
query
,
type
Semantic search
cms_search
query
,
type
See drafts
cms_list_drafts
type
Version history
cms_get_versions
path
任务工具核心参数
列出内容
cms_list_dir
path: "docs"
"blog"
读取文章
cms_read_file
path: "blog/article.mdx"
创建/更新
cms_write_file
path
,
content
,
publish
编辑段落
cms_search_replace
path
,
old_string
,
new_string
发布
cms_publish
paths: ["blog/x.mdx"]
查找文本
cms_grep
query
,
type
语义搜索
cms_search
query
,
type
查看草稿
cms_list_drafts
type
版本历史
cms_get_versions
path

Content Structure

内容结构

/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
/docs/              → 文档(快速入门、定价、参考文档等)
/docs/build/        → 开发指南(提示词编写、教程、Web应用)
/docs/extend/       → 后端功能(数据库、鉴权、存储)
/docs/launch/       → 部署相关(域名、分析)
/blog/              → 博客文章

Frontmatter Schema

前置元数据结构

Every article must include frontmatter:
yaml
---
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
---
Categories:
  • Product
    — Announcements, launches, feature updates
  • Engineering
    — Technical deep-dives, best practices
  • Tutorial
    — Step-by-step guides
  • Case Study
    — Customer success stories
每篇文章必须包含前置元数据:
yaml
---
title: "Article Title"
description: "Brief summary for SEO and cards"
category: "Engineering"        # Product, Engineering, Tutorial, Case Study
tags: ["AI", "Productivity"]   # 自由格式数组
status: "published"            # 发布操作会覆盖该字段
---
分类说明:
  • Product
    — 公告、产品上线、功能更新
  • Engineering
    — 技术深度解析、最佳实践
  • Tutorial
    — 分步操作指南
  • Case Study
    — 客户成功案例

Creating a New Article

创建新文章

cms_write_file(
  path: "blog/my-article.mdx",
  content: ---
title: "My Article Title"
description: "What this article is about"
category: "Engineering"
tags: ["AI", "Tips"]
---
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 )

Then publish when ready:
cms_publish(paths: ["blog/my-article.mdx"])
undefined
你的MDX组件内容放在这里。
<Tip>使用Tip组件展示有用提示。</Tip> , publish: false # 先保存为草稿 )

准备就绪后即可发布:
cms_publish(paths: ["blog/my-article.mdx"])
undefined

Editing Existing Articles

编辑已有文章

Method 1: Full rewrite (use sparingly)
cms_write_file(path: "blog/article.mdx", content: "...full content...", publish: true)
Method 2: Surgical edit (preferred)
cms_search_replace(
  path: "blog/article.mdx",
  old_string: "## Introduction\n\nOld text here",
  new_string: "## Introduction\n\nNew text here"
)
Include 3-5 lines of context for unique matches. Flexible whitespace matching handles indentation differences automatically.
方法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行上下文以确保匹配唯一。灵活的空白匹配功能会自动处理缩进差异。

Finding Content

查找内容

Fuzzy text search (finds exact phrases):
cms_grep(query: "deployment", type: "blog", limit: 10)
Semantic search (finds by meaning):
cms_search(query: "how to deploy apps", type: "blog")
模糊文本搜索(查找精确短语):
cms_grep(query: "deployment", type: "blog", limit: 10)
语义搜索(按内容含义查找):
cms_search(query: "how to deploy apps", type: "blog")

Version Control

版本控制

undefined
undefined

See all versions

查看所有版本

cms_get_versions(path: "blog/article.mdx")
cms_get_versions(path: "blog/article.mdx")

Restore a specific version

恢复指定版本

cms_activate_version(path: "blog/article.mdx", version: 3)
undefined
cms_activate_version(path: "blog/article.mdx", version: 3)
undefined

Draft Workflow

草稿工作流

undefined
undefined

Check for unpublished changes

检查未发布的更改

cms_list_drafts(type: "blog")
cms_list_drafts(type: "blog")

Discard draft (revert to last published)

丢弃草稿(恢复到上一个已发布版本)

cms_discard_draft(path: "blog/article.mdx")
undefined
cms_discard_draft(path: "blog/article.mdx")
undefined

MDX Components

MDX组件

Common components for rich content:
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>
用于丰富内容的常用组件:
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>

Workflow Best Practices

工作流最佳实践

  1. Read before editing: Always
    cms_read_file
    first to understand current content
  2. Use surgical edits: Prefer
    cms_search_replace
    over full rewrites
  3. Preview drafts: Set
    publish: false
    to save drafts, review, then
    cms_publish
  4. Version awareness:
    cms_publish
    creates version snapshots—use for rollback safety
  5. Search first: Use
    cms_grep
    to find exact text before
    cms_search_replace
  1. 编辑前先读取内容:始终先执行
    cms_read_file
    了解当前内容
  2. 优先使用精准编辑:优先选择
    cms_search_replace
    而非全量重写
  3. 预览草稿:设置
    publish: false
    保存草稿,审核通过后再执行
    cms_publish
  4. 具备版本意识
    cms_publish
    会创建版本快照,可用于安全回滚
  5. 先搜索再编辑:执行
    cms_search_replace
    前先使用
    cms_grep
    查找精确文本

Complete Publishing Workflow

完整发布工作流

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
1. cms_list_dir(path: "blog")           → 查看现有文章
2. cms_write_file(path, content, false) → 作为草稿创建/更新内容
3. cms_read_file(path)                  → 审核已保存的内容
4. cms_publish(paths: [path])           → 正式上线并生成版本快照

MCP Server Name

MCP服务器名称

All tools are accessed via the
user-blink-mcp
server:
server: "user-blink-mcp"
toolName: "cms_list_dir"
arguments: { "path": "blog" }
所有工具都通过
user-blink-mcp
服务器访问:
server: "user-blink-mcp"
toolName: "cms_list_dir"
arguments: { "path": "blog" }