PluginBench
MCP Server
Active
MIT

io.github.zxyasfas/paper-format-agent MCP Server

io.github.zxyasfas/paper-format-agent

Local-first DOCX formatter for academic papers with content-integrity verification.

What is the io.github.zxyasfas/paper-format-agent MCP server?

The Paper Format Agent MCP server is a local DOCX formatter for academic theses and papers that applies formatting rules (fonts, spacing, indents, headings, captions) without rewriting content. It includes a content-fingerprint integrity guard that aborts if any text changes during formatting, ensuring your paper's substance remains untouched.

This server formats academic papers in DOCX format according to a format guide while protecting content integrity. It runs entirely locally, applies styling changes to match institutional or journal requirements, and verifies via SHA256 fingerprinting that no text was altered. Useful for students and researchers preparing submissions to schools or journals with strict formatting standards.

How to install io.github.zxyasfas/paper-format-agent

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "paper-format-agent": {
      "command": "uvx",
      "args": [
        "paper-format-agent"
      ]
    }
  }
}
Cursor
~/.cursor/mcp.json
{
  "mcpServers": {
    "paper-format-agent": {
      "command": "uvx",
      "args": [
        "paper-format-agent"
      ]
    }
  }
}
Windsurf
~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "paper-format-agent": {
      "command": "uvx",
      "args": [
        "paper-format-agent"
      ]
    }
  }
}
VS Code
.vscode/mcp.json
{
  "servers": {
    "paper-format-agent": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "paper-format-agent"
      ]
    }
  }
}
Claude Code
claude mcp add paper-format-agent -- uvx paper-format-agent

Tools & capabilities

Tools this server exposes to the agent.

  • format_paperFormats a DOCX paper file according to a format guide, applying changes to fonts, spacing, indents, headings and captions while verifying content integrity via fingerprint comparison.
  • extract_format_rulesExtracts formatting rules from a format guide DOCX file to understand the target formatting specifications.
  • score_paperScores a paper against formatting requirements, checking for compliance issues like missing sections or text size violations.

Use cases

  • Format a thesis or journal paper to match institutional style guides without accidentally altering the text content.
  • Verify that automated formatting did not change any body text or table content before submission.
  • Extract formatting specifications from a template document to apply consistently across multiple papers.
  • Check a paper for formatting compliance issues before final submission to a school or journal.
  • Batch format multiple papers using JSON template packs for common formats (Chinese thesis, IEEE, journal styles).

io.github.zxyasfas/paper-format-agent MCP server FAQ

What does the Paper Format Agent do?

It formats DOCX files for academic papers by adjusting fonts, spacing, indents, headings, and captions to match a format guide. Critically, it includes a content-fingerprint guard that aborts and refuses to save if any text content changes during formatting.

Is it free?

Yes, Paper Format Agent is open-source under the MIT license and free to use.

How do I install it in Cursor or Claude?

Install via pip: `pip install "paper-format-agent[mcp]"`, then run `paper-format-agent-mcp`. Configure your client using the settings in docs/MCP.md.

Does it require authentication or internet?

No. Everything runs locally on your machine with no uploads or external API calls.

What formats does it support?

It works with DOCX files. It includes JSON template packs for Chinese thesis, journal, and IEEE-style formats. Reference-list formatting is handled by a separate tool (gbt7714_check).

What are the limitations?

Early project with better support for ordinary paragraphs, headings and tables than equations, footnotes, and complex layouts. Do not use as the only check before submission; keep your original file.

README (reference)

Source of truth, from the repository.

<!-- mcp-name: io.github.zxyasfas/paper-format-agent -->

Paper Format Agent

中文说明 | English

CI Python License

A local DOCX formatter for theses and papers.

It changes fonts, spacing, indents, headings and captions to match a format guide. It does not rewrite the paper. Before saving, it compares a fingerprint of the body and table text from before and after the run. If the text changed, it aborts instead of writing the formatted file.

Everything runs on your machine. Nothing is uploaded.

the content check

Report fields from a real run (--engine python):

{
  "content_fingerprint_before": "793e6533fd670418141d11fdcf014be19750408129ecff8b1b78a2641a3786db",
  "content_fingerprint_after":  "793e6533fd670418141d11fdcf014be19750408129ecff8b1b78a2641a3786db",
  "content_changed": false,
  "content_guard_enforced": true
}

The two hashes should match. If they don't, the formatter exits with content guard failed and the formatted DOCX is not written.

What the check covers: body paragraphs and tables, with whitespace and stray bullet characters normalized before comparing. Headers and footers are out of scope because the formatter sets those on purpose. Use --engine python when the fingerprint must cover the final saved DOCX; the other engines run a local post-processor after the check, e.g. to refresh the table of contents.

To watch the guard trip, run python tools/demo_content_guard.py. It formats a synthetic paper, then repeats the run with the styling step patched to edit one sentence of the in-memory document. The second run aborts without writing the DOCX.

docs/BENCHMARK.md tracks which authored strings survive a run in small synthetic fixtures, and lists the known gaps.

install and run

pip install -r requirements.txt

python -m paper_format_agent.cli \
  --format-file "format_guide.docx" \
  --paper-file "paper.docx" \
  --out-dir "./output" \
  --engine python

There is also a GUI (python run_gui.py), a batch mode, and JSON template packs for Chinese thesis, journal and IEEE-style formats. See docs/USAGE.md.

limits

Early project. Ordinary paragraphs, headings and tables work better than equations, footnotes and complex layouts. With --strict-required-sections, checks may include char_below_min or blank_page_risk. Do not use it as the only check before a real submission. Keep your original file.

Reference-list formatting is out of scope here: that part is mechanical rules, so it lives in a separate tool, gbt7714_check, which lints reference entries against GB/T 7714.

why I made this

I did not want to upload an unfinished thesis to a formatting website, and I wanted a way to check that formatting did not touch the text. So the default engine runs locally and refuses to save if the text changed.

agents

The repo doubles as an installable agent skill (SKILL.md), and the same pipeline is available as an optional MCP server (Python 3.10+):

pip install "paper-format-agent[mcp]"
paper-format-agent-mcp

Tools: format_paper, extract_format_rules, score_paper. Client config in docs/MCP.md.

contributing

Small PRs are welcome. Adding a synthetic test for a school or journal formatting rule is a good place to start: docs/CONTRIBUTOR_TASKS.md, CONTRIBUTING.md. Notes on the pipeline are in docs/ARCHITECTURE.md.

Do not commit real papers, private school templates, reviewer comments, API keys or generated output. Synthetic fixtures only.

license

MIT. See LICENSE.

Related MCP servers

Control a real Chrome browser to complete any task: fill forms, extract data, book flights.

110k
Python
MIT
View repository →

Real-time global intelligence: markets, conflicts, country risk, energy, and infrastructure monitoring via 39 MCP tools.

83k
TypeScript
AGPL-3.0
View repository →

Netdata

Active

Real-time infrastructure monitoring with per-second metrics, ML-powered anomaly detection, and zero-configuration setup.

80k
Go
GPL-3.0
View repository →

Trending hip-hop artist momentum scores across four cultural dimensions.

79k
TypeScript
MIT
View repository →

AI orchestration platform with 100+ agents, swarm coordination, and self-learning memory for enterprise development.

68k
TypeScript
MIT
View repository →

Web scraping with stealth HTTP, real browsers, and Cloudflare bypass capabilities.

67k
Python
BSD-3-Clause
View repository →