Labsco
shyinlim logo

MindmupGoogleDriveMcp

β˜… 1

from shyinlim

This server enables you to search, retrieve, and parse MindMup files stored in your Google Drive directly through the MCP interface.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedAccount requiredAdvanced setup

MindMup2 Google Drive MCP Server

A Model Context Protocol (MCP) server that lets AI clients (Claude Code, Cursor) search, read, and drill into MindMup 2 .mup mind maps stored in Google Drive β€” without dumping a 3MB JSON tree into the model. Large maps are auto-summarised into a tree outline; the AI then drills into specific sections by node_path.

Compatibility: Claude Code, Cursor (HTTP transport). Not supported: Claude Desktop (stdio-only).

πŸ’« Result

ezgif-5b4a0eb3a275f8.gif

✨ Features

  • Search MindMup files across your entire Google Drive (read-only)
  • Tree navigation + section drill-down for large mind maps β€” small files return full content, large files return an outline you can drill into
  • Per-client cache isolation via X-Client-Id header, so different users/tools don't share cached content
  • Hot-reload dev mode via fastmcp run --reload + bind-mounted source
  • FastMCP server with built-in /health and /ping endpoints
  • Docker Compose for both dev and prod

πŸ—ΊοΈ End-to-End Flow

1. Set up Google Cloud service account     β†’  download JSON key
2. Share your Drive folder with the SA     β†’  Viewer access
3. Base64-encode the JSON key              β†’  for X-Google-Credential header
4. Run the server  (Docker or Python)      β†’  http://127.0.0.1:9805
5. Configure your MCP client (Claude/Cursor) with the base64 credential
6. Verify  β†’  curl http://127.0.0.1:9805/health

πŸ”§ Available MCP Tools

ToolDescription
list_filesList MindMup files from Google Drive (folders and non-.mup filtered by default). Returns id, name, folder_url, size, modified_time.
read_mindmapRead a MindMup file by file_id or file_name (one required; name uses first partial match). Small files (<100KB AI-dict) return content_type: "full". Large files return content_type: "outline_only" with tree_outline, section_stats, and suggested_start_paths.
search_mindmapSearch nodes by keyword. Params: file_id, keyword, optional node_path (subtree scope), max_results=30, normalize_whitespace=True. Returns nodes with node_path, title_preview, breadcrumb, children_count.
get_mindmap_sectionDrill into a section by node_path (dotted integers, root is 1, e.g. "1.2.3"). Optional max_depth, offset=0, limit=0. Returns content_type: "full" | "outline_only" | "paginated" | "truncated" β€” auto-switches when the section is still too large.

Suggested workflow for AI agents: list_files β†’ read_mindmap β†’ if outline_only, either search_mindmap (by keyword) or get_mindmap_section (by node_path from suggested_start_paths).

πŸ—οΈ Project Structure

<details> <summary>Click to expand</summary>
β”œβ”€β”€ mcp_deployment/
β”‚   β”œβ”€β”€ docker-compose-dev.yml
β”‚   β”œβ”€β”€ docker-compose-prod.yml
β”‚   └── Dockerfile
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ core/
β”‚   β”‚   β”œβ”€β”€ gdrive_client.py    # Google Drive API client
β”‚   β”‚   β”œβ”€β”€ gdrive_feature.py   # Google Drive feature implementation
β”‚   β”‚   β”œβ”€β”€ mcp_server.py       # Main MCP server with read tools
β”‚   β”‚   └── mindmup_parser.py   # MindMup parsing + tree navigation
β”‚   β”œβ”€β”€ model/
β”‚   β”‚   β”œβ”€β”€ common_model.py     # Common data models
β”‚   β”‚   β”œβ”€β”€ gdrive_model.py     # Google Drive data models
β”‚   β”‚   └── mindmup_model.py    # Mind map data models (with to_ai_dict)
β”‚   └── utility/
β”‚       β”œβ”€β”€ enum.py             # Enumerations and constants
β”‚       └── logger.py           # Logging utilities
β”œβ”€β”€ tests/                      # Unit tests
β”œβ”€β”€ plans/                      # Implementation plans
β”œβ”€β”€ run.py                      # Main entry point
β”œβ”€β”€ requirements.txt            # Python dependencies
└── makefile                    # Build and deployment commands
</details>