Docs

Complete reference for mdcrypt features and capabilities. mdcrypt is an AI-assisted, offline-first Markdown note-taking platform with native MCP support for agent collaboration.

Agent Setup

Claude Code Setup

Connect Claude Code to your mdcrypt crypt in 4 steps. This enables Claude to read, create, and organize your notes directly from the terminal.

  1. 1.Get your API key

    Log into mdcrypt, open Settings, and navigate to the API Access tab. Generate a new API key and copy it.

  2. 2.Add MCP server config

    Add the following to your Claude Code MCP configuration file (~/.claude/mcp.json):

    {
      "mcpServers": {
        "mdcrypt": {
          "url": "https://mdcrypt.dev/mcp",
          "headers": {
            "Authorization": "Bearer YOUR_API_KEY"
          }
        }
      }
    }
  3. 3.Restart Claude Code

    Restart Claude Code or run /mcp to reload MCP servers. You should see mdcrypt listed as a connected server.

  4. 4.Start using tools

    Claude now has access to 20 MCP tools. Try asking it to list your notes, create a new note, or search your crypt. Example prompts:

    • "List my recent notes"
    • "Create a note titled Meeting Notes with an ADR template"
    • "Add a D2 architecture diagram to my System Design note"
    • "Find all notes that link to my API Spec"

CLI Installation

Install the mdcrypt CLI for command-line access to your vault.

$npm install -g mdcrypt-cli
$mdcli config

CLI Commands

The CLI exposes your vault as Unix-friendly commands. Pipe, script, and compose them into your existing shell workflows.

Notes

mdcli ls                    # list recent notes
mdcli ls -l 50              # list last 50 notes
mdcli search "auth"         # full-text search
mdcli read <id>             # read a note (supports 8-char short IDs)
mdcli read <id> --raw       # raw markdown output (for piping)
mdcli create -t "Title"     # create a note
mdcli append <id> -c "..."  # append content to a note
mdcli rename <id> "New"     # rename a note
mdcli tag <id> api spec     # set tags on a note
mdcli backlinks <id>        # show notes linking to this note
mdcli rm <id>               # soft-delete a note
mdcli restore <id>          # restore a deleted note

Folders

mdcli folders               # list all folders
mdcli mkdir "Architecture"  # create a folder
mdcli mkdir "Sub" -p <id>   # create nested folder
mdcli mv <note_id> <folder> # move note to folder
mdcli rmdir <id>            # delete a folder

Shell Workflow Examples

# Pipe git log into a release note
git log --oneline v1.0..HEAD | mdcli create -t "Release Notes v1.1" -c "$(cat -)"

# Search and read in one shot
mdcli read $(mdcli search "deploy" | head -1 | awk '{print $1}') --raw

# Daily standup note from template
mdcli create -t "Standup $(date +%Y-%m-%d)" --tag standup daily \
  -c "## Done\n\n## Doing\n\n## Blocked"

# Append CI results to a tracking note
echo "Build #$CI_BUILD_ID: $CI_STATUS" | mdcli append <id> -c "$(cat -)"

# Back up a note to local file
mdcli read <id> --raw > backup.md

# Bulk tag all notes matching a search
mdcli search "api" | awk '{print $1}' | xargs -I{} mdcli tag {} api docs

GitHub Sync

Sync your crypt bidirectionally with a GitHub repository. Notes are stored as Markdown files preserving your folder hierarchy.

$npm install -g mdcrypt-sync
$mdcrypt-sync config

Commands

mdcrypt-sync push           # push local crypt changes to GitHub
mdcrypt-sync pull           # pull remote changes into your crypt
mdcrypt-sync sync           # bidirectional sync (pull then push)
mdcrypt-sync watch          # continuous sync — watches for changes and syncs automatically

Other Agents

Any MCP-compatible agent can connect to mdcrypt. Use the same MCP server URL and API key configuration. The server uses StreamableHTTP transport and authenticates via Bearer token in the Authorization header.

Editor

Split View

Edit Markdown on the left, see a live preview on the right. Toggle between editor-only, preview-only, or split mode.

Slash Commands

Type / at the start of a line to open the command menu. Insert headings, code blocks, diagrams, tables, and more without leaving the keyboard.

Wiki Links

Link notes together with [[Note Title]] syntax. Links are resolved by title and navigable in both the editor and preview. Backlinks are tracked automatically.

Line Wrapping

Toggle soft line wrapping on or off from the editor toolbar. On mobile, wrapping is always enabled.

Editor Toolbar

Quick-access buttons for bold, italic, headings, links, code blocks, tables, and table of contents insertion.

Frontmatter

Each note has YAML frontmatter with title, tags, status, and creation date. Managed automatically or editable via the Manifest panel.

Diagrams

Mermaid

Client-side rendering of flowcharts, sequence diagrams, Gantt charts, and more. Works offline. Theme-aware with dark mode support. Use ```mermaid code blocks.

PlantUML

Sequence, class, activity, component, and state diagrams. Rendered server-side via Kroki. Use ```plantuml code blocks.

D2

Modern declarative diagramming with auto-layout. Great for architecture and system diagrams. Use ```d2 code blocks.

Graphviz / DOT

Graph visualization for dependency trees, state machines, and network topologies. Use ```graphviz or ```dot code blocks.

ERD

Entity-relationship diagrams for database modeling. Use ```erd code blocks.

DBML

Database Markup Language for schema visualization with foreign key relationships. Use ```dbml code blocks.

More Types

Also supports Nomnoml, Ditaa, Svgbob, WaveDrom, Vega-Lite, Structurizr, and C4-PlantUML via the Kroki rendering server.

Copy Support

Every rendered diagram has Copy Source and Copy Image buttons. Copy Image converts SVGs to PNG for pasting into other tools.

Organization

Crypts

Notes are organized into crypts — isolated workspaces each with their own notes, folders, and assets. Switch between crypts from the sidebar. Create or delete crypts at any time.

Folders

Organize notes into nested folders. Create, rename (double-click), and delete folders from the sidebar. Supports nested hierarchies.

Drag & Drop

Move notes between folders by dragging them in the sidebar. Drop on a folder to move, or drop on the root zone to un-folder a note.

Tags

Add tags to notes via the metadata ribbon. Filter notes by tag in the sidebar. Tags are stored in frontmatter.

Status

Mark notes as Draft, Stable, or Archived. Click the status badge in the metadata ribbon to cycle through states.

Assets

Store files alongside your notes — text configs, JSON, YAML, TOML, scripts, and binary files. Assets are organized by crypt, support tags, and are accessible via the REST API and sidebar browser.

Trash & Restore

Deleted notes go to trash (soft delete). View trashed notes in the sidebar and restore them with one click.

Expand / Collapse

Toggle all folders open or closed with the expand/collapse button in the sidebar header.

AI & Agents

MCP Server

A Model Context Protocol server exposes 20 tools for AI agents to read, create, update, and organize notes, folders, templates, and crypts. Agents connect via StreamableHTTP with API key authentication.

Note Tools

list_notes, read_note, create_note, replace_section, append_to_note, update_task, update_metadata, delete_note, restore_note, move_note, get_backlinks.

Organization Tools

list_folders, create_folder, delete_folder, list_crypts.

Template Tools

list_templates, create_template, read_template, update_template, delete_template. Agents can read, author, and manage reusable note templates.

Section-Scoped Edits

Agents can target specific sections by heading for surgical edits without overwriting the entire note. Uses optimistic concurrency with version numbers.

Diagram Support

Agents can include fenced diagram blocks (mermaid, plantuml, d2, graphviz, erd, dbml, etc.) in note content. Diagrams render automatically in the preview.

Note Templates

Create notes from built-in templates: RFC, ADR, Meeting Notes, and Research. Available via the command palette or MCP tools.

Sync & Storage

Real-Time Sync

Data is fetched from Supabase on load and kept live via real-time subscriptions. Changes from other sessions or devices appear automatically without a page refresh.

GitHub Sync

Bidirectional sync between your crypt and a GitHub repository. Push notes as Markdown files, pull remote changes back, or run in watch mode for continuous sync. Folder hierarchy is preserved.

Export & Restore

Download all crypts as a structured .zip archive from Settings → Data Crypt. Restore from the same archive — crypt names are matched automatically and folder hierarchy is recreated.

Conflict Resolution

Optimistic concurrency control with integer version numbers. Conflicting edits are flagged for manual resolution.

Sync Indicator

The status bar shows current sync state: Synced, Syncing, Offline, or Error. Based on browser network status for reliability.

Row-Level Security

All database access is scoped by user via Supabase RLS. Users can only access their own data, enforced at the database level.

Interface

Dark & Light Themes

Toggle between dark and light themes. The editor, preview, and all UI components adapt. Marketing pages always render in dark mode.

Mobile Support

Responsive design with bottom navigation bar, collapsible sidebar, and touch-optimized controls. Safe area support for iOS.

Keyboard Shortcuts

Cmd+K for palette, Cmd+N for new note, Cmd+/ for keyboard reference. Full keyboard navigation without touching the mouse.

Confirmation Modals

Destructive actions (delete, empty trash) require confirmation. Enter key support for quick confirmation.

Settings

Configure theme, line wrapping, API keys, and account settings from the settings modal.