Carve

io.github.markup-carve由 GitHub 账号 markup-carve 发布v0.1.12更新于 Oct 29, 2026

Parse, lint, format, render, and migrate Carve documents through MCP.

已验证STDIO仅桌面文件与存储开发者工具

概览

AI 生成的概览

面向 Carve 标记语言的 MCP 服务器,让助手解析、检查、格式化、渲染、迁移并安全修改 Carve 文档。

可以做什么
  • 检查、诊断并格式化 Carve 源码,仅应用选定的安全修复
  • 将 Carve 渲染为 HTML、Markdown、纯文本或 ANSI 文本,并对比不同目标配置的输出
  • 把 Carve 解析为带位置信息的 AST,并按 ID、标题、脚注或路径选取节点
  • 读取节点或标题章节的精确源码文本,附带字节偏移与源码哈希
  • 规划、生成并应用可逆 AST 补丁,或在精确源码字节上拼接替换文本
  • 将 HTML、Markdown、Djot 或 BBCode 迁移为 Carve 并给出保真度诊断
适用场景
适合在编辑 Carve 文档时让助手检查、格式化、转换或修改内容,而不必重写整个文件。尤其适用于需要精确、可审阅的局部修改,且要求文档其余部分保持字节不变的场景。
运行要求
以 npm 包(@markup-carve/carve-mcp)通过 stdio 在本机运行,需全局安装或使用 npx,并需要 Node.js。文件访问仅限已配置的根目录。未声明认证、环境变量或请求头。
安装前请注意
部分工具会生成源码修改与补丁;服务器说明自身不写入文件,返回的补丁需由客户端应用。标记为需作者复核的修复不会被自动应用。文件访问受配置根目录限制,请确认授予的目录范围。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Carve,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Carve MCP server

MCP server for the Carve parser, linter, formatter, and renderers, using @markup-carve/carve 0.1.15 or later. File access is enabled only for configured roots. Read the Carve documentation for the language syntax.

Install

sh
npm install -g @markup-carve/carve-mcp

Usage

sh
carve-mcp --help

Documentation

License

MIT

来源:README.md,提交 cdf92a2

工具

15

carve_lint

Lint Carve

Check Carve source for author-facing problems and silent degradation.

输入参数source必填platforms

carve_diagnose_and_fix

Diagnose and fix Carve

Diagnose Carve source, propose bounded fixes, and optionally apply selected safe fix IDs with forward and undo patches. Writer-review fixes are never applied automatically.

输入参数source必填platformsapplyFixIds

carve_format

Format Carve

Format Carve source canonically and report any lossy raw-format nodes.

输入参数source必填alignTables

carve_render

Render Carve

Render Carve to HTML, Markdown, plain text, or ANSI terminal text, with loss reporting.

输入参数presetsource必填target必填extensionsallowRawHtmlsanitizeUrlsstrictLossesasciiHeadingIdsmaxRenderLossessmartTypographylowercaseHeadingIds

carve_check_targets

Check Carve publishing targets

Compare one Carve document across HTML, Markdown, plain text, ANSI, GitHub, WordPress, and PDF-stage profiles, returning target-specific warnings, losses, and fallbacks.

输入参数source必填targets

carve_parse

Parse Carve

Parse and resolve Carve into its position-aware interchange AST.

输入参数source必填positions

carve_create_ast_patch

Create structured AST patch

Compare two PART 12 Carve ASTs and return position-independent add, replace, and remove operations.

输入参数after必填before必填

carve_apply_ast_patch

Apply structured AST patch

Validate and apply structured operations to a PART 12 Carve AST, returning the patched AST and canonical Carve source.

输入参数ast必填operations必填

carve_select_ast_nodes

Find AST nodes by semantic selector

Resolve an element ID on any node, a heading ID, footnote label, node type, or current AST path to reviewable PART 12 AST paths without silently choosing among multiple matches.

输入参数ast必填selector必填

carve_get_block

Get Carve source blocks

Return the exact source text of the nodes a selector matches, or a heading's section, with UTF-8 byte offsets and the source sha256. No AST unless includeAst.

输入参数scopesource必填selector必填includeAst

carve_replace_source

Replace Carve source of one node

Splice Carve text over the exact source bytes of one selected node or heading section, leaving every other byte untouched. Refuses if the node kind changes, the rest of the document parses differently, or new lint findings appear. Returns forward and undo patches.

输入参数text必填scopesource必填selector必填includeSourceexpectedSha256

carve_plan_ast_edit

Plan a semantic AST edit

Plan one or more atomic semantic AST edits and return a human-readable, reversible, stale-guarded source patch without writing the document.

输入参数edit必填thensource必填selector必填

carve_create_reversible_ast_patch

Create reversible AST patch

Compare two PART 12 ASTs and return forward and inverse operations with semantic stale-edit fingerprints.

输入参数after必填before必填

carve_apply_reversible_ast_patch

Preview reversible AST patch as source edits

Verify a reversible AST patch against source, apply or undo it, and return a minimal stale-guarded UTF-8 source edit without writing files.

输入参数patch必填source必填inverseincludeAst

carve_migrate

Migrate to Carve

Migrate HTML, Markdown, Djot, or BBCode source to Carve with version 2 fidelity diagnostics.

输入参数format必填source必填markdownDialect

版本历史

8
  1. v0.1.12最新Oct 26, 2026
  2. v0.1.11Oct 25, 2026
  3. v0.1.10Oct 23, 2026
  4. v0.1.9Oct 18, 2026
  5. v0.1.8Oct 15, 2026
  6. v0.1.7Oct 8, 2026
  7. v0.1.6Oct 2, 2026
  8. v0.1.4Sep 16, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分