Agents

Using mdcraft with agents via MCP

MDcraft exposes a hosted MCP server for agent workflows that need document conversion, exports, artifacts, usage, account status, API key actions, billing links, and profile defaults.

Hosted server#

Use the remote endpoint:

https://mdcraft.ai/mcp

The hosted server uses Streamable HTTP and OAuth. Your MCP client should discover auth from:

https://mdcraft.ai/.well-known/oauth-protected-resource
https://mdcraft.ai/.well-known/oauth-authorization-server

Scopes are requested during consent:

  • mcp:convert
  • mcp:usage
  • mcp:account
  • mcp:keys
  • mcp:billing

Tools#

Conversion tools:

  • convert_document
  • convert_markdown
  • get_conversion_status
  • list_conversion_artifacts
  • get_conversion_artifact
  • get_mdcraft_capabilities

Account and operations tools:

  • get_account_status
  • get_usage
  • get_billing_status
  • list_api_keys
  • get_profile_defaults

Sensitive write tools create a browser confirmation URL first:

  • create, rotate, or revoke an API key
  • update profile defaults
  • create checkout or billing portal links

After browser confirmation, call complete_pending_action.

ChatGPT#

Use the remote MCP endpoint when your ChatGPT workspace supports custom remote MCP connectors:

https://mdcraft.ai/mcp

Complete the OAuth consent in the browser. Billing and API key mutations still require a second MDcraft confirmation page.

Claude Code#

Use remote HTTP MCP configuration when available:

{
  "mcpServers": {
    "mdcraft": {
      "type": "http",
      "url": "https://mdcraft.ai/mcp"
    }
  }
}

If your client only supports local stdio servers, use the CLI fallback.

Cursor#

Add MDcraft as a remote MCP server:

{
  "mcpServers": {
    "mdcraft": {
      "url": "https://mdcraft.ai/mcp"
    }
  }
}

If Cursor requests auth, follow the browser OAuth flow.

Local stdio fallback#

Install the CLI:

npm install -g @mdcraft/cli
mdcraft login

Then configure a local MCP server:

{
  "mcpServers": {
    "mdcraft": {
      "command": "mdcraft",
      "args": ["mcp"]
    }
  }
}

The local adapter uses your CLI credential for conversion and artifact tools. Hosted OAuth is still the primary path.

File input#

Hosted MCP accepts base64 or data URI payloads. It does not read arbitrary local paths from the server. Local file-path workflows belong in the CLI.

Limits and diagnostics#

MCP conversions reuse API project/key limits and the conversion ledger. Tool results expose conversion IDs, artifact refs, warnings, provider diagnostics, and retry context for rate limits.

Security#

  • Hosted MCP cannot read arbitrary server filesystem paths.
  • Tokens are stored hashed at rest.
  • API key secrets are revealed once only after browser confirmation.
  • Billing tools only create Stripe URLs; Stripe and the user still confirm payment changes.
  • Sensitive actions write MCP audit events.