Glokki documentation
Integrate the SDK with Next.js, build custom blocks and layouts, use the content APIs and automate editing with the MCP server.
Start here
- Step 1Integrate with Next.jsInstall @glokki-cms/sdk and @glokki-cms/react and render your first page.Integration guide
- Step 2Build your first blockdefineBlock, a Zod schema, your React component — editable in the visual editor.Block development
- Step 3Connect an AI agentLet Claude or any MCP client create pages, add blocks and publish.MCP server guide
Install
npm i @glokki-cms/sdk @glokki-cms/react zodReading this with an agent? Append .md to any docs URL, or fetch llms-full.txt for everything at once.
All guides
Getting started
Blocks & layouts
Block Development Guide
How to create custom blocks for glokki using @glokki-cms/sdk.
Custom Component Development
Advanced patterns for building custom block types beyond the standard set.
Layout Development Guide
How to create custom layouts (header + footer chrome) for glokki using @glokki-cms/sdk and @glokki-cms/react.
Editor Preview Route
How to mount the createEditorPreviewPage() helper so the CMS can edit block templates in the real visual editor — without needing a real page.
APIs & SDK
API Reference
Reference for the primary public exports from @glokki-cms/sdk and @glokki-cms/react.
Asset Import API
Upload files into your tenant's media library over HTTP — and organize them into folders that are created on the fly. Built for scripts, CI jobs, and migration tooling that need to push assets without a browser session.
Data Model Write API
Create and update data model records — the reference data blocks and collection fields point at (authors, venues, service hours) — from a script or an MCP agent, without a browser session.
AI & automation
Infrastructure
Page Analytics
Privacy-friendly, first-party, cookieless pageview analytics for your tenant site — views, unique visitors, referrers, and device breakdown. No cookies, no consent banner, two files of setup.
Asset CDN Proxy
How tenant-uploaded media flows from the CMS to your tenant app — and why every published tenant app needs a /cdn/[...path] route.
Sitemap and robots.txt
How to serve /sitemap.xml and /robots.txt from your tenant app — using the sitemap the CMS already generates, and a robots.txt that keeps the editor preview route and non-production deployments out of search engines.
Tenant-side caching with PostgreSQL
How a tenant app caches Delivery API reads in its own PostgreSQL database, with stale-while-revalidate and webhook-driven invalidation on publish.