Skip to main content
Glama

ReviewMCP

by dsgarage

review-mcp-min

Minimal MCP (Model Context Protocol) server for Re document processing with JS/Ruby hybrid pipeline.

Version

v0.1.0 - Initial release with hybrid pipeline support

Features

Core Functionality

  • Tag Enforcement: Validates Re markup tags against configurable allowlists
  • ID Management: Automatically fixes empty/duplicate IDs in blocks and captions
  • Fast Linting: Quick sanity checks via LaTeX compilation
  • Hybrid Pipeline: JS preprocessing + Ruby (LaTeX Builder) for PDF generation

Security (SSOT - Single Source of Truth)

  • Dynamic security configuration loading from ReviewExtention
  • Two-layer defense: MCP pre-sanitization + Ruby final validation
  • Path traversal and absolute path blocking for mapfile macros
  • File size and extension validation

MCP Commands

Basic Commands
  • review.version - Get Re CLI version
  • review.tags.list - List allowed tags
  • review.enforceTags.check - Check for unknown tags
  • review.fixIds.plan - Plan ID fixes for empty/duplicate IDs
  • review.fixIds.apply - Apply ID fixes with backup
  • review.lint - Run fast lint checks
Hybrid Pipeline Commands
  • review.preprocess - JS preprocessing (currently passthrough)
  • review.build-pdf-hybrid - Build PDF with hybrid pipeline
  • review.check-ruby-extensions - Verify Ruby extensions
  • review.test-mapfile - Test mapfile with security validation
Security Commands
  • review.security.config - Get current security configuration
  • review.security.validate-mapfile - Validate mapfile paths
  • review.security.compare - Compare configs for SSOT compliance

Installation

# Clone the repository git clone https://github.com/dsgarage/ReviewMCP.git cd review-mcp-min # Install dependencies npm install # Build TypeScript npm run build # Start MCP server npm start

Usage

Project Root (cwd) Specification

All MCP tools require a cwd parameter pointing to your Re project root:

mybook/ ← This is cwd ├── config.yml ← Required ├── catalog.yml ← Required ├── ch01.re ├── ch02.re ├── images/ └── ...

The cwd must be the directory containing config.yml and catalog.yml.

With Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{ "mcpServers": { "review-mcp": { "command": "node", "args": [ "/path/to/review-mcp-min/node_modules/.bin/tsx", "/path/to/review-mcp-min/src/index.ts" ] } } }

With ClaudeCode

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

Project Structure

review-mcp-min/ ├── src/ │ ├── index.ts # MCP server main │ ├── commands/ │ │ └── hybrid-pipeline.ts # Hybrid pipeline commands │ ├── config/ │ │ └── security.ts # SSOT security configuration │ └── utils/ │ └── runCommand.ts # Command execution utilities ├── articles/ # Re:VIEW test documents │ ├── chapter01.re │ └── chapter02.re ├── config.yml # Re:VIEW configuration ├── catalog.yml # Re:VIEW catalog └── test-build.js # Test script for hybrid pipeline

Development

# Run in development mode npm run dev # Type checking npm run typecheck # Build npm run build # Test PDF generation node test-build.js

Testing

The repository includes test Re documents demonstrating various features:

  • Inline tags (strong, em, code, tt, kw)
  • Block tags (list, emlist, note, memo, cmd, quote)
  • Tables, source code blocks, footnotes
  • Security and SSOT configuration examples

Run the test build:

review-pdfmaker config.yml

CI/CD

GitHub Actions workflow included (.github/workflows/mcp-hybrid.yml) for:

  • Multi-version testing (Node.js 18/20, Ruby 3.x)
  • Security configuration validation
  • PDF generation testing
  • SSOT compliance checking

Requirements

  • Node.js 18+
  • Ruby + Bundler
  • Re gem (5.x recommended)
  • TeX Live (for PDF generation with uplatex)
  1. On save: review.enforceTags.check - Block unknown tags
  2. Auto-fix: review.fixIds.planreview.fixIds.apply - Fix IDs
  3. Lint: review.lint - Show warnings

Configuration

Optional review-mcp.json:

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

License

MIT

Contributing

Issues and PRs welcome at GitHub repository

  • #5 - Ruby implementation integration
  • #6 - Hybrid pipeline commands
  • #7 - SSOT security configuration

Author

@dsgarage

Changelog

v0.1.0 (2025-01-08)

  • Initial release
  • Hybrid JS/Ruby pipeline implementation
  • SSOT security configuration
  • Basic Re tag validation and ID management
  • Test documents and PDF generation support
Deploy Server
-
security - not tested
F
license - not found
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

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.

  1. Version
    1. Features
      1. Core Functionality
      2. Security (SSOT - Single Source of Truth)
      3. MCP Commands
    2. Installation
      1. Usage
        1. Project Root (cwd) Specification
        2. With Claude Desktop
        3. With ClaudeCode
      2. Project Structure
        1. Development
          1. Testing
            1. CI/CD
              1. Requirements
                1. Recommended Workflow
                  1. Configuration
                    1. License
                      1. Contributing
                        1. Related Issues
                          1. Author
                            1. Changelog
                              1. v0.1.0 (2025-01-08)

                            MCP directory API

                            We provide all the information about MCP servers via our MCP API.

                            curl -X GET 'https://glama.ai/api/mcp/v1/servers/dsgarage/ReviewMCP'

                            If you have feedback or need assistance with the MCP directory API, please join our Discord server