Markmap Server is a lightweight web application that allows one-click conversion of Markdown text to interactive mind maps, built on the open source project markmap. The generated mind maps support rich interactive operations and can be exported in various image formats.
π Explore More Mind Mapping Tools
Try MarkXMind - An online editor that creates complex mind maps using simple XMindMark syntax. It supports real-time preview, multi-format export (.xmind/.svg/.png), importing existing XMind files. Try it now!
- π Markdown to Mind Map: Convert Markdown text to interactive mind maps
- πΌοΈ Multi-format Export: Support for exporting as PNG, JPG, and SVG images
- π Interactive Operations: Support for zooming, expanding/collapsing nodes, and other interactive features
- π Markdown Copy: One-click copy of the original Markdown content
- π Lightweight Architecture: No session management required, making it suitable for containerized deployments
- π‘ JSON-RPC 2.0 Compatible: Supports both direct and MCP-style request formats
- Node.js (v25)
# Install from npm
npm install @isdmx/markmap-server -g
# Basic run
npx -y @isdmx/markmap-server
# Specify output directory
npx -y @isdmx/markmap-server --output /path/to/output/directory
# Or
markmap-serverAlternatively, you can clone the repository and run locally:
# Clone the repository
git clone https://github.com/isdmx/markmap-server.git
# Navigate to the project directory
cd markmap-server
# Build project
npm install && npm run build
# Run the server
node build/index.jsThe server provides a single endpoint for markdown to HTML conversion:
- Endpoint:
POST /convert - Content-Type:
application/json - Port: 3000 (default)
The server accepts multiple request formats for flexibility:
{
"markdown": "# Your markdown content here\n- Item 1\n- Item 2"
}{
"jsonrpc": "2.0",
"method": "tools/markdown_to_mindmap",
"params": {
"markdown": "# Your markdown content here\n- Item 1\n- Item 2"
},
"id": 1
}Using curl:
curl -X POST http://localhost:3000/convert \
-H "Content-Type: application/json" \
-d '{
"markdown": "# Sample Mind Map\n- Node 1\n- Node 2\n - Subnode 2.1"
}'Or with MCP-style format:
curl -X POST http://localhost:3000/convert \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "tools/markdown_to_mindmap",
"params": {
"markdown": "# Sample Mind Map\n- Node 1\n- Node 2\n - Subnode 2.1"
},
"id": 1
}'The server returns responses in JSON-RPC 2.0 format:
{
"jsonrpc": "2.0",
"result": {
"content": [
{
"type": "text",
"text": "<!DOCTYPE html>..." // Full HTML content
}
],
"structuredContent": {
"html": "<!DOCTYPE html>...", // Full HTML content
"contentLength": 8618, // Length of HTML content
"success": true
}
},
"id": 1 // Request ID if provided
}Error responses follow JSON-RPC 2.0 error format:
{
"jsonrpc": "2.0",
"error": {
"code": -32602, // JSON-RPC error code
"message": "Error description"
},
"id": null
}The server provides standard health check endpoints:
- Endpoint:
GET / - Response: Status information about the server
curl http://localhost:3000/For Kubernetes deployments, the server provides standard health check endpoints:
- Health Endpoint:
GET /healthz - Ready Endpoint:
GET /readyz
These endpoints return a 200 status code when the server is healthy/ready, making them suitable for Kubernetes liveness and readiness probes:
curl http://localhost:3000/healthz
curl http://localhost:3000/readyz--output, -o <path>: Output directory for generated HTML files (optional)--help, -h: Show help information
The server exposes Prometheus metrics at the /metrics endpoint:
- Endpoint:
GET /metrics - Response: Prometheus-formatted metrics
The following metrics are collected:
documents_processed_total: Total number of documents processeddocument_processing_time_seconds: Time spent processing documents (histogram)input_document_size_bytes: Size of input documents in bytes (histogram)
Example:
curl http://localhost:3000/metricsYou can also run the server using Docker:
# Build the image
docker build -t markmap-server .
# Run the server
docker run -p 3000:3000 markmap-serverThis project is licensed under the MIT License.