Supports Git submodule integration for managing the MCP server as a submodule within Re:VIEW projects
Supports GitHub repository integration for distributing and managing the MCP server as a submodule in Re:VIEW projects
Provides fast linting capabilities by compiling Re:VIEW documents to LaTeX format and analyzing stderr output for common errors and issues
Uses npm for package management and installation of the MCP server dependencies
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 versionreview.tags.list
- List allowed tagsreview.enforceTags.check
- Check for unknown tagsreview.fixIds.plan
- Plan ID fixes for empty/duplicate IDsreview.fixIds.apply
- Apply ID fixes with backupreview.lint
- Run fast lint checks
Hybrid Pipeline Commands
review.preprocess
- JS preprocessing (currently passthrough)review.build-pdf-hybrid
- Build PDF with hybrid pipelinereview.check-ruby-extensions
- Verify Ruby extensionsreview.test-mapfile
- Test mapfile with security validation
Security Commands
review.security.config
- Get current security configurationreview.security.validate-mapfile
- Validate mapfile pathsreview.security.compare
- Compare configs for SSOT compliance
Installation
Usage
Project Root (cwd) Specification
All MCP tools require a cwd
parameter pointing to your Re project root:
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
:
With ClaudeCode
Project Structure
Development
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:
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)
Recommended Workflow
- On save:
review.enforceTags.check
- Block unknown tags - Auto-fix:
review.fixIds.plan
→review.fixIds.apply
- Fix IDs - Lint:
review.lint
- Show warnings
Configuration
Optional review-mcp.json
:
License
MIT
Contributing
Issues and PRs welcome at GitHub repository
Related Issues
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
local-only server
The server can only run on the client's local machine because it depends on local resources.
Tools
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.