MCP Server AI meets document authoring

Polyester ships an MCP server so AI assistants can create, validate, and compile .poly documents.

What It Is

The Polyester MCP server gives AI assistants direct access to the component system. Instead of guessing at syntax, an AI can look up components, validate its output, and compile documents—all through structured tool calls.

4 Tools
2 Prompts
3 Resources

Tools

Tool
ParametersReturns
list_componentscategory (optional)Component names and descriptions
get_component_helpname (required)Full docs: args, flags, examples
validate_documentsource (required)Parse errors and warnings with line numbers
compile_documentsource (required)Standalone HTML string

list_components

Browse all 27 components, optionally filtered by category: layout, content, style, or interactive.

get_component_help

Get the full spec for a component—arguments, flags with descriptions, and usage examples. Pass the name with or without the leading /.

validate_document

Parse a .poly source string and report any errors or unknown-command warnings with line numbers. Returns "Document is valid" when clean.

compile_document

Compile a .poly source string to a complete standalone HTML document with embedded CSS and syntax highlighting.

Prompts

Pre-built prompt templates that guide the AI toward good Polyester output.

create_document

Generates a starter document for a given type. The AI receives type-specific hints:

  • report — page setup, columns, tables, charts
  • presentation — pageless mode, hero slides, pagebreaks
  • resume — compact layout, inline icons, tags, progress bars
  • article — two-column prose, pull quotes, images
  • documentation — code blocks, fold sections, tables

convert_to_polyester

Converts HTML, Markdown, or LaTeX source into Polyester syntax. The AI receives mapping guidelines for translating constructs from the source format.

Resources

The MCP server exposes read-only resources that AI clients can fetch for context.

URI
TypeContent
polyester://syntax-guidetext/markdownFull language reference
polyester://componentsapplication/jsonComplete component registry
polyester://examples/{name}text/plainExample files from the examples directory

Setup

Add to your project's .mcp.json (or your editor's MCP config):

.mcp.json
{
  "mcpServers": {
    "polyester": {
      "command": "node",
      "args": ["dist/mcp/server.js"]
    }
  }
}

The server uses stdio transport. Point the args path to your Polyester installation's dist/mcp/server.js.

Compatible With

The MCP server works with any client that supports the Model Context Protocol:

  • Claude Code — Full support via .mcp.json
  • Cursor — MCP tools in AI chat
  • Windsurf — MCP integration
  • VS Code — With MCP extension
  • Zed — MCP support
  • Any MCP client — stdio transport
Polyester MCP Server