Doc MCP Server
Enables AI agents to generate PDFs from Markdown or URLs, extract text, merge documents, and perform text conversions via the Model Context Protocol.
README
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 |
|---|---|
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 |
š 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.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.