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.
schma_mcp.call("get_schema", { contentType: "product" })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.
Cursor IDE
Runs locally in your development environment
SCHMA MCP Server
Translates AI tool requests into authenticated calls
SCHMA API
Validates tenant credentials, permissions & schemas
PostgreSQL Database
Stores your actual content and schema definitions
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.
schma_mcp.call("get_schema", {
contentType: "blog-post"
}){
"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.
get_schema
Retrieve a content type's schema definition
schma_mcp.call("get_schema", {
contentType: "blog-post"
});{
"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" }
]
}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.
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.
Add the configuration
Create .cursor/mcp.json in the root of your project and paste the SCHMA server configuration.
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.
{
"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"
}
}
}
}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.
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.
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.
Read-only access
Inspect content types, retrieve schemas, and read permitted content without intentionally modifying it.
Write-capable access
Depending on the configured credentials and available tools, the assistant may create or update entries, change schemas, or publish content.
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).
- •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.
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.