xmind-mcp
Click on "Install 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., "@xmind-mcpextract the 'Action Items' branch from workflow.xmind"
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.
XMind MCP Server
A Model Context Protocol (MCP) server for parsing and searching XMind mind map files (.xmind). Enables Claude and other AI applications to efficiently extract, search, and manipulate mind map data with token-aware formatting and intelligent error handling.
Features
Full Document Parsing: Convert entire XMind documents to structured Markdown or JSON format
Efficient Search: Search nodes by keyword, label, or status marker with breadcrumb path resolution
Branch Extraction: Extract specific subtrees with optional depth limiting for token optimization
Multi-Format Support: Handles both Zen (modern JSON-based) and Legacy (XML-based) XMind formats
Token-Aware Output: Estimates token consumption and provides optimization suggestions
Error Guidance: Helpful error messages with actionable recovery steps
Claude Desktop Integration: Ready to use as a Claude Desktop tool
Related MCP server: XMind Generator MCP
Table of Contents
Quick Start
Get from zero to a working result in under a minute.
Option A ā Global install (fastest)
npm install -g @zengjing/xmind-mcp
xmind-mcp --help # verify install
xmind-mcp ~/Documents/my-mindmap.xmind # try CLI on a fileOption B ā Local dev install
git clone https://github.com/hhtczengjing/xmind-mcp.git
cd xmind-mcp
npm install
npm run build
npm start # launches MCP server on stdioThen point Claude Desktop at the built dist/index.js (see Claude Desktop Configuration).
Installation
Requirements
Node.js 18.0 or higher (matches
engines.nodeinpackage.json)npm or yarn package manager
Global Install (Recommended)
The bin field in package.json exposes the xmind-mcp command globally, so most users can skip building from source:
npm install -g @zengjing/xmind-mcp
xmind-mcp --helpThis gives you both:
the
xmind-mcpCLI (see Command-Line Usage)a runnable MCP server entry point at
<npm-prefix>/lib/node_modules/@zengjing/xmind-mcp/dist/index.js
š Use
npm root -g(macOS/Linux) or%APPDATA%\npm(Windows) to locatedist/index.jsfor your Claude Desktop config.
From Source
Clone the repository
git clone https://github.com/hhtczengjing/xmind-mcp.git cd xmind-mcpInstall dependencies
npm installBuild the project
npm run buildVerify installation
npm run lint
Usage
Running the Server
Start the MCP server via stdio transport:
npm startThe server will start and listen for MCP protocol requests on stdin/stdout.
For development with hot reload:
npm run devClaude Desktop Configuration
To use with Claude Desktop, add the server to your claude_desktop_config.json:
Location: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
Configuration:
{
"mcpServers": {
"xmind-mcp": {
"command": "node",
"args": ["/path/to/xmind-mcp/dist/index.js"]
}
}
}Replace /path/to/xmind-mcp with the absolute path to your xmind-mcp directory.
After adding the configuration, restart Claude Desktop. The three tools will be available to Claude.
Command-Line (CLI) Usage
The project ships a standalone CLI built on the same parser/formatters that power the MCP tools. It's useful for quick inspection, scripting, and CI pipelines.
Script alias (from source): npm run parse -- <file> [options]
Global command (after npm install -g): xmind-mcp <file> [options]
Direct binary: node dist/cli.js <file> [options]
Usage
xmind-mcp <file-path> [options]
Arguments:
<file-path> Path to the .xmind file (supports ~ for home directory)
Options:
-f, --format Output format: 'markdown' (default) or 'json'
-o, --output Save output to file
-s, --search Filter results by keyword (case-insensitive)
-v, --verbose Show sheet titles and parsing details
-h, --help Show this help messageExamples
# Print a Markdown outline to stdout
xmind-mcp ~/Documents/project-plan.xmind
# JSON output, saved to a file
xmind-mcp ~/Documents/strategy.xmind --format json -o strategy.json
# Filter content by a keyword
xmind-mcp ~/Documents/notes.xmind --search "deadline"
# Verbose mode (shows file metadata + per-sheet titles)
xmind-mcp ~/Documents/notes.xmind -vThe CLI prints a header block with file metadata (format version, sheet count, total topics, parse timestamp) followed by the formatted content, and exits with status code 0 on success or 1 on error.
Tools Documentation
1. parse_xmind
Description: Parse an entire XMind document and return formatted output (Markdown or JSON).
When to use:
Analyzing complete mind map structures
Creating summaries or reports from mind maps
Understanding full document architecture
Parameters:
Parameter | Type | Required | Default | Description |
| string | Yes | - | Absolute file path to the .xmind file. Supports |
| string | No |
| Output format: |
Examples:
Tool Call:
parse_xmind
path: "~/Documents/project-plan.xmind"
format: "markdown"
Response:
Complete mind map structure in Markdown format with token estimate.
Includes recommendations for large documents (>20K tokens).Tool Call:
parse_xmind
path: "/Users/alice/xmind/strategy.xmind"
format: "json"
Response:
Structure summary + full JSON representation with metadata.Output:
Formatted content (Markdown or JSON)
Metadata: file path, XMind format (Zen/Legacy), sheet count, topic count
Token estimation and optimization suggestions for large documents
Character count and recommendations for context efficiency
Token Efficiency:
Markdown format: ~1 token per 4 characters (most efficient)
JSON format: ~1 token per 3 characters (more detailed metadata)
Large documents (>20K tokens): Consider using search or branch extraction
2. search_xmind_nodes
Description: Search for nodes in an XMind file by keyword, label, or status marker with breadcrumb path resolution.
When to use:
Finding specific topics in large mind maps without loading entire document
Locating nodes by keyword, label, or marker type
Narrowing context for focused analysis
Parameters:
Parameter | Type | Required | Default | Description |
| string | Yes | - | Absolute file path to the .xmind file. Supports |
| string | Yes | - | Search keyword or phrase to match in node titles, notes, or labels. |
| array | No |
| Fields to search in: |
| boolean | No |
| Enable case-sensitive matching (default: case-insensitive). |
Examples:
Tool Call:
search_xmind_nodes
path: "~/Documents/project-plan.xmind"
query: "deadline"
searchIn: ["title", "note"]
Response:
Found 3 matches:
1. Project Deadline
Path: Project Plan > Timeline > Project Deadline
Match: title ā "deadline"
Note: Must complete by end of Q3...
2. Milestone Due Date
Path: Project Plan > Phases > Phase 2 > Milestone Due Date
Match: note ā "Deadline is Sept 30th"
...Tool Call:
search_xmind_nodes
path: "/Users/alice/xmind/architecture.xmind"
query: "API"
caseSensitive: true
searchIn: ["title"]
Response:
Found 2 matches:
1. REST API Design
Path: Architecture > Backend > REST API Design
Match: title ā "REST API Design"
...Output:
Match count and result details
Breadcrumb paths (root ā ... ā node) for context
Match type and matched text excerpt
Node notes preview (first 80 characters) if available
Matched nodes have IDs that can be used with
get_xmind_node_branch
3. get_xmind_node_branch
Description: Extract a specific node and its subtree (up to specified depth) from an XMind file.
When to use:
Focusing on specific branches to avoid token overload
Extracting relevant subtrees for detailed analysis
Limiting recursion depth for performance
Narrowing context after search results
Parameters:
Parameter | Type | Required | Default | Description |
| string | Yes | - | Absolute file path to the .xmind file. |
| string | Yes | - | Target node ID to extract. Get IDs via |
| number | No | unlimited | Maximum recursion depth for children (0 = node only, 1 = children, 2+ = deeper). |
Examples:
Tool Call:
get_xmind_node_branch
path: "~/Documents/project-plan.xmind"
nodeId: "topic-42a"
depth: 2
Response:
Extracted 8 nodes (depth: 2/2)
- Target Topic
- Child 1
- Grandchild 1
- Grandchild 2
- Child 2
> Supporting notes if available...Tool Call:
get_xmind_node_branch
path: "/Users/alice/xmind/strategy.xmind"
nodeId: "analysis-backend"
Response:
Extracted 24 nodes (depth: 4/ā)
- Backend Architecture
- API Layer
- REST Endpoints
- GraphQL
- Database
- Schema Design
- Performance Tuning
...Output:
Node count and depth information
Extracted subtree in Markdown outline format
Metadata: actual depth reached vs requested depth
Suitable for direct analysis or further processing
Debugging with MCP Inspector
The MCP Inspector is the official debugger for MCP servers. It streams ListTools / CallTool traffic so you can verify your install and inspect each request/response without going through Claude Desktop.
# From the project root, with deps installed
npx @modelcontextprotocol/inspector node dist/index.jsIn the Inspector UI:
Confirm the three tools (
parse_xmind,search_xmind_nodes,get_xmind_node_branch) appear under Tools.Pick a tool, fill in
pathto a real.xmindfile, and hit Run.Use the Notifications / Logs pane to see structured log output (the server uses the
utils/logger.tsmodule withinfo/warn/errorlevels).
Enable verbose logging in any environment by setting DEBUG=xmind-mcp.
Development
Project Structure
xmind-mcp/
āāā src/
ā āāā index.ts # MCP server entry point (stdio transport)
ā āāā cli.ts # Standalone CLI for local/scripted use
ā āāā core/
ā ā āāā parser.ts # Unified parser interface
ā ā āāā zen-parser.ts # Zen (JSON) format handler
ā ā āāā legacy-parser.ts # Legacy (XML) format handler
ā āāā tools/
ā ā āāā parse-tool.ts # parse_xmind implementation
ā ā āāā search-tool.ts # search_xmind_nodes implementation
ā ā āāā branch-tool.ts # get_xmind_node_branch implementation
ā āāā formatters/
ā ā āāā markdown-formatter.ts # Markdown output formatting
ā ā āāā json-formatter.ts # JSON output formatting
ā āāā model/
ā ā āāā types.ts # Core TypeScript types (XMindNode, XMindSheet, etc.)
ā ā āāā schemas.ts # Zod schemas for input validation
ā āāā utils/
ā āāā errors.ts # Error types and handling
ā āāā file-utils.ts # File path resolution and validation
ā āāā logger.ts # Structured logging utilities
āāā tests/ # Jest test suite
āāā dist/ # Compiled JavaScript (generated)
āāā package.json
āāā tsconfig.json
āāā jest.config.jsFile Descriptions
Core Modules
parser.ts: Unified interface for parsing both Zen and Legacy formats. Auto-detects format and delegates to appropriate parser.
zen-parser.ts: Handles modern XMind Zen format (JSON-based). Extracts content.xml from .zip archive.
legacy-parser.ts: Handles legacy XMind 8 format (XML-based). Parses workbook.xml structure.
Entry Points
index.ts: MCP server. Listens on stdio and routes
parse_xmind/search_xmind_nodes/get_xmind_node_branchcalls.cli.ts: Standalone CLI (see Command-Line Usage). Built into
dist/cli.jsand exposed as thexmind-mcpglobal command.
Tool Implementations
parse-tool.ts: Full document parsing with format selection. Includes token estimation and optimization suggestions.
search-tool.ts: Breadth-first search across all sheets with path tracking. Supports field filtering and case sensitivity.
branch-tool.ts: Tree extraction with depth limiting. Useful for large documents.
Formatters
markdown-formatter.ts: Converts AST to token-efficient Markdown outline. Escapes special characters and includes metadata.
json-formatter.ts: Full-featured JSON output with structure summary. Useful for programmatic processing.
Model & Utilities
types.ts: Core types: XMindNode, XMindSheet, XMindParsedResult, SearchResult, etc.
schemas.ts: Zod validation schemas for all tool inputs.
errors.ts: Custom error classes with error codes for specific failure modes.
file-utils.ts: Path resolution, validation, and node ID verification.
logger.ts: Structured logging with levels (debug, info, warn, error).
Testing
Run the full test suite:
npm testRun tests in watch mode:
npm run test:watchTests are organized by layer under tests/:
tests/
āāā core/ # Unit tests for individual parsers
ā āāā legacy-parser.test.ts # XMind 8 (XML) format
ā āāā zen-parser.test.ts # XMind Zen (JSON) format
āāā e2e/
āāā mcp-integration.test.ts # End-to-end MCP protocol flowThe framework is Jest with ts-jest (TypeScript out of the box). All tests run from a clean repo without any external network access ā .xmind fixtures are generated or committed locally.
Building
Compile TypeScript to JavaScript:
npm run buildType check without building:
npm run lintArchitecture Overview
Unified AST Model: Both Zen and Legacy formats are normalized to a single tree structure (XMindNode), simplifying downstream processing.
Stateless Design: All functions are pure and immutable. No server-side state is maintained between requests.
Token-Aware Output: Tools estimate token consumption and suggest optimizations (search/branch extraction for large documents).
Error Guidance: All errors include actionable messages helping users recover (invalid paths, missing nodes, etc.).
Performance: Lazy evaluation where possible, depth limiting in branch extraction, incremental search results.
Limitations and Known Issues
Current Limitations
Hyperlinks: Internal node references (href) are preserved but not resolved to actual node content
Relationships/Connectors: Cross-node relationships are parsed but not included in Markdown output (available in JSON format)
Rich Text: Multi-formatted text within notes is flattened to plain text
Images & Media: Embedded images and media are not extracted or referenced
Styling: Font colors, sizes, and other visual formatting are not preserved
Comments: XMind 2024 comment annotations are not extracted
Token Limitations
Large mind maps (>50K nodes) may exceed Claude's context window even with branch extraction
Recommend using search to narrow scope for very large documents
JSON format uses more tokens than Markdown format (use Markdown when possible)
File Format Support
Supported: XMind 2023 (Zen format), XMind 8 (Legacy format)
Experimental: Earlier XMind versions may work but are untested
Error Recovery
Invalid file paths: Validates before parsing; suggests checking file permissions
Corrupted archives: Returns detailed error if .zip is invalid
Missing nodes: Returns friendly error suggesting search_xmind_nodes for available IDs
Large files: Suggests using search or branch extraction for better performance
Troubleshooting
Symptom | Likely cause | Fix |
| You ran | Run |
Claude Desktop doesn't list the three tools | Config path is wrong or | Re-check |
|
| Pass an absolute path or use |
| The id was from a different file or session | Re-run |
Output blows past context window | Whole-document parse on a very large map | Use |
| Another process already bound the stdio | Close any duplicate launches; MCP over stdio is single-consumer |
Corrupt archive errors | File isn't a real | Re-export from XMind; confirm |
For anything not covered above, please open an issue (next section).
License
MIT License - See LICENSE file for details.
Support
For issues, feature requests, or questions:
Check existing issues at https://github.com/hhtczengjing/xmind-mcp/issues
Enable debug logging by setting
DEBUG=xmind-mcpenvironment variableRun the test suite to verify your install:
npm testWhen filing a new issue, include:
Output of
node --versionandnpm --versionExact command / tool call that failed and the full error text
A minimal
.xmindsample (anonymized if it contains sensitive content)
Changelog
Version 1.0.0 (Initial Release)
Full document parsing (Markdown and JSON formats)
Node search with breadcrumb paths
Branch extraction with depth limiting
Support for Zen and Legacy XMind formats
Token estimation and optimization suggestions
Comprehensive error handling and logging
MCP server integration for Claude and other clients
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseDqualityCmaintenanceAn MCP server that allows LLMs to create structured Xmind mind maps with hierarchical topic structures, supporting features like notes, labels, and markers.17744MIT
- AlicenseDqualityDmaintenanceAn MCP server that enables users to generate structured XMind mind maps with hierarchical topics, notes, and labels through natural language. It features automatic file saving to the local Documents folder and can automatically open generated maps in the XMind application.1631MIT
- AlicenseBqualityDmaintenanceMCP server that visualizes Claude conversations as interactive mindmaps, enabling export and optional upload to Navigate Chat.27MIT
- Flicense-qualityCmaintenanceAn MCP server that lets Claude or ChatGPT read, create, and edit mind maps stored in a GitHub repository, with support for local and HTTP transport.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yoā¦
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
MCP server for AI dialogue using various LLM models via AceDataCloud
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/hhtczengjing/xmind-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server