LiveCal
Publisher sections ›
Libraries

Drop-in, no SDK build

Pick the path that matches your stack. Each one talks to the same Publisher API underneath.

Widget embed

The <livecal-track> web component + embed/v1.js. Works on any site. Keyless, or pk-enriched for the live-state line and the analytics beacon. Mint the pk in the dashboard.

HTML — Widget embed
<!-- 1. Load the embed script once, anywhere on the page -->
<script src="https://livecal.ai/embed/v1.js" defer></script>

<!-- 2. Drop a Track Widget wherever the event lives -->
<!--    source = the source_id UUID from the upsert response (NOT your external_id) -->
<!--    pk     = your site's publishable key (livecal_pk_…). PUBLIC + safe in -->
<!--             page source; it origin-pins the analytics beacon and turns on -->
<!--             the live-state line. Recommended; mint it in the console        -->
<!--             (Dashboard → your site → Widget keys).                          -->
<!--             Omit it and the widget still works — keyless, no enrichment.    -->
<livecal-track
  source="3f9a21c8-7b4e-4d2a-9c1f-0a2b3c4d5e6f"
  pk="livecal_pk_REPLACE_WITH_YOUR_SITE_KEY"
></livecal-track>

WordPress plugin

livecal-publisher (v0.2.0) maps a WordPress post to a Source via stable _livecal_*post meta, with two writers — the block editor and an automation pipeline (the WP REST API) — kept consistent. It ships a "LiveCal Track" Gutenberg block, a [livecal_track] shortcode, a classic meta box, and a multisite mu-loader. The per-site API token is entered in Settings and stored in site options — never committed to code, delivered out-of-band.

WordPress — post-meta contract
// Post meta written by the livecal-publisher plugin (two writers:
// the block editor AND an automation pipeline). Keys are the stable contract.
_livecal_manifest      = "airshow"
_livecal_facts         = { field: { value, confidence: "known"|"provisional" } }
_livecal_state         = { status, starts_at, live_state }
_livecal_source_id     = "3f9a21c8-…"   // written BACK by the plugin after first sync

// external_id is derived: {site_url}/{post_id} — the idempotent upsert key.
// Surfaces: "LiveCal Track" Gutenberg block + [livecal_track source="..."]
//           shortcode + classic meta box + the WP REST API (pipeline writer).

The full plugin source is published for review before any install on a live site — download the bundle, read every line, and have your team sign off. It holds no secrets.

MCP for agents

If you're an AI agent integrating LiveCal, connect the MCP server at POST /api/mcp (JSON-RPC 2.0 over Streamable HTTP, app-scoped bearer JWT) and drive it by tool calls. Five tools — upsert_source, push_state, validate_source, get_source, get_stats — each a thin wrapper over the same routes as the REST API, so tool errors return the identical stable error envelope. The full agent flow, end to end:

Agent bootstrap — token → tools/list → tools/call
# Agent bootstrap — three steps from a site key to a live tool call.
# Endpoint: POST https://livecal.ai/api/mcp  (JSON-RPC 2.0, Streamable HTTP, JSON mode)

# 1) Exchange your site key for a short-lived app-scoped JWT.
curl -X POST https://livecal.ai/api/v1/auth/token \
  -H "Content-Type: application/json" \
  -d '{ "grant_type": "site_key", "api_key": "livecal_sk_…" }'
#   -> { "token": "<jwt>", "expires_in": ... }   # send as Authorization: Bearer <jwt>

# 2) Discover the tools.
curl -X POST https://livecal.ai/api/mcp \
  -H "Authorization: Bearer <jwt>" -H "Content-Type: application/json" \
  -d '{ "jsonrpc":"2.0", "id":1, "method":"tools/list" }'
#   -> upsert_source · push_state · validate_source · get_source · get_stats
#      (each carries a full JSON-Schema inputSchema; read it, don't guess)

# 3) Call one. Tool failures come back as a result with isError:true carrying
#    the SAME stable { code, message, retryable, field? } envelope as REST —
#    branch on `code`, honor `retryable` (back off on 429/5xx).
curl -X POST https://livecal.ai/api/mcp \
  -H "Authorization: Bearer <jwt>" -H "Content-Type: application/json" \
  -d '{ "jsonrpc":"2.0", "id":2, "method":"tools/call",
        "params": { "name":"get_source", "arguments": { "source_id":"3f9a21c8-…" } } }'

A machine-readable index of these pages lives at /llms.txt.

REST & cURL

No library at all — the Publisher API is five plain endpoints with idempotent upserts and a machine-readable error contract. See the full API reference →