DedalusDedalus Labs
Marketplace
Pricing
Blog
Docs
DedalusDedalus Labs

The drop-in MCP gateway that connects any LLM to any MCP server, local or fully-managed on our marketplace. We take care of hosting, scaling, and model hand-offs, so you can ship production-grade agents without touching Docker or YAML.

Product

  • Pricing
  • API
  • Documentation

Company

  • About
  • Blog
  • Use Cases
  • Careers
  • Contact

Legal

  • PrivacyPrivacy Policy
  • TermsTerms of Service

© 2026 Dedalus Labs. All rights reserved.

Command Palette

Search for a command to run...

Use case

How to build an MCP server: One-Click PDF Generator

In this tutorial, you will build and publish an MCP server that converts Markdown to PDF, then call it from a Dedalus agent to return a downloadable file link.

Written by
PA
Palash AwasthiHead of Growth
TK
Tsion KergoFounding Engineer
Jan 7, 20265 min
Palash Awasthi, Tsion Kergo·Jan 7, 2026·5 min read

How to build an MCP server: One-Click PDF Generator

In this tutorial, you will build and publish a Model Context Protocol (MCP) server that converts Markdown to PDF, then call it from a Dedalus agent to return a downloadable file link.

LLMs are great at drafting text, but many cannot generate a real PDF file as a downloadable artifact on their own. An MCP server solves this by exposing PDF generation as a tool your agent can call.

With the Dedalus SDK, your agent can:

  • Draft a Markdown document.
  • Call an MCP tool to render a PDF from Markdown.
  • Return a download URL that people can open, print, or share.

GitHub repo: dedalus-labs/pdf-generator-mcp

How we built the Markdown-to-PDF MCP server

The server is implemented with the Dedalus MCP framework and exposed over streamable HTTP in stateless mode. It is published to the marketplace and referenced by a marketplace slug, so an agent can use it without any local MCP infrastructure.

On the server side, tools are added using decorators. The server reads Python type hints to understand each tool's contract, so you never have to write JSON schemas by hand.

MCP tool schema (PDF and DOCX rendering):

  • render_pdf(title, markdown, style) -> {pdf_id, filename, size_bytes, download_url}
  • render_docx(title, markdown) -> {docx_id, filename, size_bytes, download_url}

On the agent side, Dedalus is configured with mcp_servers=[marketplace_slug]. During a streaming response, the agent automatically discovers the tool contract and executes tool calls when it needs to generate a binary artifact.

End-to-end flow (LLM + MCP tool calling)

The agent works in two phases:

  1. Draft Markdown with headings, tables, and bullet points.
  2. Call render_pdf with a style selector, such as default, modern, or minimal. If needed, it can also call render_docx using the same Markdown input.

Because PDF and DOCX generation are encapsulated behind MCP tools, the agent code stays small. If you switch to a different PDF generator MCP server later, you only need to change the configured server slug.

Demo prompt

Here is a sample prompt you can use with this setup:

  • "Create a one-page proposal for an 'LLM FAQ content sprint'. Include scope, timeline, price, and assumptions. Use modern style. Also provide a DOCX."

From there, the agent drafts Markdown, calls render_pdf (and optionally render_docx), and returns one or two download links, along with a visible MCP tool trace in the output.

Try building your own PDF generator tool

This is one example of how MCP can extend your agents with real file generation. By moving binary artifact creation behind a typed MCP tool, you keep your agent code clean while still delivering output that people can save and share.

To build something similar, start with the Dedalus SDK, wire up an MCP server that exposes render_pdf and render_docx, then point your agent to the marketplace slug.

If you are not sure where to start, check out our docs for more in-depth tutorials and join our developer community on Discord.

Topics
MCPMCP ServersDedalus SDKDedalus MCP FrameworkMarketplaceArtifactsPDFDOCX
Share

© 2026 Dedalus Labs. All rights reserved.