mcp-markdown-to-confluence
Converts Markdown files to Atlassian Document Format and publishes them to Confluence, with support for rendering Mermaid diagrams as PNG attachments.
README
mcp-markdown-to-confluence
An MCP (Model Context Protocol) server that converts Markdown files to Atlassian Document Format (ADF) and publishes them to Confluence. Mermaid diagrams are rendered to PNG images and uploaded as page attachments.
Features
- Convert Markdown → Confluence ADF with full formatting support (tables, code blocks, callouts, TOC)
- Render Mermaid diagrams to PNG via headless Chromium and attach them to pages
- Preview content before publishing
- Create new pages or update existing ones
- Publish from inline Markdown or directly from a
.mdfile using frontmatter
Installation
npm
npm install @neverprepared/mcp-markdown-to-confluence
From source
git clone https://github.com/neverprepared/mcp-markdown-to-confluence.git
cd mcp-markdown-to-confluence
npm install
npm run build
Configuration
Set the following environment variables:
| Variable | Description |
|---|---|
CONFLUENCE_BASE_URL |
Your Confluence base URL, e.g. https://your-org.atlassian.net |
CONFLUENCE_USERNAME |
Your Atlassian account email |
CONFLUENCE_API_TOKEN |
Your Atlassian API token (create one here) |
Claude Code Setup
Add to your Claude Code MCP config (.claude/.claude.json):
{
"mcpServers": {
"markdown-to-confluence": {
"command": "node",
"args": ["/path/to/mcp-markdown-to-confluence/dist/index.js"],
"env": {
"CONFLUENCE_BASE_URL": "https://your-org.atlassian.net",
"CONFLUENCE_USERNAME": "you@example.com",
"CONFLUENCE_API_TOKEN": "your-api-token"
}
}
}
}
Tools
markdown_preview
Convert Markdown to ADF and return a text preview — no Confluence calls made.
| Parameter | Type | Required | Description |
|---|---|---|---|
markdown |
string | yes | Markdown content to preview |
title |
string | yes | Page title |
markdown_publish
Publish Markdown to a Confluence page. By default shows a preview first.
| Parameter | Type | Required | Description |
|---|---|---|---|
markdown |
string | yes | Markdown content |
title |
string | yes | Confluence page title |
spaceKey |
string | yes | Confluence space key (e.g. ENG) |
pageId |
string | no | Existing page ID to update; omit to create a new page |
parentId |
string | no | Parent page ID for new pages |
skip_preview |
boolean | no | Set true to publish without preview (default: false) |
markdown_publish_file
Read a .md file from disk and publish it. Page metadata is read from frontmatter.
| Parameter | Type | Required | Description |
|---|---|---|---|
filePath |
string | yes | Absolute path to the Markdown file |
skip_preview |
boolean | no | Set true to publish without preview (default: false) |
Supported frontmatter keys:
---
connie-title: My Page Title
connie-space-key: ENG
connie-page-id: "123456" # omit to create a new page
title: Fallback title # used if connie-title is absent
---
Preview Flow
By default, markdown_publish and markdown_publish_file return a rendered preview and prompt you to confirm before publishing. To publish in one step, pass skip_preview: true.
# Step 1 — review
markdown_publish(markdown: "...", title: "My Page", spaceKey: "ENG")
→ returns preview text
# Step 2 — publish
markdown_publish(markdown: "...", title: "My Page", spaceKey: "ENG", skip_preview: true)
→ returns page URL
Mermaid Diagrams
Mermaid code blocks are automatically detected, rendered to PNG via headless Chromium (bundled with Puppeteer), and uploaded as Confluence page attachments. The first run will download Chromium (~170 MB).
```mermaid
flowchart TD
A[Write Markdown] --> B[Preview]
B --> C{Looks good?}
C -- Yes --> D[Publish]
C -- No --> A
```
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。