Skip to main content
Glama

Doc MCP Server 📄

Python License GitHub

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

markdown_to_pdf

Render Markdown → PDF with headings, lists, code blocks, HR

generate_pdf

Simple plain text → PDF with custom font size

url_to_pdf

Fetch a URL via Jina Reader and save as PDF

extract_pdf_text

Extract text from any PDF (file, URL, or base64)

pdf_metadata

Read PDF metadata (title, author, pages, size)

merge_pdfs

Merge multiple PDFs into a single document

convert_text

Text format conversion & cleanup (case, whitespace)

count_words

Word, character, line, paragraph & reading time stats

Related MCP server: PDF Reader MCP Server

🚀 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.git

Run

# 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.

A
license - permissive license
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ceeyang-ai/doc-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server