Document Generator MCP MCP Server

$npx document-generator-mcp@latest
README.md

Generate professional Word and PDF documents with Markdown and smart pagination.

Document Generator MCP

An MCP (Model Context Protocol) server to generate professional Word (.docx) and PDF documents from any AI agent that supports MCP, including Claude Desktop, Amazon Q Developer, Cline, Continue, and others.

๐Ÿš€ Features

  • โœ… Generate Word documents (.docx)
  • โœ… Generate PDF documents
  • โœ… Auto-detect JSON blocks (no backticks needed!) ๐Ÿ†•
  • โœ… Professional syntax highlighting (VS Code Dark theme)
  • โœ… Smart pagination (no content cuts between pages)
  • โœ… 100% responsive formatting (respects A4 margins)
  • โœ… Markdown support (headings, lists, bold, italic, code blocks)
  • โœ… Automatic professional formatting
  • โœ… Metadata (author, creation date)

๐Ÿ“ฆ Installation

Via NPX (Recommended)

npx document-generator-mcp@latest

Via NPM Global

npm install -g document-generator-mcp

โš™๏ธ Configuration

Claude Desktop

  1. Locate the configuration file:

    • Linux: ~/.config/claude-desktop/claude_desktop_config.json
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  2. Add this configuration:

{
  "mcpServers": {
    "document-generator": {
      "command": "npx",
      "args": ["--yes", "--cache", "/tmp/.npx-cache", "document-generator-mcp@latest"]
    }
  }
}
  1. Restart Claude Desktop

Amazon Q Developer

  1. Open VS Code with Amazon Q extension
  2. Access Amazon Q settings
  3. Add the MCP server:
{
  "mcpServers": {
    "document-generator": {
      "command": "npx",
      "args": ["--yes", "--cache", "/tmp/.npx-cache", "document-generator-mcp@latest"]
    }
  }
}

Other MCP Agents (Cline, Continue, etc.)

For other agents that support MCP, add the server configuration:

{
  "name": "document-generator",
  "command": "npx",
  "args": ["--yes", "--cache", "/tmp/.npx-cache", "document-generator-mcp@latest"]
}

Check your agent's specific documentation for configuration details.

๐ŸŽฏ How to Use

After configuration, you can use natural commands in any MCP agent:

Example Prompts

  • "Create a Word document about sales analysis"
  • "Generate a PDF report about the project"
  • "Make a technical manual in Word and PDF"
  • "Create API documentation in Word format"
  • "Document this JavaScript code with examples"

Available Tools

  • gerar_documento_word: Creates Word documents, PDF, or both
  • gerar_documento_pdf: Creates PDF documents only

๐Ÿ“ Supported Formatting

The MCP automatically processes:

Markdown

  • # Heading 1 โ†’ Heading 1 (20pt)
  • ## Heading 2 โ†’ Heading 2 (16pt, blue)
  • ### Heading 3 โ†’ Heading 3 (14pt)
  • #### Heading 4 โ†’ Heading 4 (12pt)
  • - Item โ†’ Bulleted list
  • 1. Item โ†’ Numbered list
  • **text** โ†’ Bold text
  • *text* โ†’ Italic text
  • ***text*** โ†’ Bold + Italic
  • `code` โ†’ Inline code
  • > quote โ†’ Blockquote
  • --- โ†’ Horizontal line

Code Blocks

```javascript
async function example() {
  const data = await fetch('api.com');
  return data.json();
}
```

Auto-Detected JSON (New in v1.0.9!)

JSON objects and arrays are automatically detected and formatted as code blocks:

{
  "status": "success",
  "data": {
    "users": [
      {"id": 1, "name": "John"}
    ]
  }
}

No need for ``` backticks! Just paste your JSON and it will be automatically formatted with syntax highlighting.

Syntax Highlighting Colors (VS Code Dark theme):

  • ๐ŸŸฃ Keywords: async, function, const, await, etc. (#C586C0)
  • ๐ŸŸ  Strings: "text", 'text' (#CE9178)
  • ๐ŸŸข Comments: // comment, /* block */ (#6A9955)
  • ๐ŸŸข Numbers: 42, 3.14, 0xFF (#B5CEA8)
  • ๐ŸŸก Functions: fetch, console.log (#DCDCAA)
  • ๐Ÿ”ต Types/Classes: Promise, Array (#4EC9B0)

๐ŸŽจ Features Highlights

Professional Syntax Highlighting

  • Dark background (#1E1E1E) for code blocks
  • VS Code Dark theme colors
  • Language indicator header
  • Automatic line wrapping

Smart Pagination

  • Code blocks never split between pages
  • Headings kept with following content
  • Automatic page breaks when needed
  • Consistent spacing

Responsive Formatting

  • All content respects A4 margins
  • Automatic line breaks for long text
  • Proper width control for all elements
  • No content overflow

๐Ÿงช Testing

To test if it's working:

echo '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | npx document-generator-mcp@latest

Expected output: List of available tools (gerar_documento_word, gerar_documento_pdf)

๐Ÿ”ง Troubleshooting

Error "use strict: not found"

If you get this error, npm is using an old cached version. Solutions:

  1. Use this optimized configuration:
{
  "mcpServers": {
    "document-generator": {
      "command": "npx",
      "args": ["--yes", "--cache", "/tmp/.npx-cache", "document-generator-mcp@latest"]
    }
  }
}
  1. Or clear the cache:
npm cache clean --force
rm -rf ~/.npm/_npx

Documents not gener

Tools (2)

gerar_documento_wordCreates Word documents (.docx), PDF, or both from provided content.
gerar_documento_pdfCreates PDF documents only from provided content.

Configuration

claude_desktop_config.json
{
  "mcpServers": {
    "document-generator": {
      "command": "npx",
      "args": ["--yes", "--cache", "/tmp/.npx-cache", "document-generator-mcp@latest"]
    }
  }
}

Try it

โ†’Create a Word document about sales analysis
โ†’Generate a PDF report about the project
โ†’Make a technical manual in Word and PDF
โ†’Create API documentation in Word format
โ†’Document this JavaScript code with examples

Frequently Asked Questions

What are the key features of Document Generator MCP?

Generate Word (.docx) and PDF documents with professional formatting. Auto-detect JSON blocks and format them as code without backticks. Professional syntax highlighting using VS Code Dark theme colors. Smart pagination to prevent content cuts between pages. Markdown support for headings, lists, bold, italic, and blockquotes.

What can I use Document Generator MCP for?

Creating technical manuals and API documentation with syntax-highlighted code. Generating professional business reports and sales analysis in PDF format. Converting AI-generated project summaries into formatted Word documents. Documenting source code with examples and responsive A4 formatting.

How do I install Document Generator MCP?

Install Document Generator MCP by running: npx document-generator-mcp@latest

What MCP clients work with Document Generator MCP?

Document Generator MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Use Document Generator MCP with Conare

Manage MCP servers visually, upload persistent context, and never start from zero with Claude Code & Codex.

Try Free