Doc MCP Server
Enables document processing (Markdown to PDF, text extraction, merging, URL to PDF) for Hermes Agent.
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., "@Doc MCP Server Extract text from quarterly_report.pdf"
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.
Doc MCP Server š
A Model Context Protocol (MCP) server for document processing ā PDF generation with Markdown rendering, text extraction, merging, and web-to-PDF conversion.
Built for AI agents. Works with Hermes Agent, Claude Code, Cursor, and any MCP-compatible client.
⨠Features
Tool | Description |
| Render Markdown ā PDF with headings, lists, code blocks, HR |
| Simple plain text ā PDF with custom font size |
| Fetch a URL via Jina Reader and save as PDF |
| Extract text from any PDF (file, URL, or base64) |
| Read PDF metadata (title, author, pages, size) |
| Merge multiple PDFs into a single document |
| Text format conversion & cleanup (case, whitespace) |
| Word, character, line, paragraph & reading time stats |
Related MCP server: mcp-doc-reader
š Quick Start
Install
# From PyPI (coming soon)
pip install doc-mcp-server
# Or directly from GitHub
pip install git+https://github.com/ceeyang-ai/doc-mcp-server.gitRun
# Start as MCP server (stdio mode)
doc-mcp-serverš Usage with AI Agents
Hermes Agent
Add to ~/.hermes/config.yaml:
mcp_servers:
doc:
command: "doc-mcp-server"Restart ā use mcp_doc_markdown_to_pdf, mcp_doc_extract_pdf_text, etc.
Claude Code / Cursor / Any MCP Client
Add to your MCP config:
{
"mcpServers": {
"doc": {
"command": "doc-mcp-server"
}
}
}š Examples
Markdown ā PDF
# Via MCP tool call
result = markdown_to_pdf(
markdown="# My Report\n\n- Item 1\n- Item 2\n\n```python\nprint('hello')\n```",
title="Report",
filename="report.pdf"
)Merge PDFs
result = merge_pdfs(
sources=[
"https://example.com/doc1.pdf",
"/path/to/local/file.pdf",
]
)URL ā PDF
result = url_to_pdf(
url="https://en.wikipedia.org/wiki/Markdown",
filename="wiki-md.pdf"
)š Requirements
Python 3.10+
fpdf2 ā„ 2.8
PyMuPDF ā„ 1.24
mcp ā„ 1.0
š¦ Project Structure
doc-mcp-server/
āāā doc_mcp_server/
ā āāā __init__.py # All tools + MarkdownPDF engine
āāā pyproject.toml # Build config (setuptools)
āāā README.md
āāā LICENSE (MIT)šØāš» Development
git clone https://github.com/ceeyang-ai/doc-mcp-server.git
cd doc-mcp-server
pip install -e .
python3 -c "from doc_mcp_server import markdown_to_pdf; print(markdown_to_pdf('# Hello', 'Test'))"š License
MIT ā free for personal and commercial use.
Available Tools
8 toolsconvert_textD
Text format conversion and cleanup.
Inputs: text (required), to_lower, to_upper, strip_whitespace, +1 more. Returns: result
count_wordsA
Count words, characters, lines, and paragraphs.
Inputs: text (required). Returns: result
extract_pdf_textB
Extract text content from a PDF file.
Args: source: File path, URL, or base64 PDF content
Inputs: source (required). Returns: result
generate_pdfC
Generate a simple PDF from plain text content.
Inputs: content (required), title, filename, font_size. Returns: result
markdown_to_pdfC
Convert markdown text into a formatted PDF.
Supports: # headings, bold, - lists, 1. numbered lists,
code blocks, --- horizontal rules, paragraphs.
Inputs: markdown (required), title, filename. Returns: result
merge_pdfsB
Merge multiple PDF files into a single PDF.
Args: sources: List of file paths, URLs, or base64 PDF contents
Inputs: sources (required). Returns: result
pdf_metadataC
Read metadata from a PDF file.
Inputs: source (required). Returns: result
url_to_pdfA
Fetch a web page URL and save its content as PDF.
Uses Jina AI reader to get clean markdown.
Inputs: url (required), filename. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogā¦
TDQS
Scored across 8 tools
Each tool has a clearly distinct purpose: text conversion, word counting, PDF extraction, PDF generation (two variants), PDF merging, metadata reading, and URL-to-PDF conversion. No two tools have overlapping functionality.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., convert_text, extract_pdf_text, merge_pdfs). The naming is predictable and easy to understand.
With 8 tools covering text conversion, word counting, and various PDF operations (extraction, generation, merging, metadata, URL conversion), the count is well-scoped for a document processing server.
Missing some common operations like converting PDFs to other formats or editing PDF content, but the set is complete for core document tasks (create, read, merge, convert, and get metadata).
Maintenance
Related MCP Connectors
Generate and read PDFs for AI agents: a generate_pdf and a read_pdf tool, priced per document.
Web tools for AI agents: URL to clean Markdown, site crawl, screenshots, PDF/Office to text, OCR.
PDF tools for AI agents: validate, extract, merge, split, compress, OCR, sign and redact.
Documents to Markdown/PDF, OCR, video and audio transcripts, TTS, screenshots, domains, frames.
Related MCP Servers
AlicenseCqualityBmaintenanceProvides PDF.co API functionality through the Model Context Protocol, enabling AI assistants to perform various PDF processing tasks like conversion, editing, searching, and security operations.3838 PyPI9MIT- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to read and extract text content from PDF, Excel, and Word documents via the Model Context Protocol.2MIT
- AlicenseNot gradedqualityDmaintenanceConverts files (PDF, images, audio, DOCX, XLSX, PPTX) and web content (YouTube transcripts, Bing search, general pages) to Markdown via the Model Context Protocol.Apache 2.0
- AlicenseAqualityDmaintenanceEnables AI agents to process and inspect PDFs by detecting document type, extracting text, and generating Markdown with layout information.71MIT