MCP

The live MCP server, how to sign in, its tools, and how to use md2 from your agent.

Status

The MCP server is live. It speaks Streamable HTTP (protocol 2025-06-18) at /mcp/v2 on md2's own origin. Its convert tool returns a signed link to the file (valid for 24 hours) instead of stuffing Base64 into the agent's context, and can return the file inline when you ask.

The md2 for agents page has setup snippets for each client, and For agents describes everything the server offers.

Signing in

  • OAuth 2.1: interactive clients open the sign-in page by themselves (PKCE and dynamic client registration). Scopes: convert:read, convert:write, library:read, agent:use.
  • API keys: non-interactive clients send Authorization: Bearer md2_….

REST from any agent

Any agent with an HTTP tool can also print through the REST API. Example instructions for your agent:

To print a document, POST to /v1/convert with a JSON body containing markdown and format: "pdf", and save the response as a file.

Tools

Tool Purpose
convert Markdown to 13 formats, as a signed link or inline Base64
render_html Sanitised HTML for checking a document
list_themes Available themes, formats and directions
agent_draft Ask Mido, the writing agent, for a Markdown draft
library_search Search prompts, skills and project templates
library_get The full content of a library item
import_to_markdown A public web page as Markdown