Prompts

Share the onboarding prompt to connect any agent to mdtidy, or drop a quick prompt into a chat that's already wired up.

Back
Onboarding prompt
Paste this into Claude, Cursor, Codex, or any MCP-compatible client. It teaches the agent to clean, convert, save, and share Markdown through mdtidy — and walks you through the one-time MCP setup if it isn't connected yet.
# Use Markdown Tidy

> Paste this into your AI agent (Claude, Cursor, Codex, Gemini, or any
> MCP-compatible client). It teaches the agent to clean, convert, save, and
> share Markdown through mdtidy.com — and walks you through a one-time setup if
> it isn't connected yet.

You are helping me use **Markdown Tidy** (mdtidy). mdtidy turns messy,
AI-generated Markdown into clean, branded, platform-ready documents and exports
it to **HTML, plain text, PDF, DOCX, or PNG**. It can also save documents to my
workspace and give me a public share link.

**The only format mdtidy needs is plain Markdown — the kind you already produce.
There is no new schema or template language to learn.**

## What to do now

1. **Check whether the mdtidy tools are already available** to you (look for MCP
   tools named `tidy_markdown`, `save_document`, `list_projects`, etc.).
   - **If they are**, say so, then ask me what I want to do first — for example:
     *"Want me to tidy a document, export a PDF, or save and share something?"*
   - **If they are not**, walk me through the one-time setup below. Do **not**
     download or run any setup script — just show me the exact configuration and
     let me apply it. Setup is three transparent steps, nothing more.

2. Once the tools are available, do the thing I asked and **report what changed
   and what it cost** (mdtidy returns the cleanup fixes it applied and my
   remaining credit balance).

## One-time setup (only if the tools aren't connected)

**Step 1 — Get an API key.** I create one at https://mdtidy.com/account/api-keys (it
looks like `mt_live_…`). Tell me to do this and wait for the key. Treat it as a
secret — never print it back or commit it.

**Step 2 — Add the mdtidy MCP server to my client.** Show me the block for my
editor. Use an environment variable for the key (`MDTIDY_API_KEY`) — never paste
the raw key into the config file.

- **Claude Code** (run in my terminal):
  ```bash
  claude mcp add mdtidy --env MDTIDY_API_KEY=mt_live_… -- npx -y @mdtidy/mcp
  ```
- **Cursor / Claude Desktop / any stdio client** (`.mcp.json` or the client's MCP config):
  ```json
  {
    "mcpServers": {
      "mdtidy": {
        "command": "npx",
        "args": ["-y", "@mdtidy/mcp"],
        "env": { "MDTIDY_API_KEY": "${MDTIDY_API_KEY}" }
      }
    }
  }
  ```
- **Hosted / remote** (nothing to install — point at our endpoint):
  ```json
  {
    "mcpServers": {
      "mdtidy": {
        "type": "http",
        "url": "https://www.mdtidy.com/mcp",
        "headers": { "X-API-KEY": "${MDTIDY_API_KEY}" }
      }
    }
  }
  ```
  mdtidy authenticates with `X-API-KEY`, not `Authorization: Bearer`.

**Step 3 — Reload the MCP server** in my client and confirm the `tidy_markdown`
tool is listed. Then continue with what I asked.

## What you can do for me (the tools)

| Group | Tools | Notes |
| --- | --- | --- |
| **Convert** | `tidy_markdown` | Clean + repair my Markdown and render to `html` / `text` / `pdf` / `docx` / `png`. Pick a design system: `minimal-clean` (default), `executive-report`, `developer-docs`. **Costs 1 credit per render** (refunded if it fails). |
| **Read** | `check_usage`, `list_projects`, `get_project`, `get_file` | Check my balance and browse what I've saved. Free. |
| **Write** | `save_document`, `update_file`, `create_project`, `save_file` | **`save_document` is the fast path** — saves my Markdown in one step (finds/creates a project automatically; re-saving the same title updates that doc instead of duplicating it). 1 credit to create, free to update. |
| **Share** | `get_project_share`, `share_project_public` | Turn on a public link → returns `https://mdtidy.com/p/{slug}` I can send to anyone. |

Before a large batch, call `check_usage` so we don't run out of credits mid-task.

## Example prompts I might give you

- *"Tidy this up and give me a branded PDF."*
- *"Clean this Markdown and save it to a project called 'Release notes'."*
- *"Convert this to DOCX with the executive-report style."*
- *"Make this readable, then share it publicly and give me the link."*
- *"How many mdtidy credits do I have left?"*

## Learn more (fetch on demand)

- Agent guide & MCP setup: https://mdtidy.com/api-docs/agentic
- Machine index of docs: https://mdtidy.com/llms.txt (append `.md` to any page URL for clean Markdown)
- API contract: https://mdtidy.com/openapi.json
Quick prompts
For an agent that's already connected (via MCP or the SKILL.md). Each one is independent — drop it into the chat.
  • Clean this Markdown with mdtidy and return only the final Markdown.

  • Use mdtidy to normalize this document before summarizing it.

  • Before saving this note, run it through mdtidy and make sure the Markdown is valid.

  • When I paste messy Markdown, use mdtidy first, then help me edit it.