Publish from your AI agent
Claude Code, Cursor, Codex and Claude Desktop can publish Markdown to mdmd.uk and hand you a shareable link — no copy-paste. Scripts and CI jobs can do the same with a single curl command.
What your agent can do
publish_page— publish Markdown as a new page and get its link;update_page— replace the text of one of your pages (the link stays the same);get_page— read any page, long ones in chunks;list_pages— list your pages, newest first, each with the start of its text, and search by words near the start;delete_page— delete one of your pages (marked as destructive, so agents ask first).
Connect in one step
Replace YOUR_API_KEY with the key from My pages — there the commands come with your key already filled in.
Run once in a terminal — mdmd becomes available in all your projects.
claude mcp add --transport http --scope user mdmd https://mdmd.uk/mcp --header "Authorization: Bearer YOUR_API_KEY"
Add to ~/.cursor/mcp.json (or .cursor/mcp.json inside a project).
{
"mcpServers": {
"mdmd": {
"url": "https://mdmd.uk/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
Put the export into your shell profile so Codex always sees the key.
export MDMD_API_KEY=YOUR_API_KEY
codex mcp add mdmd --url https://mdmd.uk/mcp --bearer-token-env-var MDMD_API_KEY
Add to claude_desktop_config.json, then restart the app. Needs Node.js (npx).
{
"mcpServers": {
"mdmd": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mdmd.uk/mcp",
"--transport",
"http-only",
"--header",
"Authorization:${MDMD_AUTH}"
],
"env": {
"MDMD_AUTH": "Bearer YOUR_API_KEY"
}
}
}
}
Publish a file from any script or CI job; the JSON answer contains the page URL.
curl -H "Authorization: Bearer YOUR_API_KEY" --data-binary @report.md https://mdmd.uk/api/v1/pages
REST API
Every request needs Authorization: Bearer YOUR_API_KEY. Send Markdown as the raw request body or as JSON {"markdown": "…"}.
| Request | What it does |
|---|---|
POST /api/v1/pages | Publish a new page → {slug, url, title} |
GET /api/v1/pages?query=&limit=&offset= | List your pages, newest first |
GET /api/v1/pages/{slug} | Read a page: Markdown and metadata |
PUT /api/v1/pages/{slug} | Replace the text of your page |
DELETE /api/v1/pages/{slug} | Delete your page |
Good to know
- Pages are public to anyone with the link and hidden from search engines. Don't publish secrets.
- Up to 1 MB of Markdown per page: tables, code with highlighting, task lists, footnotes.
- The key opens your pages, never your account. Regenerate it on My pages at any time — the old one stops working at once.
- Limits per key: 60 new pages, 600 updates, 600 reads and 60 deletions per hour.