Md2pdf Mcp
@chunliu
Md2pdf Mcp について
This server provides a tool to convert Markdown text to PDF files using the convert_markdown library. It's designed to work as an MCP (Model Context Protocol) server that can be integrated with various AI assistants and applications.
基本情報
設定
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"md2pdf": {
"command": "uvx",
"args": [
"--from",
"md2pdf-mcp",
"md2pdf"
],
"env": {
"PDF_OUTPUT_DIR": "/path/to/output/folder"
}
}
}
}ツール
1Convert Markdown text to PDF. Args: markdown_text (str): The Markdown text to convert. Returns: str: The JSON string with PDF metadata.
概要
What is Md2pdf Mcp?
Md2pdf Mcp is an MCP (Model Context Protocol) server that converts Markdown text into well-formatted PDF files. It integrates with AI assistants and applications through the MCP protocol, using the convert_markdown library for conversion and FastMCP for server functionality.
How to use Md2pdf Mcp?
Install and run the server via uvx --from md2pdf-mcp md2pdf. Configure it in your MCP client by adding a JSON entry with the command and optional PDF_OUTPUT_DIR environment variable. The server exposes a single tool, convert_md_to_pdf, which takes a markdown_text string parameter and returns a resource link to the generated PDF.
Key features of Md2pdf Mcp
- Converts Markdown text to well-formatted PDF files
- Generates random filenames using UUID to avoid conflicts
- Configurable output directory via the
PDF_OUTPUT_DIRenvironment variable - Returns resource links with metadata for easy integration
- Built on FastMCP for reliable MCP server functionality
Use cases of Md2pdf Mcp
- Generate printable PDF reports from Markdown output of AI assistants
- Convert documentation or notes into portable PDF files
- Save formatted copies of conversations or generated content as PDFs
- Automate PDF creation for workflows that produce Markdown text
FAQ from Md2pdf Mcp
What tool does the server provide?
The server provides one tool called convert_md_to_pdf, which accepts a markdown_text parameter (string) and converts it to a PDF file.
How do I specify where PDF files are saved?
Set the PDF_OUTPUT_DIR environment variable to your desired output folder. If not set, PDFs are saved to the user’s home directory.
What does the conversion result look like?
The tool returns a JSON string containing a resource link with fields: type (always "resource_link"), uri (file URI of the PDF), name (UUID-based filename), mimeType ("application/pdf"), and annotations (metadata including audience, priority, and last modified timestamp).
How do I run this MCP server?
Use the command uvx --from md2pdf-mcp md2pdf in your terminal or configure it in your MCP client’s mcpServers configuration with the same command and optional environment variables.
「ファイルとストレージ」の他のコンテンツ
WORK IN PROGRESS - USE WITH CAUTION - Windows:
hanwegMCP server for working with PDF files
File Context Server
bsmi021A Model Context Protocol (MCP) server that provides file system context to Large Language Models (LLMs). This server enables LLMs to read, search, and analyze code files with advanced caching and real-time file watching capabilities.
Rust MCP Filesystem
rust-mcp-stackBlazing-fast, asynchronous MCP server for seamless filesystem operations.
Mcp Directory
chatmcpdirectory for Awesome MCP Servers
Claude Document MCP Server
alejandroBallesterosCA lightweight MCP server for processing, editing, and interacting with PDF, Word, Excel, and CSV documents.
コメント