Your AI assistant.
Your SCHMA context.

Connect Cursor to SCHMA through the Model Context Protocol (MCP). Let your AI assistant inspect your content models and retrieve content, so it can work with your actual schemas while helping you build.

Start with Cursor. Expand your workflow with MCP-compatible tools.

Cursor Composer · MCP Studio
@schmadev/mcp-server · stdio
Developer
Build a product card component using our SCHMA catalog content type.
Invoking MCP Toolget_schema
schma_mcp.call("get_schema", { contentType: "product" })
Retrieved schema: 4 verified fields (title, price, inventory_status, media)
Generated Component · ProductCard.tsxVerified against schema
import type { Product } from "@/types/schma";

export function ProductCard({ product }: { product: Product }) {
  return (
    <div className="rounded-xl border border-white/10 p-5">
      <img src={product.media.url} alt={product.title} />
      <h3 className="font-medium text-white">{product.title}</h3>
      <p className="text-sm text-zinc-400">${product.price}</p>
      <span className="text-xs text-blue-400">{product.inventory_status}</span>
    </div>
  );
}

It can only work with the context it can access.

Your content models already define the structure of your application. MCP gives your AI coding assistant a way to access that structure through SCHMA, rather than relying entirely on descriptions you provide in a prompt.

Architecture Flow: Local Assistant to Managed Schema
Stage 01

Cursor IDE

AI Assistant

Runs locally in your development environment

Protocolstdio JSON-RPC
Stage 02

SCHMA MCP Server

@schmadev/mcp-server

Translates AI tool requests into authenticated calls

ProtocolHTTPS / REST
Stage 03

SCHMA API

api.schma.dev

Validates tenant credentials, permissions & schemas

ProtocolSQL queries
Stage 04

PostgreSQL Database

Customer Content Store

Stores your actual content and schema definitions

ProtocolDirect Ownership
Controlled boundary: The local MCP server translates IDE requests to authenticated SCHMA API calls. The AI assistant does not connect directly to the customer database.
Bidirectional: Request → Validation → Return
Illustrative Tool Call

Inspect schema definitions before generating code

When your assistant invokes get_schema, SCHMA returns field types, required constraints, and relation references. The assistant builds components using your actual schema structure, preventing hallucinated property names.

Tool Invocation
schma_mcp.call("get_schema", { contentType: "blog-post" })
Returned Schema PayloadJSON · 200 OK
{
  "name": "Blog Post",
  "slug": "blog-post",
  "description": "Editorial articles and technical guides",
  "fields": [
    { "name": "title", "label": "Title", "type": "string", "required": true },
    { "name": "slug", "label": "Slug", "type": "string", "required": true },
    { "name": "excerpt", "label": "Excerpt", "type": "text", "required": false },
    { "name": "author", "label": "Author", "type": "relation", "target": "author", "required": true },
    { "name": "published_at", "label": "Published At", "type": "date", "required": true },
    { "name": "cover_image", "label": "Cover Image", "type": "media", "required": false }
  ]
}

More context. Less guesswork.

Explore the tools available through SCHMA's local MCP server, from inspecting schemas to working with content and generating new content models.

Local MCP Server
@schmadev/mcp-server · stdio transport
Select a tool to inspect

get_schema

Retrieve a content type's schema definition

Read-only
Target: local stdio
Fetches the full field schema, data types, validation rules, and relational targets for a specified content type. Allows the AI assistant to inspect the exact structure before writing frontend code.
Input Parameters
contentTyperequired
string
The content type slug (e.g., 'blog-post') or UUID
Sample Call
schma_mcp.call("get_schema", {
  contentType: "blog-post"
});
Sample Return Payload
{
  "slug": "blog-post",
  "name": "Blog Post",
  "fields": [
    { "name": "title", "type": "string", "required": true },
    { "name": "slug", "type": "string", "required": true },
    { "name": "author", "type": "relation", "target": "author" },
    { "name": "published_at", "type": "date" }
  ]
}
Access implication: Safe for all development workflows. Does not alter database records.
Node.js 18+ · @modelcontextprotocol/sdk

A small configuration. A connected workflow.

Add SCHMA's MCP server to your Cursor configuration, provide your workspace credentials, and let Cursor connect to the tools your account can access.

01

Get your credentials

Create an API key in SCHMA Studio under Settings → API Keys. Find your tenant slug and choose a key with only the permissions you need.

02

Add the configuration

Create .cursor/mcp.json in the root of your project and paste the SCHMA server configuration.

03

Connect and test

Reload or reconnect the MCP server in Cursor. Ask the assistant to list your SCHMA content types to verify that it can retrieve workspace context.

Requirements: Requires Node.js 18+ and npx for the local MCP package.

Secret protection: Replace the example credentials with your own. Avoid committing secrets to source control. Use a secure way to supply credentials appropriate to your environment.

.cursor/mcp.json
{
  "mcpServers": {
    "schma": {
      "command": "npx",
      "args": ["-y", "@schmadev/mcp-server"],
      "env": {
        "SCHMA_API_URL": "https://api.schma.dev",
        "SCHMA_API_KEY": "YOUR_API_KEY",
        "SCHMA_TENANT_SLUG": "YOUR_TENANT_SLUG"
      }
    }
  }
}
How Cursor activates this server:

Cursor executes npx -y @schmadev/mcp-server as a local child process over stdio. When you ask questions in Composer or Chat, Cursor inspects registered tool schemas and queries SCHMA on demand.

From a content model to application code.

Start with the content type you already use in SCHMA. Let your assistant inspect its schema, retrieve the information relevant to your task, and use that context to help build your application.

Prompt input
“Build a blog card component using my SCHMA blog-post content type. Include the cover image, author, publication date, and link to the article.”

Instead of requiring you to paste JSON payloads or manually describe field names in the prompt, Cursor recognizes that SCHMA MCP tools are available in the workspace.

Closing perspective: Your schema informs the work. You review the code, check it against your application, and decide what ships.
The code shown is illustrative. Field names and types depend on your schema, and generated code still needs review and testing.

Access should be intentional.

Connecting an AI assistant to your CMS is useful. Giving it unnecessary write access is not. Choose credentials and permissions with the work in mind.

Permission profile

Read-only access

Inspect content types, retrieve schemas, and read permitted content without intentionally modifying it.

Best for: Exploring a project, understanding a content model, and getting help writing application code.
Available tools: list_content_types, get_schema, get_entries, search_content
Permission profile

Write-capable access

Depending on the configured credentials and available tools, the assistant may create or update entries, change schemas, or publish content.

Best for: Deliberate content and schema operations where changes can be reviewed.
Requires management API key or elevated role
Connection Methods

Local MCP · stdio

Run the SCHMA MCP package locally from Cursor. It communicates with the SCHMA API using the credentials you configure. Supports all 10 tools including schema creation and semantic search.

Hosted MCP · SSE

Connect to SCHMA's hosted MCP endpoint. The hosted endpoint exposes a separate set of read-only tools, with tenant access controls and rate limiting (30 req/min).

Practical Safeguards
  • •Start with the least-privileged credentials available for your task.
  • •Keep API keys out of committed configuration files.
  • •Review schema changes, content updates, and publishing actions before relying on them.
  • •Check the current documentation for plan eligibility and connection requirements.
Core principle: MCP connects your assistant to tools. Your credentials and access controls determine what those tools can do.

Bring SCHMA into your coding workflow.

Connect Cursor to your content models and give your AI assistant access to the schema context it needs to help you build.

Your content structure, available when you need it.