Document Generator MCP
Transforms Markdown-formatted text, including headings, lists, blockquotes, and text styling, into professionally formatted Word and PDF documents.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Document Generator MCP Generate a professional PDF report for the latest sales analysis"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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)
Related MCP server: Spire.Doc MCP Server
๐ฆ Installation
Via NPX (Recommended)
npx document-generator-mcp@latestVia NPM Global
npm install -g document-generator-mcpโ๏ธ Configuration
Claude Desktop
Locate the configuration file:
Linux:
~/.config/claude-desktop/claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Add this configuration:
{
"mcpServers": {
"document-generator": {
"command": "npx",
"args": ["--yes", "--cache", "/tmp/.npx-cache", "document-generator-mcp@latest"]
}
}
}Restart Claude Desktop
Amazon Q Developer
Open VS Code with Amazon Q extension
Access Amazon Q settings
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 bothgerar_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 list1. 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@latestExpected 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:
Use this optimized configuration:
{
"mcpServers": {
"document-generator": {
"command": "npx",
"args": ["--yes", "--cache", "/tmp/.npx-cache", "document-generator-mcp@latest"]
}
}
}Or clear the cache:
npm cache clean --force
rm -rf ~/.npm/_npxDocuments not generating
Check if
generated_documents/folder existsVerify Node.js version (18+ required)
Check MCP server logs in your agent
๐ Generated Files
Documents are saved in ./generated_documents/ with unique timestamps.
Example: api_documentation_1759715959772.docx
๐ค Compatible Agents
This MCP works with any agent that implements the Model Context Protocol:
โ Claude Desktop - Full native support
โ Amazon Q Developer - Support via VS Code
โ Cline (VS Code) - VS Code extension
โ Continue - Code assistant with MCP
โ Other MCP agents - Any compatible implementation
๐ค Contributing
Contributions are welcome! Open issues or pull requests on GitHub.
Development Setup
git clone https://github.com/thiagotw10/document-generator-mcp.git
cd document-generator-mcp
npm install
npm run build๐ License
MIT License - see LICENSE file for details.
๐ Links
NPM Package: https://www.npmjs.com/package/document-generator-mcp
GitHub Repository: https://github.com/thiagotw10/document-generator-mcp
MCP Documentation: https://modelcontextprotocol.io
Amazon Q MCP Guide: https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/qdev-mcp.html
โ ๏ธ Requirements
Node.js: 18+ required
Platforms: Linux, macOS, Windows
MCP Support: Any agent implementing Model Context Protocol
๐ Changelog
v1.0.9 (Latest)
โ Auto-detect JSON blocks - No need for ``` backticks around JSON
โ Automatically formats JSON objects and arrays as code blocks
โ Validates JSON syntax before formatting
โ Applies syntax highlighting to detected JSON
โ Works in both Word and PDF documents
v1.0.8
โ English documentation for international audience
โ Improved README structure
v1.0.7
โ Professional syntax highlighting in PDF (VS Code Dark theme)
โ 100% responsive formatting (respects A4 margins)
โ Smart pagination (no content cuts)
โ Improved spacing after code blocks
โ Visual parity between Word and PDF
Made with โค๏ธ by Thiago Oliveira
Transform natural language into professional documents with AI!
Available Tools
2 toolsgerar_documento_pdfC
Cria um arquivo PDF
Inputs: nome_arquivo (required), titulo_documento (required), conteudo_principal (required), autor.
gerar_documento_wordC
Cria um arquivo Microsoft Word (.docx)
Inputs: nome_arquivo (required), titulo_documento (required), conteudo_principal (required), autor, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 2 tools
The two tools have perfectly distinct purposes: one creates PDF files and the other creates Word documents. There is no overlap in functionality or ambiguity about which tool to use for each file type.
Both tools follow an identical naming pattern: 'gerar_documento_' followed by the file format. This consistent verb_noun structure in Portuguese makes the tool names predictable and easy to understand.
With only two tools, the server feels thin for a 'Document Generator' domain. While it covers two common formats, there are obvious gaps for other document types (e.g., HTML, plain text) and operations like editing or converting existing documents.
The tool surface is severely incomplete for document generation. It lacks support for multiple document formats beyond PDF and Word, and provides no operations for document manipulation, conversion, or template management that would be expected in this domain.
Maintenance
Related MCP Connectors
Convert, create and edit Word, PowerPoint, Excel and PDF documents from any AI agent.
Turns agent output into versioned web pages, PDFs, Word docs, spreadsheets and Markdown.
Generate and read PDFs for AI agents: a generate_pdf and a read_pdf tool, priced per document.
Turn Markdown and AI answers into Word (.docx) with native equations, or into PDF.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to generate professional PDF documents from markdown content with advanced typography, syntax highlighting, math equations, dark mode, and customizable styling options.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to create, read, modify, and convert Word documents without Microsoft Word, supporting 18 tools for document operations, paragraph manipulation, table management, formatting, and conversion between multiple formats including PDF, HTML, and Markdown.6MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to read, edit, and create Microsoft Word documents (.docx) with support for rich text, tables, and images, deployable locally or via SSE.3MIT
- AlicenseNot gradedqualityFmaintenanceEnables AI agents to generate a variety of documents (PPTX presentations, DOCX reports, PDF invoices, XLSX spreadsheets) locally from JSON specs, without any API keys or network calls.33 npm1MIT