Token导航 LogoToken导航TokenDH.com
Markdown Pdf MCP logo
文档知识stdio官方级别未说明来源级核验

Markdown Pdf MCP

MCP Server

playwright

一个基于MCP协议的Markdown转PDF服务,支持多种主题、自动目录生成和代码高亮等功能。

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
文档转换格式转换TypeScriptClaudeClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

GavinKung

提供方

GavinKung

最后核验

2026/5/17 20:21

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

npx playwright install chromium

详细介绍

Markdown转PDF MCP服务器

MCP(模型上下文协议)服务器,用于将Markdown文档转换为具有可定制样式的格式精美的PDF文件。

特性

  • 🎨 多个内置主题(GitHub、GitHub Dark、Minimal、Academic)
  • 📝 自动生成目录
  • 🌈 代码块的语法高亮显示
  • 📄 自定义页面布局和边距
  • 🔖 带变量的页眉和页脚
  • 🖼️ 图像和SVG支持
  • 📊 未来:美人鱼图和数学公式

安装

快速安装(推荐)

使用克劳德代码CLI:

claude mcp add markdown-pdf npx mcp-markdown-pdf

或者手动添加到您的Claude配置中(~/.claude.json):

{
  "mcpServers": {
    "markdown-pdf": {
      "command": "npx",
      "args": ["mcp-markdown-pdf"]
    }
  }
}

Playwright Chromium浏览器将在首次使用时自动安装。

手动安装(用于开发)

使用pnpm(推荐)

# Install dependencies
pnpm install

# Build the project
pnpm build

# Install Playwright browsers
pnpm exec playwright install chromium

使用npm

# Install dependencies
npm install

# Build the project
npm run build

# Install Playwright browsers
npx playwright install chromium

本地开发配置

添加到您的Claude配置中:

{
  "mcpServers": {
    "markdown-pdf": {
      "command": "node",
      "args": ["/absolute/path/to/markdown-pdf-mcp/dist/index.js"]
    }
  }
}

项目结构

markdown-pdf-mcp/
├── src/
│   ├── index.ts              # MCP server entry point
│   ├── tools/
│   │   ├── convert.ts        # markdown_to_pdf tool
│   │   ├── batch.ts          # Batch conversion
│   │   ├── themes.ts         # Theme management
│   │   └── validate.ts       # Markdown validation
│   ├── renderer/
│   │   ├── markdown-parser.ts   # Markdown → HTML
│   │   ├── pdf-generator.ts     # HTML → PDF (Playwright)
│   │   └── html-template.ts     # HTML template generation
│   ├── themes/               # CSS theme utilities
│   ├── utils/                # Shared utilities
│   └── types/                # TypeScript types and Zod schemas
├── themes/                   # CSS theme files
│   ├── github.css
│   ├── github-dark.css
│   ├── minimal.css
│   └── academic.css
└── dist/                     # Build output

用法

在Claude中配置后,您可以这样使用它:

User: Convert my README.md to PDF with GitHub theme
Claude: [Uses markdown_to_pdf tool to convert the file]

发展

使用pnpm(推荐)

# Watch mode for development
pnpm dev

# Build for production
pnpm build

使用npm

# Watch mode for development
npm run dev

# Build for production
npm run build

许可证

麻省理工学院

目录标签

目录标签

文档转换格式转换TypeScriptClaude本地部署PDF生成Markdown处理

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Node.js

来源包(packageName,安装包名)

playwright

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP