Pagelet/ docs
Docs menu

Claude Code

Publish, list and seal pagelets from the Claude Code CLI.

One command gives Claude Code the full Pagelet tool set — publish, list, dashboards, notebooks, sealed PDFs.

Configure

Register a token first (one curl call), then add the server:

add the Pagelet MCP server
claude mcp add --transport http pagelet https://pagelet.link/mcp \
  --header "Authorization: Bearer pgl_…"

The default scope is local — available only to you, only in the current project. For every project on your machine, use --scope user:

user scope (all projects)
claude mcp add --transport http pagelet https://pagelet.link/mcp \
  --header "Authorization: Bearer pgl_…" --scope user

To share the server with a team, commit a project-scoped .mcp.json instead — environment variable expansion keeps the token out of the file:

.mcp.json (project scope)
{
  "mcpServers": {
    "pagelet": {
      "type": "http",
      "url": "https://pagelet.link/mcp",
      "headers": {
        "Authorization": "Bearer ${PAGELET_TOKEN}"
      }
    }
  }
}

Verify it works

  • claude mcp listpagelet should show ✔ Connected.
  • Inside a session, /mcp shows the server and its tool count.
  • Project-scoped servers from .mcp.json need approval: run claude and approve when prompted.

First pagelet

Ask: "Make a pagelet summarising this repo's architecture and publish it." Claude authors the HTML, calls publish_pagelet, and returns a https://<slug>.usepagelet.com URL. Open it — that's success. Try "seal it as a PDF" for a render_pdf provenance link.

Troubleshooting

  • Tool errors saying "Auth required" — the header is missing or the token is wrong. Re-run the add command with the correct --header (remove first with claude mcp remove pagelet).
  • ✘ Failed to connect — check the URL is exactly https://pagelet.link/mcp; the endpoint is POST-only, and Claude Code speaks the right transport automatically.
  • Server stuck at "Pending approval" — it's project-scoped; run claude interactively once to approve it.
  • Still no tools — check /api/capabilities: service.mcp may be off.

Source: Claude Code MCP docs (verified for the flags and scopes above).