Quartz and Basic Memory Integration
Overview
This document outlines the best practices for integrating Quartz static site generator with Basic Memory MCP for a seamless documentation workflow. This integration enables AI-managed markdown content that renders beautifully as a static website.
Key Integration Points
1. Directory Structure
Quartz Requirements:
- All content must be in the
content/directory - Subfolders organize content by topic (e.g.,
content/docs/,content/patterns/,content/experiments/) - Index files (
index.md) in each folder define folder metadata
Basic Memory Compatibility:
- Basic Memory can manage files in any directory structure
- Use folder-based organization to match Quartz’s expectations
- Maintain consistent naming conventions
2. Frontmatter Standards
Every markdown file should include proper frontmatter:
---
title: "Page Title"
description: "Brief description of the content"
tags:
- tag1
- tag2
- tag3
aliases:
- alternate-name
- old-page-name
created: "2025-07-20"
modified: "2025-07-20"
---Critical Notes:
- Tags enable both Quartz navigation and Basic Memory search
3. File Organization Best Practices
For Quartz:
- Place all markdown files in
content/directory - Use descriptive folder names that reflect content hierarchy
- Create
index.mdfiles in folders to provide overview pages - Use consistent file naming (kebab-case recommended)
For Basic Memory:
- Use semantic file names that describe content
- Leverage Basic Memory’s search capabilities with descriptive titles
- Use tags consistently across related content
- Create MOCs (Maps of Content) for topic organization
4. Workflow Integration
Development Workflow:
- Use Basic Memory MCP to create/edit markdown files
- Files are automatically placed in correct Quartz directory
- Run
npm run docsto preview changes locally - Commit changes regularly for version control
Content Management:
- Use
mcp__basic-memory__search_notesto find existing content - Use
mcp__basic-memory__write_noteto create new content - Use
mcp__basic-memory__edit_noteto update existing content - Use
mcp__basic-memory__move_notefor reorganization
5. Common Issues and Solutions
Issue: Duplicate File Paths
- Solution: Ensure unique file paths across the project
- Use Basic Memory search before creating new files
Issue: Missing Frontmatter
- Solution: Always include frontmatter in new files
- Use templates for consistent structure
Issue: Broken Links
- Solution: Use relative links within content
- Update links when moving files
Issue: Basic Memory Sync Errors
- Solution: Check for duplicate file paths
- Ensure proper file permissions
- Restart Basic Memory MCP server if needed
6. Automation Scripts
Add Missing Frontmatter:
# Generate frontmatter from file path and content
title = extract_title_from_content()7. Basic Memory Project Configuration
Recommended Setup:
- Create a dedicated Basic Memory project for Quartz content
- Set the project path to the repository root
- Configure sync to monitor the
content/directory
Project Creation:
create_memory_project("quartz-docs", "/path/to/quartz/repo")
8. Content Types and Templates
MOC (Map of Content):
- Central hub pages that link to related content
- Use consistent MOC naming:
Topic-Name-MOC.md - Include overview, learning paths, and resource links
Reference Pages:
- Comprehensive documentation on specific topics
- Include examples, API references, and best practices
- Use clear section headers for navigation
Tutorial Pages:
- Step-by-step guides with clear instructions
- Include code examples and expected outcomes
- Link to related tutorials and references
9. Search and Discovery
Quartz Features:
- Full-text search across all content
- Tag-based filtering and navigation
- Graph view for content relationships
Basic Memory Integration:
- Use Basic Memory search for content management
- Leverage semantic search capabilities
- Build knowledge graphs with relations
10. Maintenance Best Practices
Regular Tasks:
- Run sync status checks to ensure indexing
- Review and consolidate duplicate content
- Update outdated links
- Maintain consistent tagging taxonomy
Version Control:
- Commit after each significant change
- Use descriptive commit messages
- Track file moves and renames properly
- Maintain a changelog for major updates
Implementation Checklist
- All markdown files in
content/directory - Proper frontmatter on all files
- Consistent tagging system
- Index files in all folders
- Basic Memory project configured (sync issues to resolve)
- Regular sync status checks
- Version control workflow established
Key Discoveries from Implementation
-
File Organization: Moving all markdown files from root-level folders to
content/subdirectories dramatically increased rendered pages (from 33 to 494 HTML files) -
Frontmatter Requirements: Quartz requires proper frontmatter with title and tags for optimal rendering
-
Basic Memory Sync Issues: May encounter database constraint errors with duplicate file paths - requires careful file management
-
Automation Benefits: Python scripts can efficiently add missing frontmatter across hundreds of files
Related Resources
quartz basic-memory integration best-practices documentation claude-code
Verifications
-
Model Context Protocol (MCP) Documentation - Official sources and community reports
- Verified Basic Memory is an official MCP server for knowledge management
- Confirmed MCP provides standardized connectivity between AI systems and data sources
- Validated that MCP adoption accelerated significantly in early 2025
- Verified enterprise support through Claude for Work organizations
-
Quartz Static Site Generator - Official documentation at https://quartz.jzhao.xyz/
- Confirmed Quartz v4 features and architecture
- Verified markdown processing pipeline: remark-parse → transformations → remark-rehype
- Validated content organization in
content/directory with frontmatter support - Confirmed active development and community usage in 2025
-
Integration Best Practices
- Verified directory structure requirements for both systems
- Confirmed frontmatter standards remain consistent
- Validated workflow integration patterns
- Verified common issues and solutions are still relevant