md2confluence-mcp
Upload Markdown to Confluence with auto-converted Mermaid diagrams, code blocks, images, and tables. Supports creating, updating, and syncing pages.
README
md2confluence-mcp
Markdown to Confluence converter — MCP server that uploads Markdown files to Atlassian Confluence with auto-converted Mermaid diagrams, code blocks, and images.
Demo

Uploading showcase.md to Confluence with images and Mermaid diagrams
<a href="https://glama.ai/mcp/servers/@Gyeom/md2confluence-mcp"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@Gyeom/md2confluence-mcp/badge" alt="md2confluence-mcp MCP server" /> </a>
Features
- ✅ Mermaid diagrams → PNG (auto-converted via kroki.io)
- ✅ Code blocks → Confluence Code macro
- ✅ Images → Attachments (auto-uploaded)
- ✅ Tables, links, formatting → Preserved
Installation
Claude Code
Add to your Claude Code settings (~/.claude/settings.json):
{
"mcpServers": {
"confluence": {
"command": "npx",
"args": ["-y", "md2confluence-mcp"],
"env": {
"CONFLUENCE_URL": "https://your-domain.atlassian.net/wiki",
"CONFLUENCE_EMAIL": "your@email.com",
"CONFLUENCE_TOKEN": "YOUR_API_TOKEN"
}
}
}
}
Project-specific
Add to your project's .mcp.json:
{
"mcpServers": {
"confluence": {
"command": "npx",
"args": ["-y", "md2confluence-mcp"],
"env": {
"CONFLUENCE_URL": "https://your-domain.atlassian.net/wiki",
"CONFLUENCE_EMAIL": "your@email.com",
"CONFLUENCE_TOKEN": "YOUR_API_TOKEN"
}
}
}
}
Get API Token
- Go to https://id.atlassian.com/manage/api-tokens
- Click "Create API token"
- Copy the token to
CONFLUENCE_TOKEN
Usage
Once configured, Claude Code can use these tools automatically.
Prompt Examples
Upload to your personal space
"Upload README.md to my personal Confluence space"
"Upload this document to my Confluence space"
Upload to a specific space (with URL)
"Upload docs/SETUP.md to Confluence here: https://company.atlassian.net/wiki/spaces/TEAM/overview"
"Create a new page in https://company.atlassian.net/wiki/spaces/~712020170fdaa4716743419285f156aa587665/overview with this content"
Update an existing page
"Update this Confluence page with the latest content: https://company.atlassian.net/wiki/spaces/TEAM/pages/123456/My+Page"
"Sync docs/API.md to https://company.atlassian.net/wiki/spaces/EN/pages/789012/API+Reference"
Create a child page (sub-page)
"Create a new page under https://company.atlassian.net/wiki/spaces/TEAM/pages/123456/Parent+Page"
"Add a sub-page to this page: https://company.atlassian.net/wiki/spaces/EN/pages/789012/Guide"
List and search
"Show me available Confluence spaces"
"Find Confluence pages about authentication in the EN space"
Space Key Format
| Type | Format | Example |
|---|---|---|
| Global space | Short key | TEAM, EN, PROD |
| Personal space | ~ + ID |
~712020170fdaa4716743419285f156aa587665 |
Tip: You can extract the space key from a Confluence URL:
https://company.atlassian.net/wiki/spaces/TEAM/overview
^^^^ space key
https://company.atlassian.net/wiki/spaces/~712020.../overview
^^^^^^^^^^ personal space key
Tools
| Tool | Description |
|---|---|
upload_page |
Create a new Confluence page from Markdown |
update_page |
Update an existing page |
create_child_page |
Create a new page under an existing page |
sync_file |
Sync a local file to an existing page |
list_spaces |
List available spaces |
search_pages |
Search for pages |
How It Works
flowchart LR
A["Markdown"] --> B["Parse"]
B --> C["Mermaid → kroki.io → PNG"]
C --> D["Convert to Confluence HTML"]
D --> E["Upload via REST API"]
E --> F["Attach images"]
- Parse - Extract content, remove front matter
- Render - Convert Mermaid diagrams to PNG via kroki.io
- Convert - Transform Markdown to Confluence storage format
- Upload - Create/update page via Confluence REST API
- Attach - Upload images as page attachments
Environment Variables
| Variable | Required | Description |
|---|---|---|
CONFLUENCE_URL |
✅ | e.g., https://your-domain.atlassian.net/wiki |
CONFLUENCE_EMAIL |
✅ | Your Atlassian account email |
CONFLUENCE_TOKEN |
✅ | API token |
Development
# Clone
git clone https://github.com/Gyeom/md2confluence-mcp.git
cd md2confluence-mcp
# Install dependencies
npm install
# Build
npm run build
# Test locally
CONFLUENCE_URL=... CONFLUENCE_EMAIL=... CONFLUENCE_TOKEN=... npm start
License
MIT
Credits
- kroki.io - Diagram rendering API
- Model Context Protocol - MCP SDK
- Confluence REST API
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。