confluence-prd-converter
Fetches Confluence pages via REST API and converts PRD content to Markdown, including attachments and comments.
Extracts Figma embed URLs from iframes and converts them into direct clickable links.
Resolves Jira issue macros and lozenges embedded in Confluence pages to extract issue keys, summaries, URLs, and statuses.
Generates production-ready Markdown (prd.md) from Confluence PRD content, preserving tables, images, and formatting.
Extracts Miro board embed URLs from iframes and converts them into direct clickable links.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@confluence-prd-converterConvert Confluence PRD page 12345 to Markdown"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
๐ Confluence PRD Converter
Universal AI Agent Skill & Custom MCP Server for Automated, Zero-Loss Confluence PRD Conversion to Production Markdown (prd.md)
๐ Overview & Problem Statement
In agile software development, PRD (Product Requirement Document) pages in Confluence contain complex, multi-layered information:
Jira Issue macros with dynamic status lozenges (
IN PROGRESS,DONE,BACKLOG)Nested tables (tables inside cells for acceptance criteria, data tracking schemas, and master config)
Embedded interactive prototypes from Figma and Miro
Dozens of mockup diagrams and architecture screenshots
Security matrices (ITPF / STRIDE Threat Modeling)
When exporting or migrating these documents to standard Markdown manually or via basic converters:
โ Broken Tables: Markdown lacks native nested table syntax; cell linebreaks shatter outer table rows.
โ Lost Metadata: Jira lozenges and macros turn into ugly HTML tags or disappear.
โ Unclickable Embeds: Figma and Miro iframes fail to extract clean URLs.
โ Broken Assets: Image links fail to resolve to local asset directories.
โ Repetitive Scratch Scripts: Agents spend valuable context windows repeatedly writing Python scripts for conversion.
confluence-prd-converter solves this permanently by combining an Open FastMCP Server and a Universal Agent Skill that execute zero-loss, deterministic conversions in a single prompt across any AI assistant.
Related MCP server: Confluence MCP Server
๐๏ธ Architecture & Execution Flow
%%{init: {'theme': 'dark', 'themeVariables': { 'primaryColor': '#7aa2f7', 'primaryBorderColor': '#3d59a1', 'actorBkg': '#24283b', 'actorBorder': '#7aa2f7', 'lineColor': '#bb9af7', 'altBkg': '#1f2335' }}}%%
graph TD
UserReq["User Prompt: 'Fetch and convert Confluence PRD to prd.md'"] --> AgentSkill["Universal Agent Skill (SKILL.md)"]
AgentSkill --> Platform{"Target Agent Platform:<br>โข Google Antigravity<br>โข Claude Code / Desktop<br>โข Cursor / Windsurf<br>โข Cline / Roo Code / Terminal"}
Platform --> DetectInput{"Input Detection:<br>1. Live Confluence URL / Page ID<br>2. Local HTML Export<br>3. Confluence Storage XML"}
DetectInput -->|URL / Page ID| LiveTool["fetch_and_convert_from_confluence"]
DetectInput -->|Local HTML| HtmlTool["convert_confluence_html_to_prd"]
DetectInput -->|Storage XML| XmlTool["convert_confluence_storage_to_prd"]
subgraph "Custom MCP Server & Engine"
LiveTool --> ConfluenceClient["Confluence REST Client<br>(Auth via CONFLUENCE_PAT)"]
HtmlTool --> CoreParser["Core DOM & AST Parser"]
XmlTool --> CoreParser
ConfluenceClient --> CoreParser
CoreParser --> DOMCleaner["DOM & UI Cleaner"]
CoreParser --> TableEngine["Nested Table Formatter<br>(Compact Single-Line HTML)"]
CoreParser --> MacroEngine["Jira, Miro, Figma Extractor"]
CoreParser --> AssetMapper["Asset & Image Resolver"]
end
CoreParser --> FinalMD["Output: prd.md (Zero-Loss)"]
AgentSkill --> Validator["validate_prd_markdown (Integrity Report)"]โจ Key Capabilities & Zero-Loss Standards
1. ๐ Compact Nested Table Engine
Sub-tables inside table cells are converted into compact single-line HTML <table> elements with inner linebreaks converted to <br>, preserving strict Markdown table rows.
2. ๐ซ Jira Macro & Lozenge Resolution
Extracts Jira keys, summaries, URLs, and status badges into clean Markdown:
โข [CITA-1042](https://jira.../browse/CITA-1042) - Profile Revamp `IN PROGRESS`3. ๐จ Figma & Miro Embed Extraction
Decodes complex iframe source URLs to direct links:
[Figma Design](https://www.figma.com/file/...)
[Miro Board](https://miro.com/app/board/...)4. ๐ผ๏ธ Smart Asset Mapping & Icon Filtering
Automatically downloads attachments from live pages or maps local ./[name]_files/ directories while stripping noisy system icons (epic.svg, viewavatar, default.svg).
5. ๐ก GitHub Alert Panels
Transforms Confluence info/warning/note/tip panels into standard GitHub callouts:
> [!NOTE]
> **Document Status**
> This PRD is currently under active review.6. ๐ฌ Discussion & Comment Extraction
Automatically captures stakeholder feedback, reviewer comments, and architectural decisions into a structured ## ๐ฌ Discussions & Page Comments section, preserving author names, timestamps, user mentions, and formatting.
๐ ๏ธ MCP Tool Reference
Tool Name | Description | Key Parameters |
| Live fetch from Confluence by URL or Page ID, downloads image attachments, extracts comments, and outputs |
|
| Converts local Confluence exported |
|
| Converts raw XML/XHTML Storage Format ( |
|
| Inspects |
|
๐ Multi-Agent Integration Guide
๐ฌ Method A: Universal MCP Server (Recommended for Tool Calling)
Add confluence-prd-converter directly to your AI IDE (Google Antigravity, Claude Desktop, Cursor, Windsurf, Cline, Continue.dev, Kiro) via MCP:
{
"mcpServers": {
"confluence-prd-converter": {
"command": "npx",
"args": [
"-y",
"github:hanifalkauni/confluence-prd-converter",
"--mcp"
],
"env": {
"CONFLUENCE_URL": "https://wiki.yourcompany.com",
"CONFLUENCE_PAT": "YOUR_PERSONAL_ACCESS_TOKEN"
}
}
}
}๐ Method B: Pure Skill Agent / Rule File (No MCP Server Required)
If you prefer installing the skill instructions directly into your workspace for native agent reasoning:
๐ Option 1: Automatic via skills.sh (Recommended โ 30+ AI Agents)
Install with a single command into Cursor, Claude Code, Windsurf, Copilot, or Gemini CLI:
npx skills add hanifalkauni/confluence-prd-converterโก Option 2: Automatic Adapter Injection via CLI
Export all agent adapter files into your current workspace root:
npx -y github:hanifalkauni/confluence-prd-converter init๐ฆ Option 3: Manual Installation per AI Agent
Copy adapter to local workspace skill directory:
mkdir -p .agents/skills/confluence-prd-converter
cp adapters/antigravity/SKILL.md .agents/skills/confluence-prd-converter/SKILL.mdOr install globally for all workspaces at: ~/.gemini/config/skills/confluence-prd-converter/SKILL.md.
Add to project root CLAUDE.md:
cp adapters/claude/CLAUDE.md ./CLAUDE.mdAdd rule file to .cursor/rules/:
mkdir -p .cursor/rules
cp adapters/cursor/confluence-prd-converter.mdc .cursor/rules/confluence-prd-converter.mdcAdd rule to .windsurf/rules/:
mkdir -p .windsurf/rules
cp adapters/windsurf/windsurfrules.md .windsurf/rules/confluence-prd-converter.mdAdd rule to .clinerules/:
mkdir -p .clinerules
cp adapters/cline/clinerules.md .clinerules/confluence-prd-converter.mdAdd to .github/copilot-instructions.md:
mkdir -p .github
cp adapters/copilot/copilot-instructions.md .github/copilot-instructions.mdAdd steering instructions to .kiro/steering/:
mkdir -p .kiro/steering
cp adapters/kiro/steering.md .kiro/steering/confluence-prd-converter.mdAdd prompt rule to .continue/rules/:
mkdir -p .continue/rules
cp adapters/continue/prompt.md .continue/rules/confluence-prd-converter.md๐ป Method C: Standalone Terminal CLI Runner
Convert local HTML export:
npx -y github:hanifalkauni/confluence-prd-converter --input ./PRD_Export.html --output ./prd.mdLive fetch from Confluence URL:
npx -y github:hanifalkauni/confluence-prd-converter --input "https://wiki.yourcompany.com/pages/viewpage.action?pageId=1766097385" --output ./prd.mdValidate markdown integrity:
python scripts/validate_output.py --input ./prd.md๐ Repository Layout
confluence-prd-converter/
โโโ server.py # FastMCP Server (stdio JSON-RPC for AI IDEs)
โโโ SKILL.md # Universal Agent Skill definition
โโโ core/ # Core parsing & transformation engine
โ โโโ confluence_client.py # REST API client & attachment/comment fetcher
โ โโโ parser.py # Unified AST parser (Storage XML & View HTML)
โ โโโ formatters.py # Nested tables, Jira lozenges, embeds, alert callouts
โ โโโ clean.py # DOM sanitizer & system icon filter
โ โโโ validator.py # Structural Markdown integrity validator
โโโ adapters/ # Rule & skill adapters for 8+ AI Agent IDEs
โ โโโ antigravity/ # Google Antigravity & Gemini CLI
โ โโโ claude/ # Claude Code & Claude Desktop
โ โโโ cursor/ # Cursor IDE (.cursor/rules/)
โ โโโ windsurf/ # Windsurf Cascade (.windsurf/rules/)
โ โโโ cline/ # Cline & Roo Code (.clinerules/)
โ โโโ copilot/ # GitHub Copilot (.github/)
โ โโโ kiro/ # Kiro Steering (.kiro/steering/)
โ โโโ continue/ # Continue.dev (.continue/rules/)
โโโ evaluations/ # Evaluation & Feedback Hub (RFCs & study cases)
โโโ scripts/ # Standalone CLI tools (run_converter, validate_output)
โโโ tests/ # Unit test suite & generalized sample fixtures
โโโ schema.json # Configuration JSON Schema
โโโ confluence-prd-converter.config.json # Project configuration file๐งช Testing & Verification
Run the full unit test suite:
python tests/test_all.py๐ License
SPDX-License-Identifier: MIT
This project is licensed under the MIT License.
This server cannot be deployed
Maintenance
Related MCP Connectors
Convert files, URLs, and documents to clean, AI-ready Markdown via MCP.
MCP tools for AI agents: render URLs to image/PDF, check link health, convert HTML/CSV/JSON.
MCP-native collaborative markdown editor with real-time AI document editing
Publish and share access-controlled Markdown documents from any MCP-enabled AI tool.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Confluence by converting Markdown documents to professionally styled Confluence pages with Mermaid diagram support.6 npm1-
- AlicenseNot gradedqualityDmaintenanceEnables integration with Atlassian Confluence to browse spaces, search content using CQL, and manage pages directly from MCP-compatible applications. It automatically converts Confluence storage formats into markdown for seamless interaction with AI-driven editors and tools.27 npm2MIT
- FlicenseNot gradedqualityDmaintenanceConverts documents (PDF, DOCX, images, etc.) to Markdown using Microsoft's Markitdown library, with no local setup required. Integrates with AI agents via MCP for seamless document conversion.1-
- FlicenseAqualityCmaintenanceMCP server for Confluence REST API enabling page retrieval, attachment downloads, space listing, comment access, and full-text search via tools.6-