Meridian handbook
Integrating

Integrating

How other systems reach a Meridian site: the read-only content API for headless frontends and builds, outbound webhooks, upstream data sources and scheduled feed imports, the content MCP for AI agents, the member API for a custom portal, and moving content in from WordPress or Sanity.

Meridian talks to other systems through a small set of documented surfaces. Each has its own credentials, limits and contract, and none of them reaches the database or the admin’s internals.

SurfaceDirectionForCredentialsBundle
Content APIOut (read)A headless frontend, a static build, an app, a sync jobContent API keys (mrd_pub_, mrd_sec_)Both
Headless sitesOutRunning a public site from a frontend you build: resolve, preview, revalidation, forms and analyticsAs aboveBoth
WebhooksOut (push)Telling another system that content changed, or that an endpoint ranAn HMAC secret per webhookBoth
Sources and importersInReading another service’s JSON on a page or in an endpoint; importing a feed into documents on a scheduleHeaders from the environmentBoth
Content MCPBothA person’s AI agent reading and drafting content as that personOAuth 2.1, or a personal access tokenBoth
Member APIBothA member portal you build yourselfThe member’s session cookieengine-dmo
MigrationInMoving content, media and old addresses from WordPress, Sanity or another CMSCommand line access to the installBoth

Principles that hold everywhere

  • Every address is configuration. The engine fetches only URLs written in reviewed YAML (sources.yaml, importers.yaml, webhooks.yaml, site.yaml); nothing a request supplies becomes an outbound address. A redirect is followed only to the same scheme and host.
  • Secrets are environment variables. Keys, tokens and signing secrets are written ${VAR} and set in the engine’s environment. A literal secret in configuration is a check error.
  • Errors are structured. The JSON APIs answer failures as RFC 9457 problem details with a stable code.
  • Contracts are printable. engine-dmo api openapi, engine-dmo api schema, engine-dmo api member openapi and engine-dmo mcp tools --json print exactly what this binary serves, so a client can be generated and checked against the version you run.

Reference commands

engine-dmo api openapi --types --project .   # the content API's OpenAPI 3.1 document with your types
engine-dmo api schema --site <key> --project . # JSON Schema of each type as delivered
engine-dmo api resolve /some/path --project .  # what the content API answers for a path
engine-dmo api keys list --project .           # content API keys
engine-dmo webhooks deliveries --project .     # the outbound delivery log
engine-dmo mcp tools --project .               # what an agent sees

Commands that read the install (api resolve, api keys, webhooks, mcp and the imports) need a migrated database at DATABASE_URL. api openapi, api schema and mcp tools read only the project and connect to nothing, though engine.yaml still needs its variables set (any value for DATABASE_URL will do).