Keep the stack you love.

Use the SDK on your server, fetch content over HTTP, or bring your workspace into your AI editor.

Before you connect

Have a workspace with a connected database and at least one published entry. In Settings → API Keys, create a key with the permissions your integration needs. Keep your API URL, key, and workspace slug in your application’s server environment.

The examples below use a content type with the slug post. Replace it with your own content type slug.

Read content with JavaScript or TypeScript

Install the client package in your frontend project. Use it from a server component, server loader, route handler, or build process.

Terminal
npm install @schmadev/client
Server-side TypeScript
import { createClient } from "@schmadev/client";

// Run on your server. Set these values in its environment.
const schma = createClient({
  baseUrl: process.env.SCHMA_API_URL,
  apiKey: process.env.SCHMA_API_KEY!,
  tenantSlug: process.env.SCHMA_TENANT_SLUG,
});

const { entries } = await schma.delivery.listEntries({
  type: "post",
  limit: 10,
});

// Your content fields are on each entry's data property.

The same request works in server code for Next.js, Astro, and other JavaScript frameworks. Render the returned entry fields with your own components. For browser interactions, expose only the content your page needs through a server endpoint.

Use HTTP from any stack

The delivery API is a read interface for published content. You can call it from any language that can make an HTTP request.

Shell · supply your own environment values
curl "$SCHMA_API_URL/v1/delivery/entries?type=post&limit=10" \
  -H "Authorization: Bearer $SCHMA_API_KEY" \
  -H "x-tenant-slug: $SCHMA_TENANT_SLUG"

Read the request and response reference →

Connect Cursor or Claude Desktop

On a workspace with MCP enabled, the SCHMA MCP server lets your AI editor work with content types and entries. Install Node.js on the machine running your editor so it can start the server with npx.

Add a SCHMA server entry to your editor’s MCP configuration. Replace the values below with your API URL, a management credential with the permissions you need, and your workspace slug.

MCP configuration · replace the example values
{
  "mcpServers": {
    "schma": {
      "command": "npx",
      "args": ["-y", "@schmadev/mcp-server"],
      "env": {
        "SCHMA_API_URL": "YOUR_SCHMA_API_URL",
        "SCHMA_API_KEY": "YOUR_MANAGEMENT_API_KEY",
        "SCHMA_TENANT_SLUG": "YOUR_WORKSPACE_SLUG"
      }
    }
  }
}

Restart the connection in your editor. Begin by asking it to list content types or inspect a schema. Review the proposed changes before allowing actions that create, update, or publish content.

MCP is an experimental Pro and Max feature. Keep the configuration containing your key private. If the connection fails, use the MCP troubleshooting checks.