# paper-format-agent

Format academic DOCX files against a guide without rewriting their text. A content check can stop the save if body or table text changes.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 86
- Author: zxyasfas
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/zxyasfas/paper_format_agent
- Updated: 2026-07-29
- HTML: https://affpapa.org/en/nevibecode/mcp/paper-format-agent

## What it does

The MCP server offers `format_paper`, `extract_format_rules`, and `score_paper`. It applies document rules for fonts, spacing, indents, headings, and captions from a formatting guide. Processing stays on your machine.

Before saving, it compares fingerprints for body paragraphs and tables. A mismatch aborts the write. Headers and footers are outside this check, while equations, footnotes, and complex layouts fare worse than regular paragraphs and tables. Keep a separate review in your submission workflow.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add paper-format-agent -- uvx paper-format-agent
```
uvx runs the command named after the package; if the README names another one, use uvx --from paper-format-agent <command>

### Codex

**Platform CLI**
```bash
codex mcp add paper-format-agent -- uvx paper-format-agent
```
uvx runs the command named after the package; if the README names another one, use uvx --from paper-format-agent <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "paper-format-agent": {
            "command": "uvx",
            "args": [
                "paper-format-agent"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from paper-format-agent <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "paper-format-agent": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "paper-format-agent"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from paper-format-agent <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add paper-format-agent uvx paper-format-agent
```
uvx runs the command named after the package; if the README names another one, use uvx --from paper-format-agent <command>

## When to use it
- format a DOCX to match a document guide
- extract layout rules from a sample file
- check body and table text after formatting
- score a paper's formatting before submission

## Example prompts
- Format `paper.docx` using `format_guide.docx` and save the result in `./output`.
- Extract formatting rules from `format_guide.docx`.
- Score the formatting in `paper.docx`.

## Similar
- [Excel MCP Server](https://affpapa.org/en/nevibecode/mcp/excel-mcp-server.md) — MCP server · ★ 4259
- [kordoc](https://affpapa.org/en/nevibecode/mcp/kordoc.md) — MCP server · ★ 2726
- [Power BI Authoring MCP Server (Local)](https://affpapa.org/en/nevibecode/mcp/power-bi-authoring-mcp-server-local.md) — MCP server · ★ 1247
- [Microsoft 365 MCP Server](https://affpapa.org/en/nevibecode/mcp/microsoft-365-mcp-server.md) — MCP server · ★ 1074
- [anymd](https://affpapa.org/en/nevibecode/mcp/anymd.md) — MCP server · ★ 1051
- [Docling MCP](https://affpapa.org/en/nevibecode/mcp/docling-mcp.md) — MCP server · ★ 777

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
