Guides

Model Context Protocol

MCP exposes the same site operations you use in the dashboard and REST API to AI agents over Streamable HTTP at /api/mcp. Agents can discover block shapes via schema:// resources and receive precise field-path errors on bad payloads.

Authentication

Pass a Bearer token on every request. Workspace API keys prefixed with sh_live_ work the same as REST v1 (create keys on Launch+; Free workspaces cannot issue keys). Other bearer tokens use the OAuth 2.1 flow advertised from /.well-known/oauth-protected-resource; hosted login completes the authorize step. OAuth issuance needs MCPAUTH_SECRET and an RSA private key in the server environment.

Remote MCP hosts (Claude, ChatGPT, Codex, Grok, and similar) discover OAuth from /.well-known/oauth-protected-resource/api/mcp, then use Client ID Metadata Documents (preferred) or dynamic client registration as a fallback. Hosted sign-in on SlateHut completes authorization — no manual redirect-uri setup or API key paste in those apps.

Endpoint

Replace the origin with your deployment host. Example for this environment:

https://slatehut.com/api/mcp

Install

Cursor

One click to add the server, Cursor opens and pre-fills the config. You'll be prompted to enter your API key as the Authorization header value.

Add to Cursor
Manual JSON config
{
  "mcpServers": {
    "slatehut": {
      "url": "https://slatehut.com/api/mcp"
    }
  }
}

Claude Desktop

Add the snippet below to your claude_desktop_config.json. Uses mcp-remote to bridge the HTTP transport. Replace --header with your API key.

{
  "mcpServers": {
    "slatehut": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://slatehut.com/api/mcp"
      ]
    }
  }
}

MCP Registry

The MCP Registry is the official metadata catalog for publicly discoverable MCP servers (currently in preview; breaking changes are possible). It lists how to reach a server (npm, PyPI, Docker Hub, or a public remote URL) and trust signals via namespace authentication. Package registries host code; the MCP Registry hosts server.json records. Private-only endpoints are out of scope, see the registry overview for ecosystem notes (aggregators, OpenAPI, moderation).

SlateHut is published as remote Streamable HTTP metadata under io.github.sandeep1995/slatehut. Search the registry API: registry.modelcontextprotocol.io/v0.1/servers. Report registry bugs on GitHub.

Recipe: build a site end-to-end

  1. Discover: read schema://blocks for the block catalog and schema://theme for theme enums.
  2. Create: create_site_from_template when you know the starter shape, or create_site_from_document with a full pages[] you built from schemas. Pass a subdomain hint to keep URLs memorable.
  3. Refine theme: update_site_theme with hex colors and enum values from the theme schema.
  4. Swap blocks: prefer update_page with blocks:[...] for atomic bulk replacement over looping add_block/delete_block.
  5. Add media: unsplash_search unsplash_import returns a permanent blob URL plus the photographer attribution you must display.
  6. Iterate: use update_page, update_block, and update_site_theme (no extra AI credits).
  7. Ship: get_site now returns a public url, share it.

Recipe: Free plan / no AI credits

Free workspaces include one AI prompt and a small monthly credit pool. When AI tools return quota errors, the dashboard and editor remain available for manual editing. Use this deterministic MCP flow instead:

  1. Pick a template: list_templates or read example://sites/{templateId} (e.g. fineDining).
  2. Create: create_site_from_template with templateId and optional title, or create_site_from_document when you already have valid pages[].
  3. Inspect: get_site to read current pages, blocks, and theme.
  4. Customize: update_site, update_page, update_block, and update_site_theme — no AI credits required.

Tools

Sites

create_site_from_template
Create a site from a built-in template (aiSaas, fineDining, portfolio, etc.). No AI credits.
Preferred create path. Call list_templates first, then customize with update_site / block tools.
create_site_from_document
Create a site from a full pages[] document (and optional theme). No AI credits — BYO-LLM / codegen.
Fetch schema://blocks/{type} before building blocks. Uses create-site quota only.
list_sites
List sites in the active workspace. Now returns public `url` for each.
get_site
Fetch one site. Optional `include`: pages, theme, chrome, meta, artDirection, pageRecipe, integrations, or all.
update_site
Patch title, SEO, theme, pages[], artDirection, pageRecipe, GA/Meta/noIndex/badge flags. Block validation includes field paths on error.
sync_site_chrome
Copy navbar and footer from a source page (default home) to every page and CMS templates.
regenerate_preview_token
Rotate draft preview token; returns previewToken and preview URL.
update_site_theme
Patch theme only (merged with existing).
delete_site
Permanently delete a site and detach its domains. Requires `confirm: true`. Frees the create-site quota.
Only path to free a seat on single-site plans.
check_subdomain
Check if a subdomain is available before creating a site.

Pages

add_page
Add a non-home page. Optional seo & dynamic (CMS) payload.
update_page
Patch title/seo/dynamic or rename via `newSlug`. Sending `blocks` replaces the entire block list atomically.
Use this for bulk block swaps instead of looping delete_block.
delete_page
Remove a page. Home page cannot be deleted.

Blocks

list_page_blocks
List blocks on a page. `scope: index | template` for dynamic CMS templates.
get_block
Fetch a single block by id.
add_block
Insert a block at an optional position. Validates `props` against schema://blocks/{type}.
update_block
`props` shallow-merges; optional `animation`, `frame`, `anchorId`, `fullWidth`, `colorOverrides`.
delete_block
Remove a block. Page must always keep ≥1 block.
reorder_blocks
Reorder by full array of block ids.

Media

upload_image
Upload from a base64 `dataUrl` or fetch a remote `url`; returns public blob URL.
unsplash_search
Search Unsplash. Supports `orientation` (landscape/portrait/squarish) and `color` filters.
unsplash_import
Import a photo to permanent blob storage. Returns `url`, `alt`, and Unsplash `attribution` (always credit the photographer).

CMS

list_collections / get_collection
Browse CMS collections.
list_cms_presets
Built-in CMS presets (blog, directory) before create_collection.
create_collection / update_collection / delete_collection
Collection CRUD.
list_items / get_item
Browse CMS items.
create_item / update_item / delete_item
Item CRUD.
attach_dynamic_page
Wire a CMS collection to a dynamic page template.

Domains & submissions

add_domain / list_domains / remove_domain
Custom domain management.
verify_domain / check_domain_verification
DNS verification.
list_form_submissions / list_newsletter_submissions
Read inbox data from forms and newsletter signups.
get_submission_counts
Per block id submission counts (editor inbox badges).
delete_submission
Permanently delete one submission by id.

Templates

list_templates
List built-in site templates (includes previewImageUrl WebP paths).

Resources

Resources are read-only; fetch them with your MCP client’s resource API (e.g. FetchMcpResource in Cursor). Use them before authoring to avoid guess-and-retry on block shapes.

schema://blocks
Index of every block type (short description + props schema name + per-type resource URI).
schema://blocks/{type}
Full JSON schema for one block: shell + props + transitively-referenced components (enums, required fields, nested types).
schema://theme
JSON schema for site.theme (fontPreset, borderRadius, sectionSpacing enums + hex palette) and the merged defaults.
schema://block-libraries
Editor library groupings (shadcn, aceternity, …) mapped to native block types.
example://blocks/{type}
A concrete valid example block of that type, pulled from a built-in template.
example://sites/{templateId}
Full `pages[]` for a built-in template (aiSaas, startup, portfolio, …), useful as a reference shape.
site://{subdomain}
Full current site JSON for a subdomain (workspace-scoped).
site://{subdomain}/pages/{pageSlug}
One page (use `_` for home).

Prompts

MCP prompts are pre-built instructions you can invoke with your client's prompt API (e.g. GetMcpPrompt in Cursor). They accept a subdomain argument and expand into a detailed site-creation or editing brief, saving you from writing the same instructions each time. Requires the mcp:prompts OAuth scope.

create-startup-landing-page
SaaS/startup landing with hero, features, and social proof sections.
create-portfolio
Personal or professional portfolio with work showcase.
create-restaurant-site
Restaurant site with menu, hours, and reservation blocks.
create-blog
Blog with article structure and newsletter signup.
create-agency-site
Agency/studio site with services and portfolio.
create-event-page
Event or conference landing with FAQ and registration CTA.
create-ecommerce-landing
Product landing page with gallery and pricing.
create-coming-soon
Minimal coming-soon page with email capture.
edit-polish-copy
Tighten headlines and body copy for conversion.
edit-theme-mood
Adjust theme colors and fonts to match a mood.
edit-add-pricing
Add or refine pricing sections on an existing site.

Block catalog (48 types)

Every block has the shape { id, type, anchorId?, fullWidth?, colorOverrides?, animation?, props }. Fetch schema://blocks/{type} for the exact props schema before adding or updating.

Structure

  • dividerBreathing room, line, or spacer between sections.
  • bannerThin announcement or notification strip with optional link and icon.
  • sectionPaste or write HTML and optional scoped CSS for layouts that are not covered by standard blocks. Optional AI assist to generate markup.

Hero

  • heroHeadline, CTAs, imagery, background fill (gradient, solid, photo), patterns, splits, stacked/full-bleed/centered with optional below-fold image, trust row, highlights.
  • animatedHeroHero with animated gradient, optional word marquee, and floating shapes, extends the standard hero.
  • spotlightHeroDark, dramatic hero with an animated radial spotlight that follows the cursor, large editorial headline (optional emphasis word for a gradient slice), supporting subhead, primary + optional secondary CTA, up to 3 small badges, and an optional trust caption. Reach for this when the brief is premium, sophisticated, mysterious, or B2B-technical and the page should open with weight rather than warmth.
  • auroraHeroHero band with an animated aurora gradient backdrop (slow color drift) behind centered editorial copy, primary + optional secondary CTA, and an optional trust caption. `intensity:"subtle"` keeps the gradient pastel and refined; `intensity:"bold"` saturates it for a more vivid, cinematic feel. Good when the brief is modern, AI-forward, or wants atmosphere without a hero photo.

Content

  • featuresSelling points: icon grid or alternating image rows (layout + per-item imageUrl/imageAlt), optional subheading.
  • textSimple heading plus paragraph-great for policy or bios.
  • richLong-form content with headings, lists, and formatting.
  • imageTextPhoto or graphic beside a headline and body copy.
  • listManually edited cards or rows (team, services, resources).
  • stepsNumbered or icon steps for your process.
  • timelineMilestones, roadmap, or history.
  • comparisonSide-by-side comparison (not full pricing tables).
  • bentoFeaturesAsymmetric feature cells in a bento-style grid.
  • splitTwo columns for compare-and-contrast stories.
  • calloutHighlighted callout box for tips, warnings, or important notes.
  • featureShowcaseSticky scroll feature sections with alternating media and bullet lists.
  • comparisonTableFull pricing-style comparison table with CTAs per column.
  • bento3dFeatures4-6 capability cards in an asymmetric grid where each card has a soft 3D tilt on hover. Items support `span:"wide"|"tall"|"normal"`, an optional image or Lucide icon, and an `accent` tone (primary/muted/inverse). Use when the brief is a modern software product with several differentiated capabilities to showcase tactilely; avoid for service businesses where bento reads as gimmicky.
  • processBeamHow-it-works section with 3-6 numbered steps connected by an animated SVG beam that fills as the section scrolls into view. Each step has a title, description, and optional Lucide icon. Use when the brief is service-led or B2B with a multi-step engagement worth showing; replaces the basic `steps` block when the design direction is more cinematic.
  • featuresAccordionInteractive side-by-side showcase of key features, where selecting an accordion tab on the left smoothly expands details in-place and cross-fades full visual mockups on the right.

Social proof

  • statsKey metrics in a clean horizontal row.
  • testimonialCustomer quote with name and role.
  • testimonialsMultiple quotes: grid, featured (first quote large), or marquee layout.
  • logosPartner or press logos: text names and/or optional image URLs per logo.
  • teamTeam member grid with avatars, roles, bios, and social links.
  • logoCloudPartner logos in a row, grid, or infinite marquee with optional grayscale.
  • metricsBandAnimated or static KPI band with count-up numbers.
  • marqueeTestimonialsInfinite horizontal scroll of testimonial cards (two rows moving in opposite directions). Needs 6-24 short quotes with author, role, and optional company/avatar. Reach for this in place of the standard testimonials block when the brief has lots of short customer voices or when the design wants kinetic social proof rather than a static grid.

Media

  • imageGalleryRows of images with optional captions.
  • youtubeResponsive embedded video player.
  • marqueeInfinite horizontal scrolling ticker for logos, badges, or short text.
  • gallery3dImage gallery with mosaic, parallax, tilt stack, or coverflow motion.

Commerce

  • ctaSingle focused pitch with one primary button; solid, outline, or muted section variant.
  • pricingPlans with prices, bullets, and sign-up buttons.
  • glowingPricing1-4 pricing tiers as cards, where the `highlighted` tier carries an animated gradient border glow (defaults to theme primary, override via `glowColor`). Same fields as the standard pricing block (name, price, period, features, button). Use for premium/SaaS pricing where the visual emphasis on the recommended tier should feel alive.

CMS

  • collectionListRepeating cards loaded from a content collection (blog posts, directory, etc.).
  • collectionDetailRenders one CMS entry on detail URLs from your collection fields.

Interactive

  • faqAccordion-style questions and answers.
  • mapLocation map visitors can pan and zoom.
  • embedDrop in calendars, widgets, or other iframe tools.
  • formCollect leads and messages-submissions land in your dashboard.
  • newsletterEmail capture section with heading, inline input, and submit button.
  • faqAccordionNative accordion FAQ with grouped, flat, or two-column layout.

Chrome

  • navbarTop bar with your brand, links, and optional CTA.
  • footerBottom links, socials, and copyright.

Error handling for agents

  • Block validation errors now return a field-path list like props.variant: Invalid enum value. Expected 'editorialStart' | 'split' | … plus a hint to fetch the matching schema://blocks/{type}.
  • Quota errors (create_site site limit) are returned with a human-readable message. MCP tools do not call SlateHut AI; use create_site_from_template or create_site_from_document. Free plans typically allow 1 site; call delete_site to free the slot before retrying.
  • Concurrency: update_site accepts expectUpdatedAt for optimistic locking; pass force: true to override.
  • 401 on OAuth: verify MCPAUTH_SECRET and an RSA private key are set in your server environment. The OAuth server metadata is available at /.well-known/oauth-authorization-server.
  • Prompts returning empty: confirm your OAuth token includes the mcp:prompts scope. Workspace API keys (Launch+) use the same workspace permissions as REST v1.

Cost & quotas

MCP tools are deterministic and do not consume SlateHut AI credits (template/document create, block/page/theme CRUD, media import). Hosted AI generation is REST-only (POST /api/v1/sites/generate). Create-site quota still applies to new sites. Free workspaces keep dashboard and editor access after AI limits. See AI credits and Free plan / no AI credits for plan details and fallbacks.

See also