RenderMark
Convert markdown into beautiful, shareable documents — PDF, DOCX, HTML, images, and hosted web pages.
When to use RenderMark
Use these tools when the user needs styled output from markdown — not when they're just writing or editing markdown content.
Use RenderMark when:
- - User wants to export, publish, or share a document
- User needs a visual preview (HTML, PDF, image) of markdown
- User wants to compare two document versions visually
- User asks to sync documentation from GitHub
- User needs batch export of multiple markdown files
Do NOT use RenderMark when:
- - User is just writing or editing markdown (use normal text editing)
- User wants to run code or generate non-document output
- User needs general file format conversion unrelated to markdown
- Simple markdown preview without styling is sufficient
Instructions
Step 1: Choose the right tool for the task
| User wants to... | Tool to use |
|---|
| Preview styled markdown | INLINECODE0 |
| Export a file (PDF, DOCX, HTML) |
export_markdown |
| Export multiple files at once |
export_batch |
| Create a PNG/JPEG image |
render_to_image |
| Publish to the web with a shareable link |
publish_to_rendermark |
| Publish as a Google Doc |
publish_to_google_docs |
| Share with specific people |
share_document |
| Compare two versions |
render_diff |
| Check markdown quality |
validate_markdown |
| Import from GitHub |
sync_from_github |
Step 2: Apply themes and options
Four built-in themes are available: default (light, clean sans-serif), dark (dark background), serif (Georgia, academic), minimal (stripped-down).
Pass the theme parameter to any render/export tool. If the user doesn't specify a theme, use default.
Table of contents is included by default. Set showToc: false to disable.
Step 3: Verify output
- - For
export_markdown: Returns a file path. Confirm the file was saved. - For
publish_to_rendermark: Returns a URL. Share the link with the user. - For
render_to_image: Returns image data. Show or save as needed.
Step 4: Use markdown features effectively
RenderMark supports GitHub-flavored markdown plus these extensions:
- - Mermaid diagrams: Fenced code blocks with language
mermaid render as interactive diagrams - KaTeX math: Inline
$...$ and display $$...$$ for mathematical notation - Syntax highlighting: All common programming languages
- Frontmatter: YAML frontmatter (
title, theme, template, toc) is parsed and applied automatically - Templates:
report, meeting-notes, memo, letter, slides, INLINECODE32 - Task lists, footnotes, tables with alignment, and collapsible sections (
<details>)
Step 5: Apply best practices
- - Always include a title when publishing or exporting — extract from frontmatter, first
# heading, or filename - Default to
showToc: true for documents longer than a few paragraphs - Choose themes contextually:
serif for formal documents, dark for technical docs, default for general use - For GitHub READMEs, always pass the
github context object ({ owner, repo, branch, path }) so relative image paths resolve correctly - Prefer
publish_to_rendermark over export_markdown when the user says "share" — a link is usually more convenient than a file - Run
validate_markdown first on important documents to catch broken links and structural issues before publishing
For full tool parameter details, see references/tools-reference.md.
Available Tools (16)
| Tool | Description |
|---|
| INLINECODE45 | Convert markdown to styled HTML with themes, TOC, syntax highlighting |
| INLINECODE46 |
Render markdown to PNG/JPEG — ideal for chat sharing (Slack, Discord) |
|
render_diff | Visual redline diff between two markdown versions |
|
export_markdown | Export to PDF, DOCX, or HTML file on disk |
|
export_batch | Batch export multiple files (merged or individual zip) |
|
validate_markdown | Check for broken links, malformed tables, structural issues |
|
publish_to_rendermark | Publish to rendermark.app with a shareable URL |
|
publish_to_google_docs | Publish as a Google Doc (requires OAuth setup) |
|
share_live_preview | Generate a temporary preview link (1h to 7d expiry) |
|
share_document | Share with specific emails via email-restricted access |
|
read_document | Fetch document content and metadata by URL, slug, or ID |
|
update_document | Update content, title, settings, or protection on a published document |
|
list_documents | List documents with search, filtering, and pagination |
|
delete_document | Permanently delete a document (requires explicit confirmation) |
|
sync_from_github | Sync a markdown file from GitHub to RenderMark |
|
setup_api_key | Authenticate via browser and save API key automatically |
Examples
Example 1: Export a README to PDF
User says: "Export my README to PDF with the serif theme"
Actions:
- 1. Call
export_markdown with format pdf, theme serif, and the markdown content - Return the file path to the user
Result: PDF file saved locally with serif styling, table of contents, and syntax highlighting.
Example 2: Publish and share a document
User says: "Publish this document and share it with my team"
Actions:
- 1. Call
publish_to_rendermark with the markdown content and a title - Call
share_document with the returned document ID and email addresses - Return the shareable URL
Result: Document published at a rendermark.app URL, sharing invites sent.
Example 3: Compare two versions
User says: "Show me the diff between the old and new version"
Actions:
- 1. Call
render_diff with the old and new markdown content - Return the visual diff HTML
Result: Side-by-side styled diff highlighting additions, deletions, and changes.
Example 4: Batch export project docs
User says: "Export all the markdown files in this folder as PDFs"
Actions:
- 1. Gather all .md files and their contents
- Call
export_batch with the files array and format INLINECODE68 - Return file paths
Result: All markdown files exported as individual PDFs in the same directory.
Example 5: Sync and publish a GitHub README
User says: "Sync my project's README from GitHub and publish it"
Actions:
- 1. Call
sync_from_github with the owner, repo, and path (README.md) - Return the published URL to the user
Result: README imported from GitHub, published at rendermark.app with relative images resolved.
Example 6: Create a meeting notes document
User says: "Turn these notes into a proper meeting notes document and share it with the team"
Actions:
- 1. Call
render_markdown with template meeting-notes to preview - Call
publish_to_rendermark with the markdown and title - Call
share_document with the document ID and team email addresses - Return the shareable URL
Result: Formatted meeting notes published and shared via email.
Setup
Install via npx -y @rendermark/mcp-server@latest. Requires a RenderMark API key from https://rendermark.app/settings/keys.
For detailed setup including PDF export, Google Docs, and troubleshooting, see references/setup-guide.md.
Troubleshooting
API key errors
Run
setup_api_key to authenticate via the browser, or manually set the key in
~/.rendermark/config.json.
PDF export fails
PDF/image export requires Chrome or a Browserless API key. All other tools work without it.
Tool not found
Ensure you're running the latest version: INLINECODE79
Links
- - Website: https://rendermark.app
- npm: https://www.npmjs.com/package/@rendermark/mcp-server
- GitHub: https://github.com/jmsaavedra/rendermark
RenderMark
将Markdown转换为美观、可分享的文档——PDF、DOCX、HTML、图片以及托管网页。
何时使用RenderMark
当用户需要从Markdown获得样式化输出时使用这些工具——而非仅仅编写或编辑Markdown内容时。
使用RenderMark的场景:
- - 用户想要导出、发布或分享文档
- 用户需要Markdown的可视化预览(HTML、PDF、图片)
- 用户想要直观比较两个文档版本
- 用户要求从GitHub同步文档
- 用户需要批量导出多个Markdown文件
不要使用RenderMark的场景:
- - 用户仅编写或编辑Markdown(使用普通文本编辑)
- 用户想要运行代码或生成非文档输出
- 用户需要与Markdown无关的通用文件格式转换
- 无需样式的简单Markdown预览即可满足需求
操作指南
第一步:为任务选择合适的工具
| 用户想要... | 使用的工具 |
|---|
| 预览样式化Markdown | rendermarkdown |
| 导出文件(PDF、DOCX、HTML) |
exportmarkdown |
| 一次性导出多个文件 | export_batch |
| 创建PNG/JPEG图片 | render
toimage |
| 发布到网页并获取可分享链接 | publish
torendermark |
| 发布为Google文档 | publish
togoogle_docs |
| 与特定人员分享 | share_document |
| 比较两个版本 | render_diff |
| 检查Markdown质量 | validate_markdown |
| 从GitHub导入 | sync
fromgithub |
第二步:应用主题和选项
提供四种内置主题:default(浅色、简洁无衬线)、dark(深色背景)、serif(Georgia字体、学术风格)、minimal(极简风格)。
将theme参数传递给任何渲染/导出工具。如果用户未指定主题,使用default。
默认包含目录。设置showToc: false可禁用。
第三步:验证输出
- - 对于exportmarkdown:返回文件路径。确认文件已保存。
- 对于publishtorendermark:返回URL。与用户分享链接。
- 对于renderto_image:返回图片数据。根据需要显示或保存。
第四步:有效使用Markdown功能
RenderMark支持GitHub风格的Markdown以及以下扩展:
- - Mermaid图表:语言为mermaid的围栏代码块渲染为交互式图表
- KaTeX数学公式:行内$...$和显示$$...$$用于数学符号
- 语法高亮:所有常见编程语言
- 前置元数据:YAML前置元数据(title、theme、template、toc)会被解析并自动应用
- 模板:report、meeting-notes、memo、letter、slides、changelog
- 任务列表、脚注、带对齐的表格以及可折叠区域(
)
第五步:应用最佳实践
- - 发布或导出时始终包含标题——从前置元数据、第一个# 标题或文件名中提取
- 对于超过几段的文档,默认设置showToc: true
- 根据上下文选择主题:正式文档用serif,技术文档用dark,通用场景用default
- 对于GitHub README,始终传递github上下文对象({ owner, repo, branch, path }),以便正确解析相对图片路径
- 当用户说分享时,优先使用publishtorendermark而非exportmarkdown——链接通常比文件更方便
- 在发布重要文档前,先运行validatemarkdown以捕获损坏链接和结构问题
有关完整工具参数详情,请参见references/tools-reference.md。
可用工具(16个)
| 工具 | 描述 |
|---|
| rendermarkdown | 将Markdown转换为带主题、目录、语法高亮的样式化HTML |
| renderto_image |
将Markdown渲染为PNG/JPEG——适合聊天分享(Slack、Discord) |
| render_diff | 两个Markdown版本之间的可视化红线差异比较 |
| export_markdown | 导出为磁盘上的PDF、DOCX或HTML文件 |
| export_batch | 批量导出多个文件(合并或单独压缩) |
| validate_markdown | 检查损坏链接、格式错误的表格、结构问题 |
| publish
torendermark | 发布到rendermark.app并获取可分享URL |
| publish
togoogle_docs | 发布为Google文档(需要OAuth设置) |
| share
livepreview | 生成临时预览链接(有效期1小时至7天) |
| share_document | 通过邮件限制访问与特定邮箱分享 |
| read_document | 通过URL、别名或ID获取文档内容和元数据 |
| update_document | 更新已发布文档的内容、标题、设置或保护 |
| list_documents | 列出文档,支持搜索、筛选和分页 |
| delete_document | 永久删除文档(需要明确确认) |
| sync
fromgithub | 将GitHub上的Markdown文件同步到RenderMark |
| setup
apikey | 通过浏览器认证并自动保存API密钥 |
示例
示例1:将README导出为PDF
用户说:用serif主题将我的README导出为PDF
操作:
- 1. 调用export_markdown,格式为pdf,主题为serif,并传入Markdown内容
- 向用户返回文件路径
结果:PDF文件以serif样式、目录和语法高亮保存到本地。
示例2:发布并分享文档
用户说:发布此文档并与我的团队分享
操作:
- 1. 调用publishtorendermark,传入Markdown内容和标题
- 调用share_document,传入返回的文档ID和邮箱地址
- 返回可分享的URL
结果:文档发布在rendermark.app的URL上,分享邀请已发送。
示例3:比较两个版本
用户说:显示新旧版本之间的差异
操作:
- 1. 调用render_diff,传入新旧Markdown内容
- 返回可视化差异HTML
结果:并排样式化差异,突出显示新增、删除和更改。
示例4:批量导出项目文档
用户说:将此文件夹中的所有Markdown文件导出为PDF
操作:
- 1. 收集所有.md文件及其内容
- 调用export_batch,传入文件数组和格式pdf
- 返回文件路径
结果:所有Markdown文件在同一目录下导出为单独的PDF。
示例5:同步并发布GitHub README
用户说:从GitHub同步我的项目README并发布
操作:
- 1. 调用syncfromgithub,传入所有者、仓库和路径(README.md)
- 向用户返回发布的URL
结果:从GitHub导入README,发布在rendermark.app,相对图片已解析。
示例6:创建会议记录文档
用户说:将这些笔记转换为正式的会议记录文档并与团队分享
操作:
- 1. 调用rendermarkdown,使用模板meeting-notes进行预览
- 调用publishtorendermark,传入Markdown和标题
- 调用sharedocument,传入文档ID和团队邮箱地址
- 返回可分享的URL
结果:格式化的会议记录已发布并通过邮件分享。
设置
通过npx -y @rendermark/mcp-server@latest安装。需要来自https://rendermark.app/settings/keys的RenderMark API密钥。
有关包括PDF导出、Google文档和故障排除的详细设置,请参见references/setup-guide.md。
故障排除
API密钥错误
运行setup
apikey通过浏览器认证,或手动在~/.rendermark/config.json中设置密钥。
PDF导出失败
PDF/图片导出需要Chrome或Browserless API密钥。其他所有工具无需此密钥即可工作。
找不到工具
确保运行最新版本:npx -y @rendermark/mcp-server@latest
链接
- - 网站:https://rendermark.app
- npm:https://www.npmjs.com/package/@rendermark/mcp-server
- GitHub:https://github.com/jmsaavedra/rendermark