Setting up SCHMA with Cursor via MCP

How to integrate Cursor IDE with your SCHMA workspace using the Model Context Protocol (@schmadev/mcp-server) for AI-driven schema inspection and content generation.

Developer Guides & Integrations5 min read·Updated October 2026

Setting up SCHMA with Cursor via MCP

How to integrate Cursor IDE with your SCHMA workspace using the Model Context Protocol (@schmadev/mcp-server) for AI-driven schema inspection and content generation.

Before you begin

  • A SCHMA workspace on the Pro plan (MCP tool integration is a Pro feature)
  • Cursor IDE installed on your machine
  • Node.js 18+ and npm installed locally
  • A valid SCHMA API key with Management or Delivery scopes

Cursor is an AI-powered code editor that supports the Model Context Protocol (MCP). By connecting Cursor to SCHMA's official MCP server (@schmadev/mcp-server), Cursor's AI agent gains direct awareness of your content models, field types, and published entries right inside your development environment.

Why integrate SCHMA with Cursor?

Connecting SCHMA to Cursor eliminates context switching and manual copy-pasting between your CMS and code editor. With the integration active, you can:

  • Generate type-safe frontend components: Ask Cursor to generate React/Next.js components matching the exact fields of a SCHMA content model.
  • Inspect CMS schemas in chat: Ask 'What fields are on the Author model in SCHMA?' and receive immediate schema declarations.
  • Seed test content: Prompt Cursor to create mock or staging entries directly through the CMS API.
  • Evolve schemas with AI: Synthesize new content models and fields from natural language prompts without opening the web browser.

Prerequisites and API credentials

Before configuring Cursor, gather three pieces of configuration from your SCHMA Studio dashboard:

  1. API Endpoint: The base URL of the SCHMA API (https://api.schma.dev for production cloud workspaces, or http://localhost:3001 for local development).
  2. Workspace Slug: The unique identifier of your workspace (found in your Studio browser URL or in Settings > General).
  3. API Key: An active API key created under Settings > API Keys. If you only need Cursor to read schemas and entries, use a key with delivery scope. If you want Cursor to create entries or schemas, use a key with management scope.

Configuring .cursor/mcp.json

You can configure the MCP server either for a specific project repository or globally across all Cursor projects.

Project-level setup: Create a file at .cursor/mcp.json in the root of your project directory with the following structure:

JSON Example
{
  "mcpServers": {
    "schma": {
      "command": "npx",
      "args": ["-y", "@schmadev/mcp-server"],
      "env": {
        "SCHMA_API_URL": "https://api.schma.dev",
        "SCHMA_API_KEY": "schma_live_your_actual_api_key_here",
        "SCHMA_TENANT_SLUG": "your-workspace-slug"
      }
    }
  }
}

Global setup: Open Cursor, go to Settings > Features > MCP, click Add New MCP Server, enter schma as the name, select type command, and provide the command npx -y @schmadev/mcp-server with the environment variables listed above.

Available tools and practical prompt examples

Once connected, Cursor's AI agent can call the following verified SCHMA MCP tools:

Tool NameRequired ScopeDescription
list_content_typesDelivery or ManagementLists all content types and their IDs/slugs
get_schemaDelivery or ManagementReturns full field definitions and validations for a content type
get_entriesDelivery or ManagementFetches published or draft entries matching a content type
search_contentDelivery or ManagementExecutes semantic text search across workspace entries
create_entryManagementCreates a new draft or published entry
update_entryManagementModifies field values on an existing entry
publish_entryManagementPublishes an existing draft entry
create_content_typeManagementCreates a new content type schema with defined fields
update_schemaManagementUpdates fields or validation rules on an existing schema

Here are sample prompts you can type into Cursor Composer or Chat:

  • *'Inspect the "article" schema in SCHMA and write a TypeScript interface for it.'*
  • *'Fetch 3 published entries of type "feature-card" and render a responsive grid component in Next.js.'*
  • *'Create a new content type called "Testimonial" with quote, authorName, authorRole, and rating fields.'*

Troubleshooting Cursor MCP connection issues

If Cursor displays a red status indicator next to the schma MCP server:

  1. Verify Node.js path: Open your terminal and run node -v and npx -v. Ensure Node 18 or newer is installed and in your system PATH.
  2. Test the package standalone: In your terminal, run npx -y @schmadev/mcp-server. The process should launch silently and wait for stdio input without throwing a module resolution error.
  3. Verify API Key scope: If read tools work but create_entry or create_content_type fails with a 403 error, your key has delivery scope only. Generate a new key with management scope in SCHMA Studio.
  4. Check plan entitlement: MCP tooling is a Pro feature. If your workspace is on the Free tier, API requests return an HTTP 403 plan restriction error.