Skip to main content
Glama

article-review-mcp

一个用于审查带分类评论的显式文章补丁的可视化 MCP 应用。

编辑代理不会将静默改写的稿件交给服务器。它提交:

unchanged base document
+ explicit patches against that base
+ one or more categorized rationale comments per patch

服务器以确定性方式验证并应用这些补丁,打开交互式审查界面,记录人工决策,并安全地组装最终文章。

为什么采用补丁优先

整篇文档的 diff 可以显示哪些内容发生了变化,但会丢失代理的原始意图。在本项目中,补丁是原子的审查对象:

Patch
├── exact target in the original document
├── replace / delete / insert_before / insert_after
├── proposed text
├── categorized comments explaining why
└── human decision: pending / accepted / rejected / edited

每条评论恰好有一个主要 topicId。一个补丁可以包含跨越不同主题的多条评论。

Related MCP server: Lens

当前能力

  • 针对不可变基础文档的显式 PatchSet 提交

  • replace、delete、insert_before 和 insert_after

  • 基础 SHA-256 校验

  • 带可选 contextBefore 和 contextAfter 的精确锚点解析

  • 拒绝歧义锚点和重叠补丁

  • 每个补丁都必须附带分类理由评论

  • 每次审查会话可自定义主题分类

  • 主题标签页,显示每个主题的补丁/评论计数

  • 两种主题审查模式:

    • 保持所有补丁可见并将无关补丁变暗

    • 仅显示包含所选主题的补丁

  • 拆分、统一和完整最终视图

  • 针对英文和中文的逐词插入/删除高亮

  • 接受、拒绝、重置、手动编辑以及批量决定可见补丁

  • 添加、回复、解决和筛选审查评论

  • 面向编辑代理的紧凑型主题过滤反馈

  • 不可变修订轮次,精确补丁决策可延续

  • JSON 持久化、乐观并发和幂等性

  • MCP 应用以及令牌保护的 localhost 浏览器查看器

  • 安全预览、写入新文件、受保护的覆盖写和静态 HTML 导出

  • 保留旧的 base + full proposal 工具作为弃用的兼容别名

需求

  • Node.js 20 或更高版本

  • 无需安装运行时依赖

验证

npm run check

该套件运行语法检查和 13 个测试,包括一次真实的 stdio MCP 交换和 localhost 查看器调用。

作为 MCP 服务器运行

node src/cli.mjs \
  --stdio \
  --workspace /absolute/path/to/your/writing-workspace

示例客户端配置:

{
  "mcpServers": {
    "article-review": {
      "command": "node",
      "args": [
        "/absolute/path/to/article-review-mcp/src/cli.mjs",
        "--stdio",
        "--workspace",
        "/absolute/path/to/your/writing-workspace"
      ]
    }
  }
}

主要代理调用

调用 article_review_submit_patchset:

{
  "title": "Introduction revision",
  "format": "markdown",
  "base": {
    "type": "workspace_file",
    "path": "manuscript.md"
  },
  "baseHash": "optional-sha256-of-the-base",
  "topics": [
    {
      "id": "architecture",
      "label": "架构与叙事",
      "description": "章节组织、研究主线和段落衔接"
    },
    {
      "id": "logic",
      "label": "逻辑与论证"
    },
    {
      "id": "clarity",
      "label": "表达与清晰度"
    }
  ],
  "patchSet": {
    "id": "revision-001",
    "summary": "补齐 Section 1 到 Section 2 的理论过渡",
    "patches": [
      {
        "id": "selection-pressure-bridge",
        "operation": "replace",
        "target": {
          "oldText": "The later experiments therefore held the candidate text fixed...",
          "contextBefore": "These results support Prediction 1...",
          "contextAfter": "LLM judge reliability varies..."
        },
        "newText": "Collectively, Section 1 establishes that...",
        "comments": [
          {
            "topicId": "architecture",
            "kind": "proposal_rationale",
            "title": "补齐 Section 1 → Section 2 的逻辑桥梁",
            "body": "原文从多智能体失败直接跳到 Judge reliability,缺少为什么需要 Judge 的理论过渡。",
            "severity": "major"
          },
          {
            "topicId": "logic",
            "kind": "proposal_rationale",
            "title": "明确研究问题递进关系",
            "body": "先证明系统存在选择失败,再验证 Judge 是否能够提供可靠信号。"
          }
        ]
      }
    ]
  }
}

补丁规则

  • 所有补丁都针对同一份未更改的基础文档。

  • 每个补丁必须包含至少一条分类评论。

  • 每条评论有且仅有一个主要 topicId。

  • target.oldText 必须解析到恰好一个位置。

  • 当相同文本重复出现时,使用 contextBefore 和 contextAfter。

  • 重叠补丁以及在不安全共享边界处的多次插入将被拒绝。

  • 服务器推导出提案;代理在主工作流中不提交第二份完整稿件。

典型验证错误:

BASE_HASH_MISMATCH
ANCHOR_NOT_FOUND
ANCHOR_AMBIGUOUS
PATCH_OVERLAP
MISSING_PATCH_COMMENT
UNKNOWN_COMMENT_TOPIC

主题聚焦审查

界面显示主题标签页,例如:

全部主题 12
架构与叙事 4
逻辑与论证 3
证据与引用 2
方法与统计 1
表达与清晰度 2

选择某个主题会将右侧评论过滤为仅该主题。稿件面板可以:

  • 保留所有补丁并将无关补丁变暗,或

  • 完全隐藏无关补丁。

J 和 K 仅导航与活动主题相关的补丁。

本地查看器回退

适用于不渲染 MCP 应用的客户端:

node src/cli.mjs \
  --viewer 4173 \
  --workspace /absolute/path/to/your/writing-workspace

查看器绑定到 127.0.0.1 并打印一个随机令牌保护的 URL。

合成演示:

npm run demo

主要工具

面向模型的工作流:

article_review_submit_patchset
article_review_open
article_review_get_feedback
article_review_add_comments
article_review_update_patchset
article_review_finalize

仅限应用的审查操作:

article_review_get_page
article_review_get_document
article_review_set_patch_decision
article_review_bulk_decide
article_review_edit_patch
article_review_add_comment
article_review_reply_comment
article_review_resolve_comment

弃用的兼容别名:

article_review_create
article_review_get_summary
article_review_update_proposal
article_review_set_decision
article_review_edit_hunk

安全不变量

  • 基础文档从原始片段逐字节重建。

  • 应用每个补丁可逐字节重建推导出的提案。

  • CRLF、空白、Markdown、中文、英文和基础 LaTeX 不会被规范化。

  • 稿件文本以惰性文本节点渲染,绝不通过 innerHTML。

  • 拒绝绝对路径、.. 遍历和目录符号链接逃逸。

  • 变更要求 expectedVersion 和 idempotencyKey。

  • 源文件覆盖写需要显式确认、源 SHA-256 校验以及备份。

文档

延后范围

  • DOCX 修订跟踪

  • PDF 编辑

  • 逐词部分接受

  • 实时多用户协作

  • Google Docs 同步

Available Tools

19 tools
article_review_add_commentAdd categorized review commentC

Attach one reviewer comment to a patch under exactly one primary topic.

Inputs: body (required), patchId (required), topicId (required), sessionId (required), +16 more.

article_review_add_commentsAdd categorized reviewer commentsC

Attach a batch of reviewer comments to existing patches. Each comment must use exactly one primary topicId.

Inputs: comments (required), sessionId (required), idempotencyKey (required), expectedVersion (required), +6 more.

article_review_bulk_decideBulk decide patchesC

Accept, reject, or reset all or selected patches.

Inputs: status (required), sessionId (required), idempotencyKey (required), expectedVersion (required), +6 more.

article_review_createCreate article review from full proposal (deprecated)A

Compatibility tool for base + complete proposal. Prefer article_review_submit_patchset so every change retains agent intent and categorized comments.

Inputs: base (required), title (required), proposal (required), format, +3 more.

article_review_edit_hunkEdit hunk (deprecated alias)C

Compatibility alias for article_review_edit_patch.

Inputs: hunkId (required), sessionId (required), editedText (required), idempotencyKey (required), +7 more.

article_review_edit_patchEdit patch outputC

Save a human-authored replacement for one patch.

Inputs: patchId (required), sessionId (required), editedText (required), idempotencyKey (required), +7 more.

article_review_finalizeFinalize reviewed articleA

Preview or safely write the article assembled from accepted, rejected, edited, and pending patches. Overwrite requires confirmation, hash checking, and backup.

Inputs: sessionId (required), mode, backup, destination, +3 more.

article_review_get_documentGet assembled documentC

Load the complete assembled document for the Final view.

Inputs: sessionId (required), pendingPolicy.

article_review_get_feedbackGet categorized review feedbackA

Return compact pending or rejected patch feedback for an editing agent. Filter by one comment topic without returning the complete manuscript.

Inputs: sessionId (required), topicId, statuses, includeComments.

article_review_get_pageGet filtered patch pageC

Load paginated patches, optionally showing only one comment topic.

Inputs: sessionId (required), limit, query, offset, +3 more.

article_review_get_summaryGet review summary (deprecated)A

Compatibility alias for article_review_get_feedback.

Inputs: sessionId (required).

article_review_openOpen article reviewC

Open an existing visual patch review and optionally filter it by comment topic.

Inputs: sessionId (required), limit, query, offset, +3 more.

article_review_reply_commentReply to review commentC

Record how an editing agent implemented a reviewer comment.

Inputs: commentId (required), sessionId (required), idempotencyKey (required), expectedVersion (required), +7 more.

article_review_resolve_commentResolve review commentC

Mark a review comment resolved or unresolved.

Inputs: commentId (required), sessionId (required), idempotencyKey (required), expectedVersion (required), +7 more.

article_review_set_decisionSet hunk decision (deprecated alias)D

Compatibility alias for article_review_set_patch_decision.

Inputs: hunkId (required), status (required), sessionId (required), idempotencyKey (required), +6 more.

article_review_set_patch_decisionSet patch decisionC

Accept, reject, or reset one patch.

Inputs: status (required), patchId (required), sessionId (required), idempotencyKey (required), +6 more.

article_review_submit_patchsetSubmit categorized article patchesA

Primary article-edit workflow. Submit the unchanged base document plus explicit non-overlapping patches. Every patch must include at least one comment assigned to exactly one primary topic. Use this instead of returning a giant rewritten document or textual diff in chat.

Inputs: base (required), title (required), patchSet (required), format, +4 more.

article_review_update_patchsetSubmit a revised patch setB

Create an immutable next review round from the same base document. Exact unchanged patches may carry decisions and reviewer comments; changed patches reset to pending.

Inputs: patchSet (required), sessionId (required), idempotencyKey (required), expectedVersion (required), +10 more.

article_review_update_proposalUpdate full proposal (deprecated)B

Compatibility tool for complete revised documents. Prefer article_review_update_patchset.

Inputs: proposal (required), sessionId (required), expectedVersion (required), limit, +7 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.6/5.0

    Scored across 19 tools

    Disambiguation2/5

    Multiple tools have overlapping purposes, including explicit compatibility aliases (create/submit_patchset, get_summary/get_feedback, set_decision/set_patch_decision, edit_hunk/edit_patch) and single/batch variants (add_comment/add_comments). This makes it difficult to tell tools apart despite clear descriptions.

    Naming Consistency3/5

    All tools share the article_review_ prefix, but verb/object patterns vary: some omit objects (open, finalize, create), one uses an adverb (bulk_decide), and compatibility aliases introduce inconsistent verbs for the same action (e.g., set_decision vs set_patch_decision).

    Tool Count4/5

    At 19 tools, the count is slightly above the ideal 3-15 range, but the patch-based review workflow is inherently complex. The presence of 5 redundant compatibility tools inflates the count unnecessarily, keeping it from a perfect score.

    Completeness4/5

    The surface covers the full review lifecycle: patch submission, update rounds, decisions, commenting, feedback, pagination, and finalization. Minor gaps exist, such as no explicit patch deletion or comment topic management, but these are workable.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      A stateful, AST-aware MCP server for structured code review workflows. It enables iterative review sessions with AST-based context localization and provides structured feedback with verdicts and patch suggestions for JavaScript/TypeScript code.
      1
      GPL 3.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server for searching and retrieving submissions, reviews, meta-reviews, rebuttals, and decisions from OpenReview venues like NeurIPS and ICLR, enabling peer review analysis.
      15 PyPI
      2
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server for creating, validating, and reviewing implementation plans in GitHub Copilot Chat, with visual review interface and MongoDB persistence.
      MIT