ReviewMCP

ReviewMCP

Enables automatic validation and correction of Re:VIEW manuscript files by checking for unauthorized tags, fixing duplicate/empty IDs, and running fast lint checks to prevent common errors during writing.

Category
Visit Server

README

review-mcp-min(Re:VIEW用 最小MCPサーバー)

目的: 執筆の手を止めずに、Re:VIEW原稿のエラーを未然に防ぐ。

  • 保存時に 許可外タグをブロック(“勝手なタグ定義”を禁止)
  • ID(空/重複)を自動修正(人間可読な命名でユニーク化)
  • 迅速な Lintreview-compile --target=latex)で代表的な落とし穴を検出
  • Re:VIEW 5.8 / 2.5(ReviewStarter) の両環境に将来的に対応可能(本雛形は5.8を前提に構成)

プロジェクトルート(cwd)の指定について

MCPサーバーの各ツール呼び出しでは cwd を指定します。
これは「Re:VIEWプロジェクトのルートディレクトリ」のことです。

典型的な構成例:

mybook/              ← ここが cwd
├── config.yml       ← 必須
├── catalog.yml      ← 必須
├── ch01.re
├── ch02.re
├── images/
└── ...

つまり、config.ymlcatalog.yml があるディレクトリcwd として渡してください。

MCPツール呼び出し例

補足: 普段からプロジェクト直下に移動して作業する場合

もし常に cd mybook/ のように プロジェクトルートで作業しているなら、 --cwd . を指定するだけで十分です。

例:

cd ~/books/mybook
node tools/review-mcp/scripts/ci-lint.mjs --cwd .

将来的には --cwd を省略しても process.cwd() を自動で使う仕様に拡張可能です。

{
  "tool": "review.lint",
  "args": { "cwd": "/Users/daisuke/books/mybook" }
}

CLIから直接呼ぶ場合

# 診断のみ
node tools/review-mcp/scripts/ci-lint.mjs --cwd /Users/daisuke/books/mybook

# ID自動修正も適用
node tools/review-mcp/scripts/ci-lint.mjs --cwd /Users/daisuke/books/mybook --apply-ids

ポイント: cwd に渡すのは必ず「プロジェクトのトップディレクトリ」です。
その直下に config.ymlcatalog.yml が存在していなければいけません。


同梱ツール(MVP)

  • review.version — Re:VIEW CLI バージョン取得
  • review.tags.list — 内蔵の保守的Allowlist(後で動的プローブに置換予定)
  • review.enforceTags.check — 許可外タグの検出(保存ブロック用)
  • review.fixIds.plan / review.fixIds.apply — IDの空欄/重複の自動修正
  • review.lint — 高速Lint(各 .re を latex 変換に通して stderr を解析)

展開方法(2つの配布形態)

A. リリースZIPとして展開(単体配布)

  1. 本リポジトリのリリースで配布する review-mcp-min.zip を展開
  2. npm i
  3. npm run start で MCP サーバー起動
  4. ClaudeCode から MCP サーバーに接続し、ツール呼び出し時の引数 cwdRe:VIEWプロジェクトのルートを指定します。

B. Git サブモジュール運用

  1. GitHub 上に本サーバー(独立リポジトリ)を作成(例:your-org/review-mcp
  2. 各 Re:VIEW プロジェクトでサブモジュールとして追加:
    git submodule add git@github.com:your-org/review-mcp.git tools/review-mcp
    git submodule update --init --recursive
    
  3. 実行:
    cd tools/review-mcp
    npm i
    npm run start
    
  4. ClaudeCode 側からは cwdプロジェクトルートに指定してツールを呼び出してください。

保存時の推奨フロー

  1. review.enforceTags.check — 許可外タグがあれば保存を中断
  2. review.fixIds.planreview.fixIds.apply — ID を自動修正.bak を残す)
  3. review.lint — 代表的な注意点(例://' seen but is not valid commandduplicate ID)を警告表示

CI / Rake 連携(ヘッドレス実行)

scripts/ci-lint.mjs

  • MCP クライアント不要のヘッドレス検査スクリプトです。
  • 機能:許可外タグ検出、ID自動修正の計画/適用、快速Lint。

使い方:

# 診断のみ(プロジェクトルートで)
node tools/review-mcp/scripts/ci-lint.mjs --cwd .

# ID自動修正も適用
node tools/review-mcp/scripts/ci-lint.mjs --cwd . --apply-ids

設定ファイル(任意) review-mcp.json

{
  "profile": "dual",
  "target": "latex",
  "blockOnUnknownTags": true,
  "autoFixIdsOnSave": true
}

よくある質問

Q. MCPサーバーはプロジェクト直下に置くべき?

  • どちらでもOKです。別ディレクトリで独立運用しても、サブディレクトリに同梱しても動作します。
  • 重要なのは、ツール引数 cwdRe:VIEWプロジェクトのルートにすること。

Q. 2.5(ReviewStarter) との両対応は?

  • 本雛形では 保守的Allowlist によるガードのみ提供しています。
  • 将来的に review.tags.list動的プローブ+キャッシュに差し替え、5.8/2.5 双方で“実際に通るタグ”集合を確定させます。
  • profile: "dual"(共通集合のみ許可)で“どちらにも通る原稿”を担保する運用を想定。


セットアップ(ClaudeCode / Claude Desktop 側)

MCPサーバーを利用するには、ClaudeCode や Claude Desktop 側で「サーバー登録」が必要です。

方法A: Claude Desktop の設定ファイルに追記

  1. mac の場合、~/Library/Application Support/Claude/claude_desktop_config.json を開きます。
    (アプリの Developer Settings → Edit Config からも編集可能)

  2. "mcpServers" に以下のように追加してください(絶対パスに置き換え必須):

{
  "mcpServers": {
    "review-mcp": {
      "command": "node",
      "args": [
        "/Users/あなたのユーザー名/books/mybook/tools/review-mcp/node_modules/.bin/tsx",
        "/Users/あなたのユーザー名/books/mybook/tools/review-mcp/src/index.ts"
      ]
    }
  }
}
  1. Claude Desktop を再起動すると、ツール一覧に review-mcp が表示されます。
    ログは ~/Library/Logs/Claude/mcp*.log で確認可能です。

方法B: ClaudeCode (VS Code拡張) でCLI追加

VS Code の「Claude Code」拡張を使用している場合、以下のコマンドで追加できます:

cd ~/books/mybook
claude mcp add review-mcp -s project --   node ./tools/review-mcp/node_modules/.bin/tsx ./tools/review-mcp/src/index.ts

-s はスコープを指定します(project / local / user)。
まずは local で試してから、安定したら project に切り替えるのが安全です。


開発メモ

  • src/index.tsreview.tags.list を差し替えて、動的プローブ(review-compile にダミー原稿を通して合否判定)+ cache/ 保持を実装してください。
  • cache/.gitignore 推奨(配布時は空にしてOK)。

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured