Developer Docs

API & Developer Tools

Create, manage, and publish documents programmatically. Integrate mdfy.cc with any AI tool.

Quick Start

01Install MCP Server
bash
npx mdfy-mcp
02Configure Claude Code

Create .mcp.json in your project:

json
{
  "mcpServers": {
    "mdfy": {
      "command": "npx",
      "args": ["mdfy-mcp"],
      "env": {
        "MDFY_EMAIL": "your@email.com"
      }
    }
  }
}
03Use it
"Create a technical blog post about WebAssembly on mdfy.cc"

→ Document created: https://mdfy.cc/d/abc123

MCP Tools

The MCP server exposes 6 tools that any MCP-compatible AI client can call directly.

mdfy_create

Create a new document, get a shareable URL

mdfy_read

Fetch document content by ID

mdfy_update

Update existing document content

mdfy_list

List all your documents

mdfy_publish

Toggle between Private and Shared

mdfy_delete

Delete a document

REST API Reference

All endpoints accept and return JSON. Base URL: https://mdfy.cc

POST/api/docs

Create document

Request Body

json
{
  "content": "# Hello World\nYour markdown here.",
  "title": "My Document"
}

Response

json
{
  "id": "abc123",
  "url": "https://mdfy.cc/d/abc123",
  "editToken": "tok_..."
}
GET/api/docs/{id}

Read document

Response

json
{
  "id": "abc123",
  "title": "My Document",
  "content": "# Hello World\nYour markdown here.",
  "created_at": "2026-04-12T00:00:00Z",
  "updated_at": "2026-04-12T00:00:00Z"
}
PATCH/api/docs/{id}

Update document

Request Body

json
{
  "content": "# Updated content",
  "editToken": "tok_..."
}

Response

json
{
  "id": "abc123",
  "url": "https://mdfy.cc/d/abc123",
  "updated_at": "2026-04-12T01:00:00Z"
}
DELETE/api/docs/{id}

Delete document

Request Body

json
{
  "editToken": "tok_..."
}

Response

json
{
  "success": true
}
GET/api/user/documents

List user's documents

Response

json
{
  "documents": [
    {
      "id": "abc123",
      "title": "My Document",
      "created_at": "2026-04-12T00:00:00Z"
    }
  ]
}

Authentication

No auth needed

Creating and reading documents requires no authentication. Anyone can create a document and get a shareable URL. Reading public documents is always open.

Email-based auth

Listing, publishing, and deleting documents require email identification. Set via MDFY_EMAIL env var or x-user-email header.

Edit tokens

Updating documents requires the editToken returned at creation time. The MCP server manages these automatically.

npm Package

mdfy-mcp

MCP server for mdfy.cc. Works with Claude Code, Claude Desktop, and any MCP-compatible client. Zero config — just npx mdfy-mcp and start publishing.

View on npmGitHub

Start building.

Create your first document programmatically in under 30 seconds.

bash
npx mdfy-mcp