download

Folder Documentation

Persistent file storage for AI agents. Use the REST API, CLI, or connect via MCP to give any agent the ability to create folders, upload files, and maintain state across sessions.

Compatible with: Claude Code, Cursor, Codex CLI, OpenHands, Cline, Aider, Continue, Zed, Windsurf, and any MCP-compatible agent.


Quick Start

The primary path is API, MCP, or terminal. Get a Folder API key from the dashboard, then connect your agent or shell directly.

Terminal + API
# 1. Export your key once
export FOLDER_API_KEY=fmd_live_your_api_key

# 2. List your folders
curl https://folder.md/api/v1/folders \
  -H "Authorization: Bearer $FOLDER_API_KEY"

# 3. Start the MCP server for Claude Code, Codex, Cursor, or any MCP-compatible agent
FOLDER_API_KEY=$FOLDER_API_KEY npx @foldermd/mcp

The Mac app is optional. It is a bridge for local sync and human visibility, not the primary way to use Folder.


Agent Quick Starts

If you already have an API key, use one of these exact setups. These are the primary product paths.

Claude Code

Add Folder as an MCP server so Claude Code can read and write files directly.

~/.claude/mcp_settings.json
{
  "mcpServers": {
    "folder": {
      "command": "npx",
      "args": ["-y", "@foldermd/mcp"],
      "env": {
        "FOLDER_API_KEY": "fmd_live_your_api_key"
      }
    }
  }
}

Codex

Export the key before launching Codex so any Folder-aware CLI or MCP flow can use it.

Terminal
export FOLDER_API_KEY=fmd_live_your_api_key
codex

Cursor

Drop the Folder MCP config into Cursor and restart the app.

~/.cursor/mcp.json
{
  "mcpServers": {
    "folder": {
      "command": "npx",
      "args": ["-y", "@foldermd/mcp"],
      "env": {
        "FOLDER_API_KEY": "fmd_live_your_api_key"
      }
    }
  }
}

Terminal / Scripts

Use Folder directly from curl, shell scripts, cron jobs, or your own local tooling.

Terminal
export FOLDER_API_KEY=fmd_live_your_api_key

curl https://folder.md/api/v1/folders \
  -H "Authorization: Bearer $FOLDER_API_KEY"

Prefer agent-installed setup?

Copy this prompt into Claude Code, Codex, or Cursor and let the agent wire the local MCP config for you.

Agent setup prompt
Set up Folder MCP for me on this machine.

Use the standard npx @foldermd/mcp configuration with my Folder API key:
fmd_live_your_api_key

Detect whether I am using Claude Code, Cursor, Codex, or another MCP-compatible agent.
Write the correct local config file, avoid overwriting unrelated MCP servers, and verify the final config.

Test Your Setup

Use this minimal smoke test after you create a key or wire up MCP. It verifies auth, folder access, and file write/read.

Terminal smoke test
# 1. Set your key
export FOLDER_API_KEY=fmd_live_your_api_key

# 2. Pick a Folder id from the dashboard or API
export FOLDER_ID=your_folder_id

# 3. Upload a tiny test file
echo "folder smoke test $(date -u +%Y-%m-%dT%H:%M:%SZ)" > /tmp/folder-smoke.txt

curl -X POST https://folder.md/api/v1/folders/$FOLDER_ID/files \
  -H "Authorization: Bearer $FOLDER_API_KEY" \
  -F "file=@/tmp/folder-smoke.txt" \
  -F "path=smoke/folder-smoke.txt"

# 4. Confirm it appears
curl https://folder.md/api/v1/folders/$FOLDER_ID/files \
  -H "Authorization: Bearer $FOLDER_API_KEY"

Expected result: the upload returns success, and the follow-up file list includes smoke/folder-smoke.txt. If you are testing MCP, restart the agent after adding the config and ask it to list folders or write a small file.


Installation

CLI (Recommended)

npm install -g @foldermd/cli

TypeScript SDK

npm install @foldermd/sdk

Python SDK

pip install foldermd

Folder for Mac

Folder for Mac is the native macOS companion for folder.md. It sits on top of the local folderd daemon so you can validate your API key, choose a Folder workspace from your account, save config, bootstrap sync, and keep an eye on status without living in a terminal window.

Developer preview: the macOS app is currently distributed as an unsigned preview .dmg with a drag-to-Applications flow. It is not signed or notarized yet, so Gatekeeper may block it until the production signing pipeline is added.

What works today

Menu bar shell, setup flow, direct `foldermd://` handoff from the dashboard, Mac setup-code import, remote Folder picker, config save, bootstrap run, bootstrap log panel, a real local `~/Folder` sync root, Finder favorite actions, plus the current folderd watch/debounce/retry path underneath it.

How to try it

Use the dedicated download page for the DMG, the daemon install command, and the exact expectations around what is and is not production-ready yet.


CLI Setup

Authenticate with your API key from the dashboard. Optionally set an OpenRouter key for AI features.

Terminal
# Authenticate (prompts for your API key)
folder login

# Or pass the key directly
folder login --key fmd_live_your_api_key_here

# Check auth status
folder whoami

# Sign out
folder logout

Folder Commands

Terminal
# List all folders (shortcut: folder ls)
folder folders list

# Create a new folder
folder folders create my-project

# View folder tree
folder folders tree <folder-id>

# Delete a folder
folder folders delete <folder-id>

# Skip confirmation prompt
folder folders delete <folder-id> --force

File Commands

Terminal
# List files in a folder
folder files list <folder-id>

# Upload a file
folder files upload <folder-id> ./local-file.md

# Upload to a specific remote path
folder files upload <folder-id> ./doc.md --path docs/readme.md

# Upload a directory recursively
folder files upload <folder-id> ./src --recursive

# Download a file
folder files download <folder-id> <file-id> -o ./local.md

# Print file contents to stdout
folder files cat <folder-id> <file-id>

# Delete a file
folder files delete <folder-id> <file-id>

Sync & Watch

Sync a local directory to a folder. Use --watch to continuously mirror changes as they happen — perfect for backing up a project while you work.

Terminal
# One-time sync of ./my-project to a folder
folder sync <folder-id> ./my-project

# Watch mode: sync continuously as files change
folder sync <folder-id> ./my-project --watch

# Also delete remote files that no longer exist locally
folder sync <folder-id> ./my-project --watch --delete

# Preview what would be synced (no changes made)
folder sync <folder-id> ./my-project --dry-run

# Ignore additional patterns
folder sync <folder-id> ./my-project --ignore "*.log" "dist/**"

Create a .foldermdignore file in your directory to set persistent ignore patterns. Falls back to .gitignore automatically. Defaults always ignore node_modules, .git, and .env*.


AI Commands

Hosted AI routes are authenticated with your FOLDER_API_KEY. folder.md uses its server-side model provider key internally right now; users do not need to bring a separate LLM key for the hosted API.

Terminal
# Analyze a file (actions: describe, summarize, extract, suggest-tags, detect-language)
folder ai analyze <folder-id> <file-id> --action describe
folder ai analyze <folder-id> <file-id> --action summarize
folder ai analyze <folder-id> <file-id> --action suggest-tags

# Get folder organization suggestions (actions: organize, rename, cleanup, structure)
folder ai suggest <folder-id> --action organize
folder ai suggest <folder-id> --action structure

If we later support bring-your-own model-provider credentials, that should be documented as an optional advanced mode, not the default hosted path.


MCP Server

The Folder MCP server enables any MCP-compatible AI agent to manage your files. Works with Claude Code, Cursor, Codex CLI, OpenHands, Cline, Aider, Continue, Zed, and more.

Terminal
# Run directly (no install needed)
FOLDER_API_KEY=fmd_live_... npx @foldermd/mcp

# Or install globally
npm install -g @foldermd/mcp
FOLDER_API_KEY=fmd_live_... foldermd-mcp

Agent Setup

Configure Folder with any MCP-compatible agent. Here are examples for popular tools:

Claude Code

~/.claude/mcp_settings.json (or via: claude mcp add)
{
  "mcpServers": {
    "folder": {
      "command": "npx",
      "args": ["-y", "@foldermd/mcp"],
      "env": {
        "FOLDER_API_KEY": "fmd_live_your_api_key"
      }
    }
  }
}

Claude Desktop

~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "folder": {
      "command": "npx",
      "args": ["-y", "@foldermd/mcp"],
      "env": {
        "FOLDER_API_KEY": "fmd_live_your_api_key"
      }
    }
  }
}

Cursor

~/.cursor/mcp.json
{
  "mcpServers": {
    "folder": {
      "command": "npx",
      "args": ["-y", "@foldermd/mcp"],
      "env": { "FOLDER_API_KEY": "fmd_live_your_api_key" }
    }
  }
}

Cline / Continue / VS Code

.vscode/mcp.json
{
  "servers": {
    "folder": {
      "command": "npx",
      "args": ["-y", "@foldermd/mcp"],
      "env": { "FOLDER_API_KEY": "fmd_live_your_api_key" }
    }
  }
}

Supported Agents: Claude Code, Cursor, Codex CLI, OpenHands, Cline, Aider, Continue, Zed, Windsurf, and any tool supporting the Model Context Protocol (MCP).


Available Tools

ToolDescription
folder_listList all folders
folder_createCreate a new folder
folder_getGet folder details
folder_treeGet full folder tree
folder_deleteDelete a folder and all contents
file_listList files in a folder
file_writeWrite text content to a file (create or overwrite)
file_readRead a file's text content
file_deleteDelete a file

Authentication

All API requests require a Bearer token in the Authorization header:

HTTP Header
Authorization: Bearer YOUR_API_KEY

Get your API key from the dashboard or create one via the API:

Create API Key
POST /api/v1/folders/{id}/keys
{
  "name": "my-agent-key",
  "permissions": ["read", "write"]
}

Folders API

Endpoints
# List all folders
GET /api/v1/folders

# Create a folder
POST /api/v1/folders
{ "name": "my-folder" }

# Get folder details
GET /api/v1/folders/{id}

# Delete a folder
DELETE /api/v1/folders/{id}

# Get folder tree
GET /api/v1/folders/{id}/tree

# Create subfolder
POST /api/v1/folders/{id}/subfolders
{ "path": "docs/guides" }

Files API

Endpoints
# List files
GET /api/v1/folders/{id}/files

# Upload file (multipart)
POST /api/v1/folders/{id}/files
Content-Type: multipart/form-data
file: <binary>
path: optional/path/file.md

# Get file metadata
GET /api/v1/folders/{id}/files/{fileId}

# Download file
GET /api/v1/folders/{id}/files/{fileId}?download=true

# Delete file
DELETE /api/v1/folders/{id}/files/{fileId}

AI Endpoints

Endpoints
# Analyze a file
POST /api/v1/ai/analyze
{
  "folderId": "folder-id",
  "fileId": "file-id",
  "action": "describe" | "summarize" | "extract" | "suggest-tags"
}

# Get folder suggestions
POST /api/v1/ai/suggest
{
  "folderId": "folder-id",
  "action": "organize" | "rename" | "cleanup" | "structure"
}

TypeScript SDK

npm install @foldermd/sdk
import { FolderMD } from '@foldermd/sdk'

const client = new FolderMD({
  apiKey: process.env.FOLDER_API_KEY!,
})

// Create a folder
const { folder } = await client.folders.create({ name: 'my-project' })

// Upload text content
await client.files.upload(folder.id, {
  path: 'docs/readme.md',
  content: '# Hello World',
})

// Upload a File/Blob (e.g. in Node.js or browser)
await client.files.upload(folder.id, {
  path: 'logo.png',
  file: new Blob([buffer], { type: 'image/png' }),
})

// List files
const { files } = await client.files.list(folder.id)

// Download as text
const text = await client.files.downloadText(folder.id, files[0].id)

// Watch for changes via webhook
await client.watch(folder.id, 'https://my-agent.example.com/webhook')

Python SDK

pip install foldermd
from foldermd import FolderClient

client = FolderClient(api_key="your-api-key")

# Create a folder
folder = client.folders.create(name="my-project")

# Upload a file
client.files.upload(
    folder_id=folder.id,
    path="docs/readme.md",
    content="# Hello World"
)

# List files
files = client.files.list(folder.id)

# AI analysis
analysis = client.ai.analyze(
    folder_id=folder.id,
    file_id=file_id,
    action="summarize"
)

Supported File Types

Folder supports all file types up to 500MB per file:

Documents

PDF, DOC, DOCX, TXT, MD, RTF, XLS, XLSX, CSV, JSON, XML, YAML

Images

JPG, PNG, GIF, WEBP, SVG, ICO, BMP, TIFF, HEIC, AVIF

Code

JS, TS, PY, RB, GO, RS, Java, C, CPP, HTML, CSS, SQL

Media

MP3, WAV, OGG, MP4, MOV, AVI, MKV, WEBM


Rate Limits

PlanRequests/minStorage
Free601 GB
Pro600100 GB
EnterpriseUnlimitedUnlimited

FAQ

What file types are supported?

All file types are supported. We use Vercel Blob storage which accepts any binary file up to 500MB.

How do AI features work?

AI features use OpenRouter to access Claude, GPT, and other models. You need to provide your own OpenRouter API key to enable AI analysis, suggestions, and chat.

Can I self-host?

Yes. The entire codebase is open source. Deploy to Vercel with your own Blob storage and database.

How does MCP work with Claude?

The MCP server exposes Folder as a set of tools that Claude can call. Once configured, Claude can create folders, upload files, and analyze content on your behalf.